generated-configure.sh revision 2792:4c9ee37f0c66
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_CDS
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MAX
752MACOSX_VERSION_MIN
753CXXSTD_CXXFLAG
754JDK_ARCH_ABI_PROP_NAME
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JIB_JAR
793JT_HOME
794JTREGEXE
795HOTSPOT_TOOLCHAIN_TYPE
796USING_BROKEN_SUSE_LD
797PACKAGE_PATH
798BUILD_AS
799BUILD_LDCXX
800BUILD_LD
801BUILD_STRIP
802BUILD_OBJCOPY
803BUILD_AR
804BUILD_NM
805BUILD_CXX
806BUILD_CC
807BUILD_SYSROOT_LDFLAGS
808BUILD_SYSROOT_CFLAGS
809ac_ct_OBJDUMP
810OBJDUMP
811ac_ct_OBJCOPY
812OBJCOPY
813ac_ct_NM
814ac_ct_STRIP
815GNM
816NM
817STRIP
818MSBUILD
819DUMPBIN
820RC
821MT
822LIPO
823ac_ct_AR
824AR
825AS
826LDCXX
827LD
828CXXCPP
829CPP
830CXX_VERSION_NUMBER
831CC_VERSION_NUMBER
832ac_ct_CXX
833CXXFLAGS
834CXX
835TOOLCHAIN_PATH_CXX
836POTENTIAL_CXX
837OBJEXT
838EXEEXT
839ac_ct_CC
840CPPFLAGS
841LDFLAGS
842CFLAGS
843CC
844TOOLCHAIN_PATH_CC
845POTENTIAL_CC
846TOOLCHAIN_VERSION
847VS_LIB
848VS_INCLUDE
849VS_PATH
850CYGWIN_LINK
851SYSROOT_LDFLAGS
852SYSROOT_CFLAGS
853EXTRA_LDFLAGS
854EXTRA_CXXFLAGS
855EXTRA_CFLAGS
856EXE_SUFFIX
857OBJ_SUFFIX
858STATIC_LIBRARY
859SHARED_LIBRARY
860STATIC_LIBRARY_SUFFIX
861SHARED_LIBRARY_SUFFIX
862LIBRARY_PREFIX
863TOOLCHAIN_TYPE
864STATIC_BUILD
865IMPORT_MODULES_MAKE
866IMPORT_MODULES_SRC
867IMPORT_MODULES_MAN
868IMPORT_MODULES_LEGAL
869IMPORT_MODULES_CONF
870IMPORT_MODULES_LIBS
871IMPORT_MODULES_CMDS
872IMPORT_MODULES_CLASSES
873BUILD_OUTPUT
874JDK_TOPDIR
875NASHORN_TOPDIR
876HOTSPOT_TOPDIR
877JAXWS_TOPDIR
878JAXP_TOPDIR
879CORBA_TOPDIR
880LANGTOOLS_TOPDIR
881EXTERNAL_BUILDJDK
882BUILD_JDK
883CREATE_BUILDJDK
884JLINK
885JMOD
886JAVAC_FLAGS
887BOOT_JDK_MODULAR
888BOOT_JDK_SOURCETARGET
889JARSIGNER
890JAR
891JAVAH
892JAVAC
893JAVA
894BOOT_JDK
895JAVA_CHECK
896JAVAC_CHECK
897VERSION_IS_GA
898VERSION_SHORT
899VERSION_STRING
900VERSION_NUMBER_FOUR_POSITIONS
901VERSION_NUMBER
902VERSION_OPT
903VERSION_BUILD
904VERSION_PRE
905VERSION_PATCH
906VERSION_SECURITY
907VERSION_MINOR
908VERSION_MAJOR
909MACOSX_BUNDLE_ID_BASE
910MACOSX_BUNDLE_NAME_BASE
911HOTSPOT_VM_DISTRO
912COMPANY_NAME
913JDK_RC_PLATFORM_NAME
914PRODUCT_SUFFIX
915PRODUCT_NAME
916LAUNCHER_NAME
917JLINK_KEEP_PACKAGED_MODULES
918COPYRIGHT_YEAR
919COMPRESS_JARS
920INCLUDE_SA
921UNLIMITED_CRYPTO
922CACERTS_FILE
923ENABLE_FULL_DOCS
924ENABLE_HEADLESS_ONLY
925DEFAULT_MAKE_TARGET
926OS_VERSION_MICRO
927OS_VERSION_MINOR
928OS_VERSION_MAJOR
929PKG_CONFIG
930BASH_ARGS
931SETFILE
932CODESIGN
933XATTR
934DSYMUTIL
935IS_GNU_TIME
936PATCH
937DTRACE
938FLOCK
939TIME
940STAT
941HG
942DOT
943READELF
944OTOOL
945LDD
946ZIPEXE
947UNZIP
948TAR_SUPPORTS_TRANSFORM
949TAR_INCLUDE_PARAM
950TAR_CREATE_EXTRA_PARAM
951TAR_TYPE
952FIND_DELETE
953OUTPUT_SYNC
954OUTPUT_SYNC_SUPPORTED
955CHECK_TOOLSDIR_MAKE
956CHECK_TOOLSDIR_GMAKE
957CHECK_MAKE
958CHECK_GMAKE
959MAKE
960PKGHANDLER
961CONFIGURESUPPORT_OUTPUTDIR
962OUTPUT_ROOT
963CONF_NAME
964SPEC
965SDKROOT
966XCODEBUILD
967JVM_VARIANT_MAIN
968VALID_JVM_VARIANTS
969JVM_VARIANTS
970DEBUG_LEVEL
971HOTSPOT_DEBUG_LEVEL
972JDK_VARIANT
973USERNAME
974CANONICAL_TOPDIR
975ORIGINAL_TOPDIR
976TOPDIR
977PATH_SEP
978HOTSPOT_BUILD_CPU_DEFINE
979HOTSPOT_BUILD_CPU_ARCH
980HOTSPOT_BUILD_CPU
981HOTSPOT_BUILD_OS_TYPE
982HOTSPOT_BUILD_OS
983OPENJDK_BUILD_BUNDLE_PLATFORM
984OPENJDK_BUILD_OS_EXPORT_DIR
985OPENJDK_BUILD_CPU_OSARCH
986OPENJDK_BUILD_CPU_ISADIR
987OPENJDK_BUILD_CPU_LEGACY_LIB
988OPENJDK_BUILD_CPU_LEGACY
989HOTSPOT_TARGET_CPU_DEFINE
990HOTSPOT_TARGET_CPU_ARCH
991HOTSPOT_TARGET_CPU
992HOTSPOT_TARGET_OS_TYPE
993HOTSPOT_TARGET_OS
994DEFINE_CROSS_COMPILE_ARCH
995OPENJDK_TARGET_BUNDLE_PLATFORM
996OPENJDK_TARGET_OS_EXPORT_DIR
997OPENJDK_TARGET_CPU_OSARCH
998OPENJDK_TARGET_CPU_ISADIR
999OPENJDK_TARGET_CPU_LEGACY_LIB
1000OPENJDK_TARGET_CPU_LEGACY
1001RELEASE_FILE_OS_ARCH
1002RELEASE_FILE_OS_NAME
1003OPENJDK_MODULE_TARGET_PLATFORM
1004COMPILE_TYPE
1005OPENJDK_TARGET_CPU_ENDIAN
1006OPENJDK_TARGET_CPU_BITS
1007OPENJDK_TARGET_CPU_ARCH
1008OPENJDK_TARGET_CPU
1009OPENJDK_TARGET_OS_ENV
1010OPENJDK_TARGET_OS_TYPE
1011OPENJDK_TARGET_OS
1012OPENJDK_BUILD_CPU_ENDIAN
1013OPENJDK_BUILD_CPU_BITS
1014OPENJDK_BUILD_CPU_ARCH
1015OPENJDK_BUILD_CPU
1016OPENJDK_BUILD_OS_ENV
1017OPENJDK_BUILD_OS_TYPE
1018OPENJDK_BUILD_OS
1019OPENJDK_BUILD_AUTOCONF_NAME
1020OPENJDK_TARGET_AUTOCONF_NAME
1021target_os
1022target_vendor
1023target_cpu
1024target
1025host_os
1026host_vendor
1027host_cpu
1028host
1029build_os
1030build_vendor
1031build_cpu
1032build
1033PANDOC
1034NICE
1035CPIO
1036DF
1037READLINK
1038CYGPATH
1039SED
1040FGREP
1041EGREP
1042GREP
1043AWK
1044XARGS
1045WHICH
1046WC
1047UNIQ
1048UNAME
1049TR
1050TOUCH
1051TEE
1052TAR
1053TAIL
1054SORT
1055SH
1056RMDIR
1057RM
1058PRINTF
1059NAWK
1060MV
1061MKTEMP
1062MKDIR
1063LS
1064LN
1065GZIP
1066GUNZIP
1067HEAD
1068FIND
1069FILE
1070EXPR
1071ECHO
1072DIRNAME
1073DIFF
1074DATE
1075CUT
1076CP
1077COMM
1078CMP
1079CHMOD
1080CAT
1081BASH
1082BASENAME
1083DATE_WHEN_CONFIGURED
1084ORIGINAL_PATH
1085CONFIGURE_COMMAND_LINE
1086target_alias
1087host_alias
1088build_alias
1089LIBS
1090ECHO_T
1091ECHO_N
1092ECHO_C
1093DEFS
1094mandir
1095localedir
1096libdir
1097psdir
1098pdfdir
1099dvidir
1100htmldir
1101infodir
1102docdir
1103oldincludedir
1104includedir
1105localstatedir
1106sharedstatedir
1107sysconfdir
1108datadir
1109datarootdir
1110libexecdir
1111sbindir
1112bindir
1113program_transform_name
1114prefix
1115exec_prefix
1116PACKAGE_URL
1117PACKAGE_BUGREPORT
1118PACKAGE_STRING
1119PACKAGE_VERSION
1120PACKAGE_TARNAME
1121PACKAGE_NAME
1122PATH_SEPARATOR
1123SHELL'
1124ac_subst_files=''
1125ac_user_opts='
1126enable_option_checking
1127with_target_bits
1128enable_openjdk_only
1129with_custom_make_dir
1130with_jdk_variant
1131enable_debug
1132with_debug_level
1133with_jvm_variants
1134with_cpu_port
1135with_devkit
1136with_sys_root
1137with_sysroot
1138with_tools_dir
1139with_toolchain_path
1140with_extra_path
1141with_sdk_name
1142with_conf_name
1143with_output_sync
1144with_default_make_target
1145enable_headless_only
1146enable_full_docs
1147with_cacerts_file
1148enable_unlimited_crypto
1149with_copyright_year
1150enable_keep_packaged_modules
1151with_milestone
1152with_update_version
1153with_user_release_suffix
1154with_build_number
1155with_version_string
1156with_version_pre
1157with_version_opt
1158with_version_build
1159with_version_major
1160with_version_minor
1161with_version_security
1162with_version_patch
1163with_boot_jdk
1164with_build_jdk
1165with_add_source_root
1166with_override_source_root
1167with_adds_and_overrides
1168with_override_langtools
1169with_override_corba
1170with_override_jaxp
1171with_override_jaxws
1172with_override_hotspot
1173with_override_nashorn
1174with_override_jdk
1175with_import_hotspot
1176with_import_modules
1177enable_static_build
1178with_toolchain_type
1179with_extra_cflags
1180with_extra_cxxflags
1181with_extra_ldflags
1182with_toolchain_version
1183with_build_devkit
1184with_jtreg
1185with_jib
1186with_abi_profile
1187with_macosx_version_max
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194enable_aot
1195enable_cds
1196enable_hotspot_gtest
1197with_stdc__lib
1198with_msvcr_dll
1199with_msvcp_dll
1200with_x
1201with_cups
1202with_cups_include
1203with_freetype
1204with_freetype_include
1205with_freetype_lib
1206with_freetype_src
1207enable_freetype_bundling
1208with_freetype_license
1209with_alsa
1210with_alsa_include
1211with_alsa_lib
1212with_libffi
1213with_libffi_include
1214with_libffi_lib
1215enable_libffi_bundling
1216with_libjpeg
1217with_giflib
1218with_libpng
1219with_zlib
1220with_lcms
1221with_dxsdk
1222with_dxsdk_lib
1223with_dxsdk_include
1224with_jvm_features
1225with_jvm_interpreter
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293PANDOC
1294MAKE
1295UNZIP
1296ZIPEXE
1297LDD
1298OTOOL
1299READELF
1300DOT
1301HG
1302STAT
1303TIME
1304FLOCK
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --enable-headless-only  only build headless (no GUI) support [disabled]
1980  --enable-full-docs      build complete documentation [enabled if all tools
1981                          found]
1982  --disable-unlimited-crypto
1983                          Disable unlimited crypto policy [enabled]
1984  --disable-keep-packaged-modules
1985                          Do not keep packaged modules in jdk image [enable]
1986  --enable-static-build   enable static library build [disabled]
1987  --disable-warnings-as-errors
1988                          do not consider native warnings to be an error
1989                          [enabled]
1990  --enable-debug-symbols  Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-zip-debug-info Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --enable-native-coverage
1995                          enable native compilation with code coverage
1996                          data[disabled]
1997  --enable-dtrace[=yes/no/auto]
1998                          enable dtrace. Default is auto, where dtrace is
1999                          enabled if all dependencies are present.
2000  --enable-aot[=yes/no/auto]
2001                          enable ahead of time compilation feature. Default is
2002                          auto, where aot is enabled if all dependencies are
2003                          present.
2004  --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
2005                          Default is yes.
2006  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2007  --disable-freetype-bundling
2008                          disable bundling of the freetype library with the
2009                          build result [enabled on Windows or when using
2010                          --with-freetype, disabled otherwise]
2011  --enable-libffi-bundling
2012                          enable bundling of libffi.so to make the built JDK
2013                          runnable on more systems
2014  --enable-jtreg-failure-handler
2015                          forces build of the jtreg failure handler to be
2016                          enabled, missing dependencies become fatal errors.
2017                          Default is auto, where the failure handler is built
2018                          if all dependencies are present and otherwise just
2019                          disabled.
2020  --disable-generate-classlist
2021                          forces enabling or disabling of the generation of a
2022                          CDS classlist at build time. Default is to generate
2023                          it when either the server or client JVMs are built
2024                          and enable-cds is true.
2025  --enable-sjavac         use sjavac to do fast incremental compiles
2026                          [disabled]
2027  --disable-javac-server  disable javac server [enabled]
2028  --enable-icecc          enable distribted compilation of native code using
2029                          icecc/icecream [disabled]
2030  --disable-precompiled-headers
2031                          disable using precompiled headers when compiling C++
2032                          [enabled]
2033  --enable-ccache         enable using ccache to speed up recompilations
2034                          [disabled]
2035
2036Optional Packages:
2037  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2038  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2039  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2040                          support it), e.g. --with-target-bits=32 [guessed]
2041  --with-custom-make-dir  Deprecated. Option is kept for backwards
2042                          compatibility and is ignored
2043  --with-jdk-variant      JDK variant to build (normal) [normal]
2044  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2045                          optimized) [release]
2046  --with-jvm-variants     JVM variants (separated by commas) to build
2047                          (server,client,minimal,core,zero,zeroshark,custom)
2048                          [server]
2049  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2050                          (arm64,aarch64) [aarch64]
2051  --with-devkit           use this devkit for compilers, tools and resources
2052  --with-sys-root         alias for --with-sysroot for backwards compatability
2053  --with-sysroot          use this directory as sysroot
2054  --with-tools-dir        alias for --with-toolchain-path for backwards
2055                          compatibility
2056  --with-toolchain-path   prepend these directories when searching for
2057                          toolchain binaries (compilers etc)
2058  --with-extra-path       prepend these directories to the default path
2059  --with-sdk-name         use the platform SDK of the given name. [macosx]
2060  --with-conf-name        use this as the name of the configuration [generated
2061                          from important configuration options]
2062  --with-output-sync      set make output sync type if supported by make.
2063                          [recurse]
2064  --with-default-make-target
2065                          set the default make target [exploded-image]
2066  --with-cacerts-file     specify alternative cacerts file
2067  --with-copyright-year   Set copyright year value for build [current year]
2068  --with-milestone        Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-update-version   Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-user-release-suffix
2073                          Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-build-number     Deprecated. Option is kept for backwards
2076                          compatibility and is ignored
2077  --with-version-string   Set version string [calculated]
2078  --with-version-pre      Set the base part of the version 'PRE' field
2079                          (pre-release identifier) ['internal']
2080  --with-version-opt      Set version 'OPT' field (build metadata)
2081                          [<timestamp>.<user>.<dirname>]
2082  --with-version-build    Set version 'BUILD' field (build number) [not
2083                          specified]
2084  --with-version-major    Set version 'MAJOR' field (first number) [current
2085                          source value]
2086  --with-version-minor    Set version 'MINOR' field (second number) [current
2087                          source value]
2088  --with-version-security Set version 'SECURITY' field (third number) [current
2089                          source value]
2090  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2091                          specified]
2092  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2093  --with-build-jdk        path to JDK of same version as is being built[the
2094                          newly built JDK]
2095  --with-add-source-root  Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-source-root
2098                          Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-adds-and-overrides
2101                          Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-langtools
2104                          Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-corba   Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-jaxp    Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-jaxws   Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-hotspot Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-override-nashorn Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-override-jdk     Deprecated. Option is kept for backwards
2117                          compatibility and is ignored
2118  --with-import_hotspot   Deprecated. Option is kept for backwards
2119                          compatibility and is ignored
2120  --with-import-modules   import a set of prebuilt modules either as a zip
2121                          file or an exploded directory
2122  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2123                          to show possible values [platform dependent]
2124  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2125  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2126  --with-extra-ldflags    extra flags to be used when linking jdk
2127  --with-toolchain-version
2128                          the version of the toolchain to look for, use
2129                          '--help' to show possible values [platform
2130                          dependent]
2131  --with-build-devkit     Devkit to use for the build platform toolchain
2132  --with-jtreg            Regression Test Harness [probed]
2133  --with-jib              Jib dependency management tool [not used]
2134  --with-abi-profile      specify ABI profile for ARM builds
2135                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2136                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2137                          [toolchain dependent]
2138  --with-macosx-version-max
2139                          error on use of newer functionality. [macosx]
2140  --with-native-debug-symbols
2141                          set the native debug symbol configuration (none,
2142                          internal, external, zipped) [varying]
2143  --with-stdc++lib=<static>,<dynamic>,<default>
2144                          force linking of the C++ runtime on Linux to either
2145                          static or dynamic, default is static with dynamic as
2146                          fallback
2147  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2148                          (Windows only) [probed]
2149  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2150                          (Windows only) [probed]
2151  --with-x                use the X Window System
2152  --with-cups             specify prefix directory for the cups package
2153                          (expecting the headers under PATH/include)
2154  --with-cups-include     specify directory for the cups include files
2155  --with-freetype         specify prefix directory for the freetype package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-freetype-include specify directory for the freetype include files
2159  --with-freetype-lib     specify directory for the freetype library
2160  --with-freetype-src     specify directory with freetype sources to
2161                          automatically build the library (experimental,
2162                          Windows-only)
2163  --with-freetype-license if bundling freetype, also bundle this license file
2164  --with-alsa             specify prefix directory for the alsa package
2165                          (expecting the libraries under PATH/lib and the
2166                          headers under PATH/include)
2167  --with-alsa-include     specify directory for the alsa include files
2168  --with-alsa-lib         specify directory for the alsa library
2169  --with-libffi           specify prefix directory for the libffi package
2170                          (expecting the libraries under PATH/lib and the
2171                          headers under PATH/include)
2172  --with-libffi-include   specify directory for the libffi include files
2173  --with-libffi-lib       specify directory for the libffi library
2174  --with-libjpeg          use libjpeg from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-giflib           use giflib from build system or OpenJDK source
2177                          (system, bundled) [bundled]
2178  --with-libpng           use libpng from build system or OpenJDK source
2179                          (system, bundled) [bundled]
2180  --with-zlib             use zlib from build system or OpenJDK source
2181                          (system, bundled) [bundled]
2182  --with-lcms             use lcms2 from build system or OpenJDK source
2183                          (system, bundled) [bundled]
2184  --with-dxsdk            Deprecated. Option is kept for backwards
2185                          compatibility and is ignored
2186  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2187                          compatibility and is ignored
2188  --with-dxsdk-include    Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-jvm-features     additional JVM features to enable (separated by
2191                          comma), use '--help' to show possible values [none]
2192  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2193                          compatibility and is ignored
2194  --with-num-cores        number of cores in the build system, e.g.
2195                          --with-num-cores=8 [probed]
2196  --with-memory-size      memory (in MB) available in the build system, e.g.
2197                          --with-memory-size=1024 [probed]
2198  --with-jobs             number of parallel jobs to let make run [calculated
2199                          based on cores and memory]
2200  --with-test-jobs        number of parallel tests jobs to run [based on build
2201                          jobs]
2202  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2203                          invocations of boot JDK, overriding the default
2204                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2205                          -enableassertions"
2206  --with-sjavac-server-java
2207                          use this java binary for running the sjavac
2208                          background server [Boot JDK java]
2209  --with-ccache-dir       where to store ccache files [~/.ccache]
2210
2211Some influential environment variables:
2212  BASENAME    Override default value for BASENAME
2213  BASH        Override default value for BASH
2214  CAT         Override default value for CAT
2215  CHMOD       Override default value for CHMOD
2216  CMP         Override default value for CMP
2217  COMM        Override default value for COMM
2218  CP          Override default value for CP
2219  CUT         Override default value for CUT
2220  DATE        Override default value for DATE
2221  DIFF        Override default value for DIFF
2222  DIRNAME     Override default value for DIRNAME
2223  ECHO        Override default value for ECHO
2224  EXPR        Override default value for EXPR
2225  FILE        Override default value for FILE
2226  FIND        Override default value for FIND
2227  HEAD        Override default value for HEAD
2228  GUNZIP      Override default value for GUNZIP
2229  GZIP        Override default value for GZIP
2230  LN          Override default value for LN
2231  LS          Override default value for LS
2232  MKDIR       Override default value for MKDIR
2233  MKTEMP      Override default value for MKTEMP
2234  MV          Override default value for MV
2235  NAWK        Override default value for NAWK
2236  PRINTF      Override default value for PRINTF
2237  RM          Override default value for RM
2238  RMDIR       Override default value for RMDIR
2239  SH          Override default value for SH
2240  SORT        Override default value for SORT
2241  TAIL        Override default value for TAIL
2242  TAR         Override default value for TAR
2243  TEE         Override default value for TEE
2244  TOUCH       Override default value for TOUCH
2245  TR          Override default value for TR
2246  UNAME       Override default value for UNAME
2247  UNIQ        Override default value for UNIQ
2248  WC          Override default value for WC
2249  WHICH       Override default value for WHICH
2250  XARGS       Override default value for XARGS
2251  AWK         Override default value for AWK
2252  GREP        Override default value for GREP
2253  EGREP       Override default value for EGREP
2254  FGREP       Override default value for FGREP
2255  SED         Override default value for SED
2256  CYGPATH     Override default value for CYGPATH
2257  READLINK    Override default value for READLINK
2258  DF          Override default value for DF
2259  CPIO        Override default value for CPIO
2260  NICE        Override default value for NICE
2261  PANDOC      Override default value for PANDOC
2262  MAKE        Override default value for MAKE
2263  UNZIP       Override default value for UNZIP
2264  ZIPEXE      Override default value for ZIPEXE
2265  LDD         Override default value for LDD
2266  OTOOL       Override default value for OTOOL
2267  READELF     Override default value for READELF
2268  DOT         Override default value for DOT
2269  HG          Override default value for HG
2270  STAT        Override default value for STAT
2271  TIME        Override default value for TIME
2272  FLOCK       Override default value for FLOCK
2273  DTRACE      Override default value for DTRACE
2274  PATCH       Override default value for PATCH
2275  DSYMUTIL    Override default value for DSYMUTIL
2276  XATTR       Override default value for XATTR
2277  CODESIGN    Override default value for CODESIGN
2278  SETFILE     Override default value for SETFILE
2279  PKG_CONFIG  path to pkg-config utility
2280  JAVA        Override default value for JAVA
2281  JAVAC       Override default value for JAVAC
2282  JAVAH       Override default value for JAVAH
2283  JAR         Override default value for JAR
2284  JARSIGNER   Override default value for JARSIGNER
2285  CC          C compiler command
2286  CFLAGS      C compiler flags
2287  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2288              nonstandard directory <lib dir>
2289  LIBS        libraries to pass to the linker, e.g. -l<library>
2290  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2291              you have headers in a nonstandard directory <include dir>
2292  CXX         C++ compiler command
2293  CXXFLAGS    C++ compiler flags
2294  CPP         C preprocessor
2295  CXXCPP      C++ preprocessor
2296  AS          Override default value for AS
2297  AR          Override default value for AR
2298  LIPO        Override default value for LIPO
2299  STRIP       Override default value for STRIP
2300  NM          Override default value for NM
2301  GNM         Override default value for GNM
2302  OBJCOPY     Override default value for OBJCOPY
2303  OBJDUMP     Override default value for OBJDUMP
2304  BUILD_CC    Override default value for BUILD_CC
2305  BUILD_CXX   Override default value for BUILD_CXX
2306  BUILD_NM    Override default value for BUILD_NM
2307  BUILD_AR    Override default value for BUILD_AR
2308  BUILD_OBJCOPY
2309              Override default value for BUILD_OBJCOPY
2310  BUILD_STRIP Override default value for BUILD_STRIP
2311  JTREGEXE    Override default value for JTREGEXE
2312  XMKMF       Path to xmkmf, Makefile generator for X Window System
2313  FREETYPE_CFLAGS
2314              C compiler flags for FREETYPE, overriding pkg-config
2315  FREETYPE_LIBS
2316              linker flags for FREETYPE, overriding pkg-config
2317  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2318  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2319  LIBFFI_CFLAGS
2320              C compiler flags for LIBFFI, overriding pkg-config
2321  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2322  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2323  PNG_LIBS    linker flags for PNG, overriding pkg-config
2324  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2325  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2326  ICECC_CMD   Override default value for ICECC_CMD
2327  ICECC_CREATE_ENV
2328              Override default value for ICECC_CREATE_ENV
2329  ICECC_WRAPPER
2330              Override default value for ICECC_WRAPPER
2331  CCACHE      Override default value for CCACHE
2332
2333Use these variables to override the choices made by `configure' or to help
2334it to find libraries and programs with nonstandard names/locations.
2335
2336Report bugs to <build-dev@openjdk.java.net>.
2337OpenJDK home page: <http://openjdk.java.net>.
2338_ACEOF
2339ac_status=$?
2340fi
2341
2342if test "$ac_init_help" = "recursive"; then
2343  # If there are subdirs, report their specific --help.
2344  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2345    test -d "$ac_dir" ||
2346      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2347      continue
2348    ac_builddir=.
2349
2350case "$ac_dir" in
2351.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2352*)
2353  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2354  # A ".." for each directory in $ac_dir_suffix.
2355  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2356  case $ac_top_builddir_sub in
2357  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2358  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2359  esac ;;
2360esac
2361ac_abs_top_builddir=$ac_pwd
2362ac_abs_builddir=$ac_pwd$ac_dir_suffix
2363# for backward compatibility:
2364ac_top_builddir=$ac_top_build_prefix
2365
2366case $srcdir in
2367  .)  # We are building in place.
2368    ac_srcdir=.
2369    ac_top_srcdir=$ac_top_builddir_sub
2370    ac_abs_top_srcdir=$ac_pwd ;;
2371  [\\/]* | ?:[\\/]* )  # Absolute name.
2372    ac_srcdir=$srcdir$ac_dir_suffix;
2373    ac_top_srcdir=$srcdir
2374    ac_abs_top_srcdir=$srcdir ;;
2375  *) # Relative name.
2376    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2377    ac_top_srcdir=$ac_top_build_prefix$srcdir
2378    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2379esac
2380ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2381
2382    cd "$ac_dir" || { ac_status=$?; continue; }
2383    # Check for guested configure.
2384    if test -f "$ac_srcdir/configure.gnu"; then
2385      echo &&
2386      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2387    elif test -f "$ac_srcdir/configure"; then
2388      echo &&
2389      $SHELL "$ac_srcdir/configure" --help=recursive
2390    else
2391      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2392    fi || ac_status=$?
2393    cd "$ac_pwd" || { ac_status=$?; break; }
2394  done
2395fi
2396
2397test -n "$ac_init_help" && exit $ac_status
2398if $ac_init_version; then
2399  cat <<\_ACEOF
2400OpenJDK configure jdk9
2401generated by GNU Autoconf 2.69
2402
2403Copyright (C) 2012 Free Software Foundation, Inc.
2404This configure script is free software; the Free Software Foundation
2405gives unlimited permission to copy, distribute and modify it.
2406_ACEOF
2407  exit
2408fi
2409
2410## ------------------------ ##
2411## Autoconf initialization. ##
2412## ------------------------ ##
2413
2414# ac_fn_c_try_compile LINENO
2415# --------------------------
2416# Try to compile conftest.$ac_ext, and return whether this succeeded.
2417ac_fn_c_try_compile ()
2418{
2419  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420  rm -f conftest.$ac_objext
2421  if { { ac_try="$ac_compile"
2422case "(($ac_try" in
2423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2424  *) ac_try_echo=$ac_try;;
2425esac
2426eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2427$as_echo "$ac_try_echo"; } >&5
2428  (eval "$ac_compile") 2>conftest.err
2429  ac_status=$?
2430  if test -s conftest.err; then
2431    grep -v '^ *+' conftest.err >conftest.er1
2432    cat conftest.er1 >&5
2433    mv -f conftest.er1 conftest.err
2434  fi
2435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2436  test $ac_status = 0; } && {
2437	 test -z "$ac_c_werror_flag" ||
2438	 test ! -s conftest.err
2439       } && test -s conftest.$ac_objext; then :
2440  ac_retval=0
2441else
2442  $as_echo "$as_me: failed program was:" >&5
2443sed 's/^/| /' conftest.$ac_ext >&5
2444
2445	ac_retval=1
2446fi
2447  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2448  as_fn_set_status $ac_retval
2449
2450} # ac_fn_c_try_compile
2451
2452# ac_fn_cxx_try_compile LINENO
2453# ----------------------------
2454# Try to compile conftest.$ac_ext, and return whether this succeeded.
2455ac_fn_cxx_try_compile ()
2456{
2457  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2458  rm -f conftest.$ac_objext
2459  if { { ac_try="$ac_compile"
2460case "(($ac_try" in
2461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2462  *) ac_try_echo=$ac_try;;
2463esac
2464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2465$as_echo "$ac_try_echo"; } >&5
2466  (eval "$ac_compile") 2>conftest.err
2467  ac_status=$?
2468  if test -s conftest.err; then
2469    grep -v '^ *+' conftest.err >conftest.er1
2470    cat conftest.er1 >&5
2471    mv -f conftest.er1 conftest.err
2472  fi
2473  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474  test $ac_status = 0; } && {
2475	 test -z "$ac_cxx_werror_flag" ||
2476	 test ! -s conftest.err
2477       } && test -s conftest.$ac_objext; then :
2478  ac_retval=0
2479else
2480  $as_echo "$as_me: failed program was:" >&5
2481sed 's/^/| /' conftest.$ac_ext >&5
2482
2483	ac_retval=1
2484fi
2485  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2486  as_fn_set_status $ac_retval
2487
2488} # ac_fn_cxx_try_compile
2489
2490# ac_fn_c_try_cpp LINENO
2491# ----------------------
2492# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2493ac_fn_c_try_cpp ()
2494{
2495  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496  if { { ac_try="$ac_cpp conftest.$ac_ext"
2497case "(($ac_try" in
2498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499  *) ac_try_echo=$ac_try;;
2500esac
2501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502$as_echo "$ac_try_echo"; } >&5
2503  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2504  ac_status=$?
2505  if test -s conftest.err; then
2506    grep -v '^ *+' conftest.err >conftest.er1
2507    cat conftest.er1 >&5
2508    mv -f conftest.er1 conftest.err
2509  fi
2510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2511  test $ac_status = 0; } > conftest.i && {
2512	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2513	 test ! -s conftest.err
2514       }; then :
2515  ac_retval=0
2516else
2517  $as_echo "$as_me: failed program was:" >&5
2518sed 's/^/| /' conftest.$ac_ext >&5
2519
2520    ac_retval=1
2521fi
2522  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523  as_fn_set_status $ac_retval
2524
2525} # ac_fn_c_try_cpp
2526
2527# ac_fn_cxx_try_cpp LINENO
2528# ------------------------
2529# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2530ac_fn_cxx_try_cpp ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  if { { ac_try="$ac_cpp conftest.$ac_ext"
2534case "(($ac_try" in
2535  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536  *) ac_try_echo=$ac_try;;
2537esac
2538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539$as_echo "$ac_try_echo"; } >&5
2540  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2541  ac_status=$?
2542  if test -s conftest.err; then
2543    grep -v '^ *+' conftest.err >conftest.er1
2544    cat conftest.er1 >&5
2545    mv -f conftest.er1 conftest.err
2546  fi
2547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2548  test $ac_status = 0; } > conftest.i && {
2549	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2550	 test ! -s conftest.err
2551       }; then :
2552  ac_retval=0
2553else
2554  $as_echo "$as_me: failed program was:" >&5
2555sed 's/^/| /' conftest.$ac_ext >&5
2556
2557    ac_retval=1
2558fi
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560  as_fn_set_status $ac_retval
2561
2562} # ac_fn_cxx_try_cpp
2563
2564# ac_fn_c_try_link LINENO
2565# -----------------------
2566# Try to link conftest.$ac_ext, and return whether this succeeded.
2567ac_fn_c_try_link ()
2568{
2569  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570  rm -f conftest.$ac_objext conftest$ac_exeext
2571  if { { ac_try="$ac_link"
2572case "(($ac_try" in
2573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574  *) ac_try_echo=$ac_try;;
2575esac
2576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577$as_echo "$ac_try_echo"; } >&5
2578  (eval "$ac_link") 2>conftest.err
2579  ac_status=$?
2580  if test -s conftest.err; then
2581    grep -v '^ *+' conftest.err >conftest.er1
2582    cat conftest.er1 >&5
2583    mv -f conftest.er1 conftest.err
2584  fi
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; } && {
2587	 test -z "$ac_c_werror_flag" ||
2588	 test ! -s conftest.err
2589       } && test -s conftest$ac_exeext && {
2590	 test "$cross_compiling" = yes ||
2591	 test -x conftest$ac_exeext
2592       }; then :
2593  ac_retval=0
2594else
2595  $as_echo "$as_me: failed program was:" >&5
2596sed 's/^/| /' conftest.$ac_ext >&5
2597
2598	ac_retval=1
2599fi
2600  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2601  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2602  # interfere with the next link command; also delete a directory that is
2603  # left behind by Apple's compiler.  We do this before executing the actions.
2604  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2605  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606  as_fn_set_status $ac_retval
2607
2608} # ac_fn_c_try_link
2609
2610# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2611# ---------------------------------------------------------
2612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2613# the include files in INCLUDES and setting the cache variable VAR
2614# accordingly.
2615ac_fn_cxx_check_header_mongrel ()
2616{
2617  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618  if eval \${$3+:} false; then :
2619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2620$as_echo_n "checking for $2... " >&6; }
2621if eval \${$3+:} false; then :
2622  $as_echo_n "(cached) " >&6
2623fi
2624eval ac_res=\$$3
2625	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626$as_echo "$ac_res" >&6; }
2627else
2628  # Is the header compilable?
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2630$as_echo_n "checking $2 usability... " >&6; }
2631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h.  */
2633$4
2634#include <$2>
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_header_compiler=yes
2638else
2639  ac_header_compiler=no
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2643$as_echo "$ac_header_compiler" >&6; }
2644
2645# Is the header present?
2646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2647$as_echo_n "checking $2 presence... " >&6; }
2648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649/* end confdefs.h.  */
2650#include <$2>
2651_ACEOF
2652if ac_fn_cxx_try_cpp "$LINENO"; then :
2653  ac_header_preproc=yes
2654else
2655  ac_header_preproc=no
2656fi
2657rm -f conftest.err conftest.i conftest.$ac_ext
2658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2659$as_echo "$ac_header_preproc" >&6; }
2660
2661# So?  What about this header?
2662case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2663  yes:no: )
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668    ;;
2669  no:yes:* )
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2673$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2677$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2678    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2680( $as_echo "## ----------------------------------------- ##
2681## Report this to build-dev@openjdk.java.net ##
2682## ----------------------------------------- ##"
2683     ) | sed "s/^/$as_me: WARNING:     /" >&2
2684    ;;
2685esac
2686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2687$as_echo_n "checking for $2... " >&6; }
2688if eval \${$3+:} false; then :
2689  $as_echo_n "(cached) " >&6
2690else
2691  eval "$3=\$ac_header_compiler"
2692fi
2693eval ac_res=\$$3
2694	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695$as_echo "$ac_res" >&6; }
2696fi
2697  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2698
2699} # ac_fn_cxx_check_header_mongrel
2700
2701# ac_fn_cxx_try_run LINENO
2702# ------------------------
2703# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2704# that executables *can* be run.
2705ac_fn_cxx_try_run ()
2706{
2707  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708  if { { ac_try="$ac_link"
2709case "(($ac_try" in
2710  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2711  *) ac_try_echo=$ac_try;;
2712esac
2713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2714$as_echo "$ac_try_echo"; } >&5
2715  (eval "$ac_link") 2>&5
2716  ac_status=$?
2717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2718  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2719  { { case "(($ac_try" in
2720  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2721  *) ac_try_echo=$ac_try;;
2722esac
2723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2724$as_echo "$ac_try_echo"; } >&5
2725  (eval "$ac_try") 2>&5
2726  ac_status=$?
2727  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2728  test $ac_status = 0; }; }; then :
2729  ac_retval=0
2730else
2731  $as_echo "$as_me: program exited with status $ac_status" >&5
2732       $as_echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
2735       ac_retval=$ac_status
2736fi
2737  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739  as_fn_set_status $ac_retval
2740
2741} # ac_fn_cxx_try_run
2742
2743# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2744# ---------------------------------------------------------
2745# Tests whether HEADER exists and can be compiled using the include files in
2746# INCLUDES, setting the cache variable VAR accordingly.
2747ac_fn_cxx_check_header_compile ()
2748{
2749  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2751$as_echo_n "checking for $2... " >&6; }
2752if eval \${$3+:} false; then :
2753  $as_echo_n "(cached) " >&6
2754else
2755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756/* end confdefs.h.  */
2757$4
2758#include <$2>
2759_ACEOF
2760if ac_fn_cxx_try_compile "$LINENO"; then :
2761  eval "$3=yes"
2762else
2763  eval "$3=no"
2764fi
2765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766fi
2767eval ac_res=\$$3
2768	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769$as_echo "$ac_res" >&6; }
2770  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2771
2772} # ac_fn_cxx_check_header_compile
2773
2774# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2775# ----------------------------------------------
2776# Tries to find the compile-time value of EXPR in a program that includes
2777# INCLUDES, setting VAR accordingly. Returns whether the value could be
2778# computed
2779ac_fn_cxx_compute_int ()
2780{
2781  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2782  if test "$cross_compiling" = yes; then
2783    # Depending upon the size, compute the lo and hi bounds.
2784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2785/* end confdefs.h.  */
2786$4
2787int
2788main ()
2789{
2790static int test_array [1 - 2 * !(($2) >= 0)];
2791test_array [0] = 0;
2792return test_array [0];
2793
2794  ;
2795  return 0;
2796}
2797_ACEOF
2798if ac_fn_cxx_try_compile "$LINENO"; then :
2799  ac_lo=0 ac_mid=0
2800  while :; do
2801    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=$ac_mid; break
2817else
2818  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2819			if test $ac_lo -le $ac_mid; then
2820			  ac_lo= ac_hi=
2821			  break
2822			fi
2823			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2824fi
2825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826  done
2827else
2828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829/* end confdefs.h.  */
2830$4
2831int
2832main ()
2833{
2834static int test_array [1 - 2 * !(($2) < 0)];
2835test_array [0] = 0;
2836return test_array [0];
2837
2838  ;
2839  return 0;
2840}
2841_ACEOF
2842if ac_fn_cxx_try_compile "$LINENO"; then :
2843  ac_hi=-1 ac_mid=-1
2844  while :; do
2845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2846/* end confdefs.h.  */
2847$4
2848int
2849main ()
2850{
2851static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2852test_array [0] = 0;
2853return test_array [0];
2854
2855  ;
2856  return 0;
2857}
2858_ACEOF
2859if ac_fn_cxx_try_compile "$LINENO"; then :
2860  ac_lo=$ac_mid; break
2861else
2862  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2863			if test $ac_mid -le $ac_hi; then
2864			  ac_lo= ac_hi=
2865			  break
2866			fi
2867			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870  done
2871else
2872  ac_lo= ac_hi=
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877# Binary search between lo and hi bounds.
2878while test "x$ac_lo" != "x$ac_hi"; do
2879  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881/* end confdefs.h.  */
2882$4
2883int
2884main ()
2885{
2886static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2887test_array [0] = 0;
2888return test_array [0];
2889
2890  ;
2891  return 0;
2892}
2893_ACEOF
2894if ac_fn_cxx_try_compile "$LINENO"; then :
2895  ac_hi=$ac_mid
2896else
2897  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2898fi
2899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900done
2901case $ac_lo in #((
2902?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2903'') ac_retval=1 ;;
2904esac
2905  else
2906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2907/* end confdefs.h.  */
2908$4
2909static long int longval () { return $2; }
2910static unsigned long int ulongval () { return $2; }
2911#include <stdio.h>
2912#include <stdlib.h>
2913int
2914main ()
2915{
2916
2917  FILE *f = fopen ("conftest.val", "w");
2918  if (! f)
2919    return 1;
2920  if (($2) < 0)
2921    {
2922      long int i = longval ();
2923      if (i != ($2))
2924	return 1;
2925      fprintf (f, "%ld", i);
2926    }
2927  else
2928    {
2929      unsigned long int i = ulongval ();
2930      if (i != ($2))
2931	return 1;
2932      fprintf (f, "%lu", i);
2933    }
2934  /* Do not output a trailing newline, as this causes \r\n confusion
2935     on some platforms.  */
2936  return ferror (f) || fclose (f) != 0;
2937
2938  ;
2939  return 0;
2940}
2941_ACEOF
2942if ac_fn_cxx_try_run "$LINENO"; then :
2943  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2944else
2945  ac_retval=1
2946fi
2947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2948  conftest.$ac_objext conftest.beam conftest.$ac_ext
2949rm -f conftest.val
2950
2951  fi
2952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953  as_fn_set_status $ac_retval
2954
2955} # ac_fn_cxx_compute_int
2956
2957# ac_fn_cxx_try_link LINENO
2958# -------------------------
2959# Try to link conftest.$ac_ext, and return whether this succeeded.
2960ac_fn_cxx_try_link ()
2961{
2962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963  rm -f conftest.$ac_objext conftest$ac_exeext
2964  if { { ac_try="$ac_link"
2965case "(($ac_try" in
2966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2967  *) ac_try_echo=$ac_try;;
2968esac
2969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2970$as_echo "$ac_try_echo"; } >&5
2971  (eval "$ac_link") 2>conftest.err
2972  ac_status=$?
2973  if test -s conftest.err; then
2974    grep -v '^ *+' conftest.err >conftest.er1
2975    cat conftest.er1 >&5
2976    mv -f conftest.er1 conftest.err
2977  fi
2978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2979  test $ac_status = 0; } && {
2980	 test -z "$ac_cxx_werror_flag" ||
2981	 test ! -s conftest.err
2982       } && test -s conftest$ac_exeext && {
2983	 test "$cross_compiling" = yes ||
2984	 test -x conftest$ac_exeext
2985       }; then :
2986  ac_retval=0
2987else
2988  $as_echo "$as_me: failed program was:" >&5
2989sed 's/^/| /' conftest.$ac_ext >&5
2990
2991	ac_retval=1
2992fi
2993  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2994  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2995  # interfere with the next link command; also delete a directory that is
2996  # left behind by Apple's compiler.  We do this before executing the actions.
2997  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2998  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2999  as_fn_set_status $ac_retval
3000
3001} # ac_fn_cxx_try_link
3002
3003# ac_fn_cxx_check_func LINENO FUNC VAR
3004# ------------------------------------
3005# Tests whether FUNC exists, setting the cache variable VAR accordingly
3006ac_fn_cxx_check_func ()
3007{
3008  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3010$as_echo_n "checking for $2... " >&6; }
3011if eval \${$3+:} false; then :
3012  $as_echo_n "(cached) " >&6
3013else
3014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015/* end confdefs.h.  */
3016/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3017   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3018#define $2 innocuous_$2
3019
3020/* System header to define __stub macros and hopefully few prototypes,
3021    which can conflict with char $2 (); below.
3022    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3023    <limits.h> exists even on freestanding compilers.  */
3024
3025#ifdef __STDC__
3026# include <limits.h>
3027#else
3028# include <assert.h>
3029#endif
3030
3031#undef $2
3032
3033/* Override any GCC internal prototype to avoid an error.
3034   Use char because int might match the return type of a GCC
3035   builtin and then its argument prototype would still apply.  */
3036#ifdef __cplusplus
3037extern "C"
3038#endif
3039char $2 ();
3040/* The GNU C library defines this for functions which it implements
3041    to always fail with ENOSYS.  Some functions are actually named
3042    something starting with __ and the normal name is an alias.  */
3043#if defined __stub_$2 || defined __stub___$2
3044choke me
3045#endif
3046
3047int
3048main ()
3049{
3050return $2 ();
3051  ;
3052  return 0;
3053}
3054_ACEOF
3055if ac_fn_cxx_try_link "$LINENO"; then :
3056  eval "$3=yes"
3057else
3058  eval "$3=no"
3059fi
3060rm -f core conftest.err conftest.$ac_objext \
3061    conftest$ac_exeext conftest.$ac_ext
3062fi
3063eval ac_res=\$$3
3064	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3065$as_echo "$ac_res" >&6; }
3066  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3067
3068} # ac_fn_cxx_check_func
3069
3070# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3071# -------------------------------------------------------
3072# Tests whether HEADER exists and can be compiled using the include files in
3073# INCLUDES, setting the cache variable VAR accordingly.
3074ac_fn_c_check_header_compile ()
3075{
3076  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3078$as_echo_n "checking for $2... " >&6; }
3079if eval \${$3+:} false; then :
3080  $as_echo_n "(cached) " >&6
3081else
3082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083/* end confdefs.h.  */
3084$4
3085#include <$2>
3086_ACEOF
3087if ac_fn_c_try_compile "$LINENO"; then :
3088  eval "$3=yes"
3089else
3090  eval "$3=no"
3091fi
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093fi
3094eval ac_res=\$$3
3095	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3096$as_echo "$ac_res" >&6; }
3097  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3098
3099} # ac_fn_c_check_header_compile
3100cat >config.log <<_ACEOF
3101This file contains any messages produced by compilers while
3102running configure, to aid debugging if configure makes a mistake.
3103
3104It was created by OpenJDK $as_me jdk9, which was
3105generated by GNU Autoconf 2.69.  Invocation command line was
3106
3107  $ $0 $@
3108
3109_ACEOF
3110exec 5>>config.log
3111{
3112cat <<_ASUNAME
3113## --------- ##
3114## Platform. ##
3115## --------- ##
3116
3117hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3118uname -m = `(uname -m) 2>/dev/null || echo unknown`
3119uname -r = `(uname -r) 2>/dev/null || echo unknown`
3120uname -s = `(uname -s) 2>/dev/null || echo unknown`
3121uname -v = `(uname -v) 2>/dev/null || echo unknown`
3122
3123/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3124/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3125
3126/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3127/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3128/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3129/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3130/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3131/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3132/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3133
3134_ASUNAME
3135
3136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137for as_dir in $PATH
3138do
3139  IFS=$as_save_IFS
3140  test -z "$as_dir" && as_dir=.
3141    $as_echo "PATH: $as_dir"
3142  done
3143IFS=$as_save_IFS
3144
3145} >&5
3146
3147cat >&5 <<_ACEOF
3148
3149
3150## ----------- ##
3151## Core tests. ##
3152## ----------- ##
3153
3154_ACEOF
3155
3156
3157# Keep a trace of the command line.
3158# Strip out --no-create and --no-recursion so they do not pile up.
3159# Strip out --silent because we don't want to record it for future runs.
3160# Also quote any args containing shell meta-characters.
3161# Make two passes to allow for proper duplicate-argument suppression.
3162ac_configure_args=
3163ac_configure_args0=
3164ac_configure_args1=
3165ac_must_keep_next=false
3166for ac_pass in 1 2
3167do
3168  for ac_arg
3169  do
3170    case $ac_arg in
3171    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3172    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3173    | -silent | --silent | --silen | --sile | --sil)
3174      continue ;;
3175    *\'*)
3176      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3177    esac
3178    case $ac_pass in
3179    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3180    2)
3181      as_fn_append ac_configure_args1 " '$ac_arg'"
3182      if test $ac_must_keep_next = true; then
3183	ac_must_keep_next=false # Got value, back to normal.
3184      else
3185	case $ac_arg in
3186	  *=* | --config-cache | -C | -disable-* | --disable-* \
3187	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3188	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3189	  | -with-* | --with-* | -without-* | --without-* | --x)
3190	    case "$ac_configure_args0 " in
3191	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3192	    esac
3193	    ;;
3194	  -* ) ac_must_keep_next=true ;;
3195	esac
3196      fi
3197      as_fn_append ac_configure_args " '$ac_arg'"
3198      ;;
3199    esac
3200  done
3201done
3202{ ac_configure_args0=; unset ac_configure_args0;}
3203{ ac_configure_args1=; unset ac_configure_args1;}
3204
3205# When interrupted or exit'd, cleanup temporary files, and complete
3206# config.log.  We remove comments because anyway the quotes in there
3207# would cause problems or look ugly.
3208# WARNING: Use '\'' to represent an apostrophe within the trap.
3209# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3210trap 'exit_status=$?
3211  # Save into config.log some information that might help in debugging.
3212  {
3213    echo
3214
3215    $as_echo "## ---------------- ##
3216## Cache variables. ##
3217## ---------------- ##"
3218    echo
3219    # The following way of writing the cache mishandles newlines in values,
3220(
3221  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3222    eval ac_val=\$$ac_var
3223    case $ac_val in #(
3224    *${as_nl}*)
3225      case $ac_var in #(
3226      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3227$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3228      esac
3229      case $ac_var in #(
3230      _ | IFS | as_nl) ;; #(
3231      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3232      *) { eval $ac_var=; unset $ac_var;} ;;
3233      esac ;;
3234    esac
3235  done
3236  (set) 2>&1 |
3237    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3238    *${as_nl}ac_space=\ *)
3239      sed -n \
3240	"s/'\''/'\''\\\\'\'''\''/g;
3241	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3242      ;; #(
3243    *)
3244      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3245      ;;
3246    esac |
3247    sort
3248)
3249    echo
3250
3251    $as_echo "## ----------------- ##
3252## Output variables. ##
3253## ----------------- ##"
3254    echo
3255    for ac_var in $ac_subst_vars
3256    do
3257      eval ac_val=\$$ac_var
3258      case $ac_val in
3259      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260      esac
3261      $as_echo "$ac_var='\''$ac_val'\''"
3262    done | sort
3263    echo
3264
3265    if test -n "$ac_subst_files"; then
3266      $as_echo "## ------------------- ##
3267## File substitutions. ##
3268## ------------------- ##"
3269      echo
3270      for ac_var in $ac_subst_files
3271      do
3272	eval ac_val=\$$ac_var
3273	case $ac_val in
3274	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3275	esac
3276	$as_echo "$ac_var='\''$ac_val'\''"
3277      done | sort
3278      echo
3279    fi
3280
3281    if test -s confdefs.h; then
3282      $as_echo "## ----------- ##
3283## confdefs.h. ##
3284## ----------- ##"
3285      echo
3286      cat confdefs.h
3287      echo
3288    fi
3289    test "$ac_signal" != 0 &&
3290      $as_echo "$as_me: caught signal $ac_signal"
3291    $as_echo "$as_me: exit $exit_status"
3292  } >&5
3293  rm -f core *.core core.conftest.* &&
3294    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3295    exit $exit_status
3296' 0
3297for ac_signal in 1 2 13 15; do
3298  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3299done
3300ac_signal=0
3301
3302# confdefs.h avoids OS command line length limits that DEFS can exceed.
3303rm -f -r conftest* confdefs.h
3304
3305$as_echo "/* confdefs.h */" > confdefs.h
3306
3307# Predefined preprocessor variables.
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_NAME "$PACKAGE_NAME"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_VERSION "$PACKAGE_VERSION"
3319_ACEOF
3320
3321cat >>confdefs.h <<_ACEOF
3322#define PACKAGE_STRING "$PACKAGE_STRING"
3323_ACEOF
3324
3325cat >>confdefs.h <<_ACEOF
3326#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3327_ACEOF
3328
3329cat >>confdefs.h <<_ACEOF
3330#define PACKAGE_URL "$PACKAGE_URL"
3331_ACEOF
3332
3333
3334# Let the site file select an alternate cache file if it wants to.
3335# Prefer an explicitly selected file to automatically selected ones.
3336ac_site_file1=NONE
3337ac_site_file2=NONE
3338if test -n "$CONFIG_SITE"; then
3339  # We do not want a PATH search for config.site.
3340  case $CONFIG_SITE in #((
3341    -*)  ac_site_file1=./$CONFIG_SITE;;
3342    */*) ac_site_file1=$CONFIG_SITE;;
3343    *)   ac_site_file1=./$CONFIG_SITE;;
3344  esac
3345elif test "x$prefix" != xNONE; then
3346  ac_site_file1=$prefix/share/config.site
3347  ac_site_file2=$prefix/etc/config.site
3348else
3349  ac_site_file1=$ac_default_prefix/share/config.site
3350  ac_site_file2=$ac_default_prefix/etc/config.site
3351fi
3352for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3353do
3354  test "x$ac_site_file" = xNONE && continue
3355  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3356    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3357$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3358    sed 's/^/| /' "$ac_site_file" >&5
3359    . "$ac_site_file" \
3360      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3362as_fn_error $? "failed to load site script $ac_site_file
3363See \`config.log' for more details" "$LINENO" 5; }
3364  fi
3365done
3366
3367if test -r "$cache_file"; then
3368  # Some versions of bash will fail to source /dev/null (special files
3369  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3370  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3371    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3372$as_echo "$as_me: loading cache $cache_file" >&6;}
3373    case $cache_file in
3374      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3375      *)                      . "./$cache_file";;
3376    esac
3377  fi
3378else
3379  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3380$as_echo "$as_me: creating cache $cache_file" >&6;}
3381  >$cache_file
3382fi
3383
3384# Check that the precious variables saved in the cache have kept the same
3385# value.
3386ac_cache_corrupted=false
3387for ac_var in $ac_precious_vars; do
3388  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3389  eval ac_new_set=\$ac_env_${ac_var}_set
3390  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3391  eval ac_new_val=\$ac_env_${ac_var}_value
3392  case $ac_old_set,$ac_new_set in
3393    set,)
3394      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3395$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3396      ac_cache_corrupted=: ;;
3397    ,set)
3398      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3399$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3400      ac_cache_corrupted=: ;;
3401    ,);;
3402    *)
3403      if test "x$ac_old_val" != "x$ac_new_val"; then
3404	# differences in whitespace do not lead to failure.
3405	ac_old_val_w=`echo x $ac_old_val`
3406	ac_new_val_w=`echo x $ac_new_val`
3407	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3408	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3409$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3410	  ac_cache_corrupted=:
3411	else
3412	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3413$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3414	  eval $ac_var=\$ac_old_val
3415	fi
3416	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3417$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3418	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3419$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3420      fi;;
3421  esac
3422  # Pass precious variables to config.status.
3423  if test "$ac_new_set" = set; then
3424    case $ac_new_val in
3425    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3426    *) ac_arg=$ac_var=$ac_new_val ;;
3427    esac
3428    case " $ac_configure_args " in
3429      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3430      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3431    esac
3432  fi
3433done
3434if $ac_cache_corrupted; then
3435  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3437  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3438$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3439  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3440fi
3441## -------------------- ##
3442## Main body of script. ##
3443## -------------------- ##
3444
3445ac_ext=c
3446ac_cpp='$CPP $CPPFLAGS'
3447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3449ac_compiler_gnu=$ac_cv_c_compiler_gnu
3450
3451
3452
3453ac_aux_dir=
3454for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3455  if test -f "$ac_dir/install-sh"; then
3456    ac_aux_dir=$ac_dir
3457    ac_install_sh="$ac_aux_dir/install-sh -c"
3458    break
3459  elif test -f "$ac_dir/install.sh"; then
3460    ac_aux_dir=$ac_dir
3461    ac_install_sh="$ac_aux_dir/install.sh -c"
3462    break
3463  elif test -f "$ac_dir/shtool"; then
3464    ac_aux_dir=$ac_dir
3465    ac_install_sh="$ac_aux_dir/shtool install -c"
3466    break
3467  fi
3468done
3469if test -z "$ac_aux_dir"; then
3470  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
3471fi
3472
3473# These three variables are undocumented and unsupported,
3474# and are intended to be withdrawn in a future Autoconf release.
3475# They can cause serious problems if a builder's source tree is in a directory
3476# whose full name contains unusual characters.
3477ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3478ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3479ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3480
3481
3482# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3483
3484#
3485# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3486# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3487#
3488# This code is free software; you can redistribute it and/or modify it
3489# under the terms of the GNU General Public License version 2 only, as
3490# published by the Free Software Foundation.  Oracle designates this
3491# particular file as subject to the "Classpath" exception as provided
3492# by Oracle in the LICENSE file that accompanied this code.
3493#
3494# This code is distributed in the hope that it will be useful, but WITHOUT
3495# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3496# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3497# version 2 for more details (a copy is included in the LICENSE file that
3498# accompanied this code).
3499#
3500# You should have received a copy of the GNU General Public License version
3501# 2 along with this work; if not, write to the Free Software Foundation,
3502# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3503#
3504# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3505# or visit www.oracle.com if you need additional information or have any
3506# questions.
3507#
3508
3509#
3510# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3511#
3512# This program is free software; you can redistribute it and/or modify
3513# it under the terms of the GNU General Public License as published by
3514# the Free Software Foundation; either version 2 of the License, or
3515# (at your option) any later version.
3516#
3517# This program is distributed in the hope that it will be useful, but
3518# WITHOUT ANY WARRANTY; without even the implied warranty of
3519# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3520# General Public License for more details.
3521#
3522# You should have received a copy of the GNU General Public License
3523# along with this program; if not, write to the Free Software
3524# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3525#
3526# As a special exception to the GNU General Public License, if you
3527# distribute this file as part of a program that contains a
3528# configuration script generated by Autoconf, you may include it under
3529# the same distribution terms that you use for the rest of that program.
3530
3531# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3532# ----------------------------------
3533# PKG_PROG_PKG_CONFIG
3534
3535# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3536#
3537# Check to see whether a particular set of modules exists.  Similar
3538# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3539#
3540#
3541# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3542# this or PKG_CHECK_MODULES is called, or make sure to call
3543# PKG_CHECK_EXISTS manually
3544# --------------------------------------------------------------
3545
3546
3547
3548# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3549# ---------------------------------------------
3550# _PKG_CONFIG
3551
3552# _PKG_SHORT_ERRORS_SUPPORTED
3553# -----------------------------
3554# _PKG_SHORT_ERRORS_SUPPORTED
3555
3556
3557# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3558# [ACTION-IF-NOT-FOUND])
3559#
3560#
3561# Note that if there is a possibility the first call to
3562# PKG_CHECK_MODULES might not happen, you should be sure to include an
3563# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3564#
3565#
3566# --------------------------------------------------------------
3567# PKG_CHECK_MODULES
3568
3569
3570# Include these first...
3571#
3572# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574#
3575# This code is free software; you can redistribute it and/or modify it
3576# under the terms of the GNU General Public License version 2 only, as
3577# published by the Free Software Foundation.  Oracle designates this
3578# particular file as subject to the "Classpath" exception as provided
3579# by Oracle in the LICENSE file that accompanied this code.
3580#
3581# This code is distributed in the hope that it will be useful, but WITHOUT
3582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584# version 2 for more details (a copy is included in the LICENSE file that
3585# accompanied this code).
3586#
3587# You should have received a copy of the GNU General Public License version
3588# 2 along with this work; if not, write to the Free Software Foundation,
3589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590#
3591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592# or visit www.oracle.com if you need additional information or have any
3593# questions.
3594#
3595
3596# Create a function/macro that takes a series of named arguments. The call is
3597# similar to AC_DEFUN, but the setup of the function looks like this:
3598# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3599# ... do something
3600#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3601# ])
3602# A star (*) in front of a named argument means that it is required and it's
3603# presence will be verified. To pass e.g. the first value as a normal indexed
3604# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3605# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3606# "ARG_FOO".
3607#
3608# The generated function can be called like this:
3609# MYFUNC(FOO: [foo-val],
3610#     BAR: [
3611#         $ECHO hello world
3612#     ])
3613# Note that the argument value must start on the same line as the argument name.
3614#
3615# Argument 1: Name of the function to define
3616# Argument 2: List of legal named arguments, with a * prefix for required arguments
3617# Argument 3: Argument array to treat as named, typically $@
3618# Argument 4: The main function body
3619
3620
3621# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3622# If so, then append $1 to $2 \
3623# Also set JVM_ARG_OK to true/false depending on outcome.
3624
3625
3626# Appends a string to a path variable, only adding the : when needed.
3627
3628
3629# Prepends a string to a path variable, only adding the : when needed.
3630
3631
3632# This will make sure the given variable points to a full and proper
3633# path. This means:
3634# 1) There will be no spaces in the path. On unix platforms,
3635#    spaces in the path will result in an error. On Windows,
3636#    the path will be rewritten using short-style to be space-free.
3637# 2) The path will be absolute, and it will be in unix-style (on
3638#     cygwin).
3639# $1: The name of the variable to fix
3640
3641
3642# This will make sure the given variable points to a executable
3643# with a full and proper path. This means:
3644# 1) There will be no spaces in the path. On unix platforms,
3645#    spaces in the path will result in an error. On Windows,
3646#    the path will be rewritten using short-style to be space-free.
3647# 2) The path will be absolute, and it will be in unix-style (on
3648#     cygwin).
3649# Any arguments given to the executable is preserved.
3650# If the input variable does not have a directory specification, then
3651# it need to be in the PATH.
3652# $1: The name of the variable to fix
3653
3654
3655
3656
3657# Register a --with argument but mark it as deprecated
3658# $1: The name of the with argument to deprecate, not including --with-
3659
3660
3661# Register a --enable argument but mark it as deprecated
3662# $1: The name of the with argument to deprecate, not including --enable-
3663# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3664# $3: Messages to user.
3665
3666
3667
3668
3669# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3670# $1: variable to check
3671
3672
3673# Check that there are no unprocessed overridden variables left.
3674# If so, they are an incorrect argument and we will exit with an error.
3675
3676
3677# Setup a tool for the given variable. If correctly specified by the user,
3678# use that value, otherwise search for the tool using the supplied code snippet.
3679# $1: variable to set
3680# $2: code snippet to call to look for the tool
3681# $3: code snippet to call if variable was used to find tool
3682
3683
3684# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3685# $1: variable to set
3686# $2: executable name (or list of names) to look for
3687# $3: [path]
3688
3689
3690# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693
3694
3695# Like BASIC_PATH_PROGS but fails if no tool was found.
3696# $1: variable to set
3697# $2: executable name (or list of names) to look for
3698# $3: [path]
3699
3700
3701# Like BASIC_SETUP_TOOL but fails if no tool was found.
3702# $1: variable to set
3703# $2: autoconf macro to call to look for the special tool
3704
3705
3706# Setup the most fundamental tools that relies on not much else to set up,
3707# but is used by much of the early bootstrap code.
3708
3709
3710# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3711
3712
3713# Evaluates platform specific overrides for devkit variables.
3714# $1: Name of variable
3715
3716
3717
3718
3719
3720
3721#%%% Simple tools %%%
3722
3723# Check if we have found a usable version of make
3724# $1: the path to a potential make binary (or empty)
3725# $2: the description on how we found this
3726
3727
3728
3729
3730# Goes looking for a usable version of GNU make.
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741# Check if build directory is on local disk. If not possible to determine,
3742# we prefer to claim it's local.
3743# Argument 1: directory to test
3744# Argument 2: what to do if it is on local disk
3745# Argument 3: what to do otherwise (remote disk or failure)
3746
3747
3748# Check that source files have basic read permissions set. This might
3749# not be the case in cygwin in certain conditions.
3750
3751
3752
3753
3754# Check for support for specific options in bash
3755
3756
3757################################################################################
3758#
3759# Default make target
3760#
3761
3762
3763# Code to run after AC_OUTPUT
3764
3765
3766#
3767# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3768# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3769#
3770# This code is free software; you can redistribute it and/or modify it
3771# under the terms of the GNU General Public License version 2 only, as
3772# published by the Free Software Foundation.  Oracle designates this
3773# particular file as subject to the "Classpath" exception as provided
3774# by Oracle in the LICENSE file that accompanied this code.
3775#
3776# This code is distributed in the hope that it will be useful, but WITHOUT
3777# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3778# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3779# version 2 for more details (a copy is included in the LICENSE file that
3780# accompanied this code).
3781#
3782# You should have received a copy of the GNU General Public License version
3783# 2 along with this work; if not, write to the Free Software Foundation,
3784# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3785#
3786# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3787# or visit www.oracle.com if you need additional information or have any
3788# questions.
3789#
3790
3791
3792
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# Helper function which possibly converts a path using DOS-style short mode.
3801# If so, the updated path is stored in $new_path.
3802# $1: The path to check
3803
3804
3805# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3806# and could probably be heavily simplified. However, all changes in this
3807# area tend to need lot of testing in different scenarios, and in lack of
3808# proper unit testing, cleaning this up has not been deemed worth the effort
3809# at the moment.
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3820
3821
3822
3823
3824# ... then the rest
3825#
3826# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828#
3829# This code is free software; you can redistribute it and/or modify it
3830# under the terms of the GNU General Public License version 2 only, as
3831# published by the Free Software Foundation.  Oracle designates this
3832# particular file as subject to the "Classpath" exception as provided
3833# by Oracle in the LICENSE file that accompanied this code.
3834#
3835# This code is distributed in the hope that it will be useful, but WITHOUT
3836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838# version 2 for more details (a copy is included in the LICENSE file that
3839# accompanied this code).
3840#
3841# You should have received a copy of the GNU General Public License version
3842# 2 along with this work; if not, write to the Free Software Foundation,
3843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844#
3845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846# or visit www.oracle.com if you need additional information or have any
3847# questions.
3848#
3849
3850########################################################################
3851# This file handles detection of the Boot JDK. The Boot JDK detection
3852# process has been developed as a response to solve a complex real-world
3853# problem. Initially, it was simple, but it has grown as platform after
3854# platform, idiosyncracy after idiosyncracy has been supported.
3855#
3856# The basic idea is this:
3857# 1) You need an acceptable *) JDK to use as a Boot JDK
3858# 2) There are several ways to locate a JDK, that are mostly platform
3859#    dependent **)
3860# 3) You can have multiple JDKs installed
3861# 4) If possible, configure should try to dig out an acceptable JDK
3862#    automatically, without having to resort to command-line options
3863#
3864# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3865#     javac) and not a JRE, etc.
3866#
3867# **) On Windows we typically use a well-known path.
3868#     On MacOSX we typically use the tool java_home.
3869#     On Linux we typically find javac in the $PATH, and then follow a
3870#     chain of symlinks that often ends up in a real JDK.
3871#
3872# This leads to the code where we check in different ways to locate a
3873# JDK, and if one is found, check if it is acceptable. If not, we print
3874# our reasons for rejecting it (useful when debugging non-working
3875# configure situations) and continue checking the next one.
3876########################################################################
3877
3878# Execute the check given as argument, and verify the result
3879# If the Boot JDK was previously found, do nothing
3880# $1 A command line (typically autoconf macro) to execute
3881
3882
3883# Test: Is bootjdk explicitly set by command line arguments?
3884
3885
3886# Test: Is $JAVA_HOME set?
3887
3888
3889# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3890
3891
3892# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3893# $1: Argument to the java_home binary (optional)
3894
3895
3896# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3897
3898
3899# Look for a jdk in the given path. If there are multiple, try to select the newest.
3900# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3901# $1 = Path to directory containing jdk installations.
3902# $2 = String to append to the found JDK directory to get the proper JDK home
3903
3904
3905# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3906# environmental variable as base for where to look.
3907# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3908
3909
3910# Test: Is there a JDK installed in default, well-known locations?
3911
3912
3913# Check that a command-line tool in the Boot JDK is correct
3914# $1 = name of variable to assign
3915# $2 = name of binary
3916
3917
3918###############################################################################
3919#
3920# We need a Boot JDK to bootstrap the build.
3921#
3922
3923
3924
3925
3926
3927# BUILD_JDK: the location of the latest JDK that can run
3928#   on the host system and supports the target class file version
3929#   generated in this JDK build.  This variable should only be
3930#   used after the launchers are built.
3931#
3932
3933# Execute the check given as argument, and verify the result.
3934# If the JDK was previously found, do nothing.
3935# $1 A command line (typically autoconf macro) to execute
3936
3937
3938# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3939# is different than the host system doing the build (e.g. cross-compilation),
3940# a special BUILD_JDK is built as part of the build process.  An external
3941# prebuilt BUILD_JDK can also be supplied.
3942
3943
3944#
3945# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3946# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3947#
3948# This code is free software; you can redistribute it and/or modify it
3949# under the terms of the GNU General Public License version 2 only, as
3950# published by the Free Software Foundation.  Oracle designates this
3951# particular file as subject to the "Classpath" exception as provided
3952# by Oracle in the LICENSE file that accompanied this code.
3953#
3954# This code is distributed in the hope that it will be useful, but WITHOUT
3955# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3956# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3957# version 2 for more details (a copy is included in the LICENSE file that
3958# accompanied this code).
3959#
3960# You should have received a copy of the GNU General Public License version
3961# 2 along with this work; if not, write to the Free Software Foundation,
3962# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3963#
3964# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3965# or visit www.oracle.com if you need additional information or have any
3966# questions.
3967#
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985################################################################################
3986#
3987# Runs icecc-create-env once and prints the error if it fails
3988#
3989# $1: arguments to icecc-create-env
3990# $2: log file
3991#
3992
3993
3994################################################################################
3995#
3996# Optionally enable distributed compilation of native code using icecc/icecream
3997#
3998
3999
4000
4001
4002
4003
4004
4005#
4006# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4007# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4008#
4009# This code is free software; you can redistribute it and/or modify it
4010# under the terms of the GNU General Public License version 2 only, as
4011# published by the Free Software Foundation.  Oracle designates this
4012# particular file as subject to the "Classpath" exception as provided
4013# by Oracle in the LICENSE file that accompanied this code.
4014#
4015# This code is distributed in the hope that it will be useful, but WITHOUT
4016# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4017# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4018# version 2 for more details (a copy is included in the LICENSE file that
4019# accompanied this code).
4020#
4021# You should have received a copy of the GNU General Public License version
4022# 2 along with this work; if not, write to the Free Software Foundation,
4023# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4024#
4025# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4026# or visit www.oracle.com if you need additional information or have any
4027# questions.
4028#
4029
4030################################################################################
4031#
4032# Setup ABI profile (for arm)
4033#
4034
4035
4036# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4037# corresponding configure arguments instead
4038
4039
4040# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4041# that configure can use them while detecting compilers.
4042# TOOLCHAIN_TYPE is available here.
4043# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4044
4045
4046
4047
4048
4049
4050# Documentation on common flags used for solstudio in HIGHEST.
4051#
4052# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4053#          done with care, there are some assumptions below that need to
4054#          be understood about the use of pointers, and IEEE behavior.
4055#
4056# -fns: Use non-standard floating point mode (not IEEE 754)
4057# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4058# -fsingle: Use single precision floating point with 'float'
4059# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4060#   (Source with excessing pointer casting and data access with mixed
4061#    pointer types are not recommended)
4062# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4063#   (If you expect perfect errno behavior, do not use this)
4064# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4065# -xrestrict: Pointer parameters to functions do not overlap
4066#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4067#    If you pass in multiple pointers to the same data, do not use this)
4068# -xlibmil: Inline some library routines
4069#   (If you expect perfect errno behavior, do not use this)
4070# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4071#   (If you expect perfect errno behavior, do not use this)
4072#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4073
4074    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4075    # Bug?
4076    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4077    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4078    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4079    #fi
4080
4081
4082
4083
4084
4085
4086################################################################################
4087# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4088#      conditionals against.
4089# $2 - Optional prefix for each variable defined.
4090
4091
4092# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4093#                                  IF_FALSE: [RUN-IF-FALSE])
4094# ------------------------------------------------------------
4095# Check that the C compiler supports an argument
4096
4097
4098
4099
4100# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4101#                                    IF_FALSE: [RUN-IF-FALSE])
4102# ------------------------------------------------------------
4103# Check that the C++ compiler supports an argument
4104
4105
4106
4107
4108# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4109#                                IF_FALSE: [RUN-IF-FALSE])
4110# ------------------------------------------------------------
4111# Check that the C and C++ compilers support an argument
4112
4113
4114
4115
4116# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4117#                                   IF_FALSE: [RUN-IF-FALSE])
4118# ------------------------------------------------------------
4119# Check that the linker support an argument
4120
4121
4122
4123
4124
4125
4126# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4127# Arguments:
4128# $1 - Optional prefix for each variable defined.
4129
4130
4131#
4132# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156
4157
4158
4159
4160cygwin_help() {
4161  case $1 in
4162    unzip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    zip)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    make)
4171      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4172      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4173      ;;
4174    freetype)
4175      HELP_MSG="
4176The freetype library can now be build during the configure process.
4177Download the freetype sources and unpack them into an arbitrary directory:
4178
4179wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4180tar -xzf freetype-2.5.3.tar.gz
4181
4182Then run configure with '--with-freetype-src=<freetype_src>'. This will
4183automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4184builds or into '<freetype_src>/lib32' for 32-bit builds.
4185Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4186and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4187
4188Alternatively you can unpack the sources like this to use the default directory:
4189
4190tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4191      ;;
4192  esac
4193}
4194
4195msys_help() {
4196  PKGHANDLER_COMMAND=""
4197}
4198
4199apt_help() {
4200  case $1 in
4201    reduced)
4202      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4203    devkit)
4204      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4205    openjdk)
4206      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4207    alsa)
4208      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4209    cups)
4210      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4211    freetype)
4212      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4213    ffi)
4214      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4215    x11)
4216      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4217    ccache)
4218      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4219    dtrace)
4220      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4221  esac
4222}
4223
4224yum_help() {
4225  case $1 in
4226    devkit)
4227      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4228    openjdk)
4229      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4230    alsa)
4231      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4232    cups)
4233      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4234    freetype)
4235      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4236    x11)
4237      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4238    ccache)
4239      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4240  esac
4241}
4242
4243brew_help() {
4244  case $1 in
4245    openjdk)
4246      PKGHANDLER_COMMAND="brew cask install java" ;;
4247    freetype)
4248      PKGHANDLER_COMMAND="brew install freetype" ;;
4249    ccache)
4250      PKGHANDLER_COMMAND="brew install ccache" ;;
4251  esac
4252}
4253
4254port_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258pkgutil_help() {
4259  PKGHANDLER_COMMAND=""
4260}
4261
4262pkgadd_help() {
4263  PKGHANDLER_COMMAND=""
4264}
4265
4266# This function will check if we're called from the "configure" wrapper while
4267# printing --help. If so, we will print out additional information that can
4268# only be extracted within the autoconf script, and then exit. This must be
4269# called at the very beginning in configure.ac.
4270
4271
4272
4273
4274
4275
4276#
4277# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4279#
4280# This code is free software; you can redistribute it and/or modify it
4281# under the terms of the GNU General Public License version 2 only, as
4282# published by the Free Software Foundation.  Oracle designates this
4283# particular file as subject to the "Classpath" exception as provided
4284# by Oracle in the LICENSE file that accompanied this code.
4285#
4286# This code is distributed in the hope that it will be useful, but WITHOUT
4287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4289# version 2 for more details (a copy is included in the LICENSE file that
4290# accompanied this code).
4291#
4292# You should have received a copy of the GNU General Public License version
4293# 2 along with this work; if not, write to the Free Software Foundation,
4294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4295#
4296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4297# or visit www.oracle.com if you need additional information or have any
4298# questions.
4299#
4300
4301# All valid JVM features, regardless of platform
4302VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4303    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4304    static-build link-time-opt aot"
4305
4306# All valid JVM variants
4307VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4308
4309###############################################################################
4310# Check if the specified JVM variant should be built. To be used in shell if
4311# constructs, like this:
4312# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check if the specified JVM features are explicitly enabled. To be used in
4322# shell if constructs, like this:
4323# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4324#
4325# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4326
4327# Definition kept in one line to allow inlining in if statements.
4328# Additional [] needed to keep m4 from mangling shell constructs.
4329
4330
4331###############################################################################
4332# Check which variants of the JVM that we want to build. Available variants are:
4333#   server: normal interpreter, and a tiered C1/C2 compiler
4334#   client: normal interpreter, and C1 (no C2 compiler)
4335#   minimal: reduced form of client with optional features stripped out
4336#   core: normal interpreter only, no compiler
4337#   zero: C++ based interpreter only, no compiler
4338#   zeroshark: C++ based interpreter, and a llvm-based compiler
4339#   custom: baseline JVM with no default features
4340#
4341
4342
4343###############################################################################
4344# Check if dtrace should be enabled and has all prerequisites present.
4345#
4346
4347
4348################################################################################
4349# Check if AOT should be enabled
4350#
4351
4352
4353################################################################################
4354# Allow to disable CDS
4355#
4356
4357
4358###############################################################################
4359# Set up all JVM features for each JVM variant.
4360#
4361
4362
4363###############################################################################
4364# Validate JVM features once all setup is complete, including custom setup.
4365#
4366
4367
4368################################################################################
4369#
4370# Specify which sources will be used to build the 64-bit ARM port
4371#
4372# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4373# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4374#
4375
4376
4377
4378################################################################################
4379# Check if gtest should be built
4380#
4381
4382
4383#
4384# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4385# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4386#
4387# This code is free software; you can redistribute it and/or modify it
4388# under the terms of the GNU General Public License version 2 only, as
4389# published by the Free Software Foundation.  Oracle designates this
4390# particular file as subject to the "Classpath" exception as provided
4391# by Oracle in the LICENSE file that accompanied this code.
4392#
4393# This code is distributed in the hope that it will be useful, but WITHOUT
4394# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4395# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4396# version 2 for more details (a copy is included in the LICENSE file that
4397# accompanied this code).
4398#
4399# You should have received a copy of the GNU General Public License version
4400# 2 along with this work; if not, write to the Free Software Foundation,
4401# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4402#
4403# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4404# or visit www.oracle.com if you need additional information or have any
4405# questions.
4406#
4407
4408###############################################################################
4409# Check which variant of the JDK that we want to build.
4410# Currently we have:
4411#    normal:   standard edition
4412# but the custom make system may add other variants
4413#
4414# Effectively the JDK variant gives a name to a specific set of
4415# modules to compile into the JDK.
4416
4417
4418###############################################################################
4419# Set the debug level
4420#    release: no debug information, all optimizations, no asserts.
4421#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4422#    fastdebug: debug information (-g), all optimizations, all asserts
4423#    slowdebug: debug information (-g), no optimizations, all asserts
4424
4425
4426###############################################################################
4427#
4428# Should we build only OpenJDK even if closed sources are present?
4429#
4430
4431
4432
4433
4434###############################################################################
4435#
4436# Enable or disable the elliptic curve crypto implementation
4437#
4438
4439
4440
4441
4442################################################################################
4443#
4444# Gcov coverage data for hotspot
4445#
4446
4447
4448################################################################################
4449#
4450# Static build support.  When enabled will generate static
4451# libraries instead of shared libraries for all JDK libs.
4452#
4453
4454
4455################################################################################
4456#
4457# jlink options.
4458# We always keep packaged modules in JDK image.
4459#
4460
4461
4462################################################################################
4463#
4464# Check if building of the jtreg failure handler should be enabled.
4465#
4466
4467
4468################################################################################
4469#
4470# Enable or disable generation of the classlist at build time
4471#
4472
4473
4474#
4475# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477#
4478# This code is free software; you can redistribute it and/or modify it
4479# under the terms of the GNU General Public License version 2 only, as
4480# published by the Free Software Foundation.  Oracle designates this
4481# particular file as subject to the "Classpath" exception as provided
4482# by Oracle in the LICENSE file that accompanied this code.
4483#
4484# This code is distributed in the hope that it will be useful, but WITHOUT
4485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4487# version 2 for more details (a copy is included in the LICENSE file that
4488# accompanied this code).
4489#
4490# You should have received a copy of the GNU General Public License version
4491# 2 along with this work; if not, write to the Free Software Foundation,
4492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493#
4494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495# or visit www.oracle.com if you need additional information or have any
4496# questions.
4497#
4498
4499###############################################################################
4500#
4501# Setup version numbers
4502#
4503
4504# Verify that a given string represents a valid version number, and assign it
4505# to a variable.
4506
4507# Argument 1: the variable to assign to
4508# Argument 2: the value given by the user
4509
4510
4511
4512
4513#
4514# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4515# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4516#
4517# This code is free software; you can redistribute it and/or modify it
4518# under the terms of the GNU General Public License version 2 only, as
4519# published by the Free Software Foundation.  Oracle designates this
4520# particular file as subject to the "Classpath" exception as provided
4521# by Oracle in the LICENSE file that accompanied this code.
4522#
4523# This code is distributed in the hope that it will be useful, but WITHOUT
4524# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4525# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4526# version 2 for more details (a copy is included in the LICENSE file that
4527# accompanied this code).
4528#
4529# You should have received a copy of the GNU General Public License version
4530# 2 along with this work; if not, write to the Free Software Foundation,
4531# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4532#
4533# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4534# or visit www.oracle.com if you need additional information or have any
4535# questions.
4536#
4537
4538# Major library component reside in separate files.
4539#
4540# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4542#
4543# This code is free software; you can redistribute it and/or modify it
4544# under the terms of the GNU General Public License version 2 only, as
4545# published by the Free Software Foundation.  Oracle designates this
4546# particular file as subject to the "Classpath" exception as provided
4547# by Oracle in the LICENSE file that accompanied this code.
4548#
4549# This code is distributed in the hope that it will be useful, but WITHOUT
4550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4552# version 2 for more details (a copy is included in the LICENSE file that
4553# accompanied this code).
4554#
4555# You should have received a copy of the GNU General Public License version
4556# 2 along with this work; if not, write to the Free Software Foundation,
4557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4558#
4559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4560# or visit www.oracle.com if you need additional information or have any
4561# questions.
4562#
4563
4564################################################################################
4565# Setup alsa (Advanced Linux Sound Architecture)
4566################################################################################
4567
4568
4569#
4570# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4572#
4573# This code is free software; you can redistribute it and/or modify it
4574# under the terms of the GNU General Public License version 2 only, as
4575# published by the Free Software Foundation.  Oracle designates this
4576# particular file as subject to the "Classpath" exception as provided
4577# by Oracle in the LICENSE file that accompanied this code.
4578#
4579# This code is distributed in the hope that it will be useful, but WITHOUT
4580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4582# version 2 for more details (a copy is included in the LICENSE file that
4583# accompanied this code).
4584#
4585# You should have received a copy of the GNU General Public License version
4586# 2 along with this work; if not, write to the Free Software Foundation,
4587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4588#
4589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4590# or visit www.oracle.com if you need additional information or have any
4591# questions.
4592#
4593
4594################################################################################
4595# Setup bundled libraries.
4596#
4597# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4598# OpenJDK repository. Default is to use these libraries as bundled, but they
4599# might be replaced by en external version by the user.
4600################################################################################
4601
4602
4603################################################################################
4604# Setup libjpeg
4605################################################################################
4606
4607
4608################################################################################
4609# Setup giflib
4610################################################################################
4611
4612
4613################################################################################
4614# Setup libpng
4615################################################################################
4616
4617
4618################################################################################
4619# Setup zlib
4620################################################################################
4621
4622
4623################################################################################
4624# Setup lcms (Little CMS)
4625################################################################################
4626
4627
4628#
4629# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4630# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4631#
4632# This code is free software; you can redistribute it and/or modify it
4633# under the terms of the GNU General Public License version 2 only, as
4634# published by the Free Software Foundation.  Oracle designates this
4635# particular file as subject to the "Classpath" exception as provided
4636# by Oracle in the LICENSE file that accompanied this code.
4637#
4638# This code is distributed in the hope that it will be useful, but WITHOUT
4639# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4640# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4641# version 2 for more details (a copy is included in the LICENSE file that
4642# accompanied this code).
4643#
4644# You should have received a copy of the GNU General Public License version
4645# 2 along with this work; if not, write to the Free Software Foundation,
4646# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4647#
4648# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4649# or visit www.oracle.com if you need additional information or have any
4650# questions.
4651#
4652
4653################################################################################
4654# Setup cups (Common Unix Printing System)
4655################################################################################
4656
4657
4658#
4659# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4660# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4661#
4662# This code is free software; you can redistribute it and/or modify it
4663# under the terms of the GNU General Public License version 2 only, as
4664# published by the Free Software Foundation.  Oracle designates this
4665# particular file as subject to the "Classpath" exception as provided
4666# by Oracle in the LICENSE file that accompanied this code.
4667#
4668# This code is distributed in the hope that it will be useful, but WITHOUT
4669# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4670# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4671# version 2 for more details (a copy is included in the LICENSE file that
4672# accompanied this code).
4673#
4674# You should have received a copy of the GNU General Public License version
4675# 2 along with this work; if not, write to the Free Software Foundation,
4676# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4677#
4678# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4679# or visit www.oracle.com if you need additional information or have any
4680# questions.
4681#
4682
4683################################################################################
4684# Setup libffi (Foreign Function Interface)
4685################################################################################
4686
4687
4688#
4689# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4691#
4692# This code is free software; you can redistribute it and/or modify it
4693# under the terms of the GNU General Public License version 2 only, as
4694# published by the Free Software Foundation.  Oracle designates this
4695# particular file as subject to the "Classpath" exception as provided
4696# by Oracle in the LICENSE file that accompanied this code.
4697#
4698# This code is distributed in the hope that it will be useful, but WITHOUT
4699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4701# version 2 for more details (a copy is included in the LICENSE file that
4702# accompanied this code).
4703#
4704# You should have received a copy of the GNU General Public License version
4705# 2 along with this work; if not, write to the Free Software Foundation,
4706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4707#
4708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4709# or visit www.oracle.com if you need additional information or have any
4710# questions.
4711#
4712
4713################################################################################
4714# Build the freetype lib from source
4715################################################################################
4716
4717
4718################################################################################
4719# Check if a potential freeype library match is correct and usable
4720################################################################################
4721
4722
4723################################################################################
4724# Setup freetype (The FreeType2 font rendering library)
4725################################################################################
4726
4727
4728#
4729# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4730# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4731#
4732# This code is free software; you can redistribute it and/or modify it
4733# under the terms of the GNU General Public License version 2 only, as
4734# published by the Free Software Foundation.  Oracle designates this
4735# particular file as subject to the "Classpath" exception as provided
4736# by Oracle in the LICENSE file that accompanied this code.
4737#
4738# This code is distributed in the hope that it will be useful, but WITHOUT
4739# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4740# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4741# version 2 for more details (a copy is included in the LICENSE file that
4742# accompanied this code).
4743#
4744# You should have received a copy of the GNU General Public License version
4745# 2 along with this work; if not, write to the Free Software Foundation,
4746# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4747#
4748# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4749# or visit www.oracle.com if you need additional information or have any
4750# questions.
4751#
4752
4753################################################################################
4754# Setup the standard C/C++ runtime libraries.
4755#
4756# Most importantly, determine if stdc++ should be linked statically or
4757# dynamically.
4758################################################################################
4759
4760
4761#
4762# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4764#
4765# This code is free software; you can redistribute it and/or modify it
4766# under the terms of the GNU General Public License version 2 only, as
4767# published by the Free Software Foundation.  Oracle designates this
4768# particular file as subject to the "Classpath" exception as provided
4769# by Oracle in the LICENSE file that accompanied this code.
4770#
4771# This code is distributed in the hope that it will be useful, but WITHOUT
4772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4774# version 2 for more details (a copy is included in the LICENSE file that
4775# accompanied this code).
4776#
4777# You should have received a copy of the GNU General Public License version
4778# 2 along with this work; if not, write to the Free Software Foundation,
4779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4780#
4781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4782# or visit www.oracle.com if you need additional information or have any
4783# questions.
4784#
4785
4786################################################################################
4787# Setup X11 Windows system
4788################################################################################
4789
4790
4791
4792################################################################################
4793# Determine which libraries are needed for this configuration
4794################################################################################
4795
4796
4797################################################################################
4798# Parse library options, and setup needed libraries
4799################################################################################
4800
4801
4802################################################################################
4803# Setup llvm (Low-Level VM)
4804################################################################################
4805
4806
4807################################################################################
4808# Setup various libraries, typically small system libraries
4809################################################################################
4810
4811
4812################################################################################
4813# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4814# redistribute it in the test image.
4815################################################################################
4816
4817
4818
4819#
4820# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4822#
4823# This code is free software; you can redistribute it and/or modify it
4824# under the terms of the GNU General Public License version 2 only, as
4825# published by the Free Software Foundation.  Oracle designates this
4826# particular file as subject to the "Classpath" exception as provided
4827# by Oracle in the LICENSE file that accompanied this code.
4828#
4829# This code is distributed in the hope that it will be useful, but WITHOUT
4830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4832# version 2 for more details (a copy is included in the LICENSE file that
4833# accompanied this code).
4834#
4835# You should have received a copy of the GNU General Public License version
4836# 2 along with this work; if not, write to the Free Software Foundation,
4837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4838#
4839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4840# or visit www.oracle.com if you need additional information or have any
4841# questions.
4842#
4843
4844# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4845# Converts autoconf style CPU name to OpenJDK style, into
4846# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4847
4848
4849# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4850# Converts autoconf style OS name to OpenJDK style, into
4851# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4852
4853
4854# Expects $host_os $host_cpu $build_os and $build_cpu
4855# and $with_target_bits to have been setup!
4856#
4857# Translate the standard triplet(quadruplet) definition
4858# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4859# OPENJDK_BUILD_OS, etc.
4860
4861
4862# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4863# accordingly. Must be done after setting up build and target system, but before
4864# doing anything else with these values.
4865
4866
4867# Setup the legacy variables, for controlling the old makefiles.
4868#
4869
4870
4871# $1 - Either TARGET or BUILD to setup the variables for.
4872
4873
4874
4875
4876
4877
4878#%%% Build and target systems %%%
4879
4880
4881
4882
4883# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4884# Add -mX to various FLAGS variables.
4885
4886
4887
4888
4889
4890
4891#
4892# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4893# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4894#
4895# This code is free software; you can redistribute it and/or modify it
4896# under the terms of the GNU General Public License version 2 only, as
4897# published by the Free Software Foundation.  Oracle designates this
4898# particular file as subject to the "Classpath" exception as provided
4899# by Oracle in the LICENSE file that accompanied this code.
4900#
4901# This code is distributed in the hope that it will be useful, but WITHOUT
4902# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4903# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4904# version 2 for more details (a copy is included in the LICENSE file that
4905# accompanied this code).
4906#
4907# You should have received a copy of the GNU General Public License version
4908# 2 along with this work; if not, write to the Free Software Foundation,
4909# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4910#
4911# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4912# or visit www.oracle.com if you need additional information or have any
4913# questions.
4914#
4915
4916
4917
4918
4919
4920
4921
4922################################################################################
4923# Define a mechanism for importing extra prebuilt modules
4924#
4925
4926
4927
4928#
4929# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4930# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4931#
4932# This code is free software; you can redistribute it and/or modify it
4933# under the terms of the GNU General Public License version 2 only, as
4934# published by the Free Software Foundation.  Oracle designates this
4935# particular file as subject to the "Classpath" exception as provided
4936# by Oracle in the LICENSE file that accompanied this code.
4937#
4938# This code is distributed in the hope that it will be useful, but WITHOUT
4939# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4940# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4941# version 2 for more details (a copy is included in the LICENSE file that
4942# accompanied this code).
4943#
4944# You should have received a copy of the GNU General Public License version
4945# 2 along with this work; if not, write to the Free Software Foundation,
4946# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4947#
4948# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4949# or visit www.oracle.com if you need additional information or have any
4950# questions.
4951#
4952
4953########################################################################
4954# This file is responsible for detecting, verifying and setting up the
4955# toolchain, i.e. the compiler, linker and related utilities. It will setup
4956# proper paths to the binaries, but it will not setup any flags.
4957#
4958# The binaries used is determined by the toolchain type, which is the family of
4959# compilers and related tools that are used.
4960########################################################################
4961
4962
4963# All valid toolchains, regardless of platform (used by help.m4)
4964VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4965
4966# These toolchains are valid on different platforms
4967VALID_TOOLCHAINS_linux="gcc clang"
4968VALID_TOOLCHAINS_solaris="solstudio"
4969VALID_TOOLCHAINS_macosx="gcc clang"
4970VALID_TOOLCHAINS_aix="xlc"
4971VALID_TOOLCHAINS_windows="microsoft"
4972
4973# Toolchain descriptions
4974TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4975TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4976TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4977TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4978TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4979
4980# Minimum supported versions, empty means unspecified
4981TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4982TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4983TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4984TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4985TOOLCHAIN_MINIMUM_VERSION_xlc=""
4986
4987# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4988# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4989# $1 - optional variable prefix for compiler and version variables (BUILD_)
4990# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4991
4992
4993# Check if the configured compiler (C and C++) is of a specific version or
4994# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4995#
4996# Arguments:
4997#   VERSION:   The version string to check against the found version
4998#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4999#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5000#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5001
5002
5003
5004
5005# Setup a number of variables describing how native output files are
5006# named on this platform/toolchain.
5007
5008
5009# Determine which toolchain type to use, and make sure it is valid for this
5010# platform. Setup various information about the selected toolchain.
5011
5012
5013# Before we start detecting the toolchain executables, we might need some
5014# special setup, e.g. additional paths etc.
5015
5016
5017# Restore path, etc
5018
5019
5020# Check if a compiler is of the toolchain type we expect, and save the version
5021# information from it. If the compiler does not match the expected type,
5022# this function will abort using AC_MSG_ERROR. If it matches, the version will
5023# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5024# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5025#
5026# $1 = compiler to test (CC or CXX)
5027# $2 = human readable name of compiler (C or C++)
5028
5029
5030# Try to locate the given C or C++ compiler in the path, or otherwise.
5031#
5032# $1 = compiler to test (CC or CXX)
5033# $2 = human readable name of compiler (C or C++)
5034# $3 = compiler name to search for
5035
5036
5037# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5038# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5039# archiver (AR). Verify that the compilers are correct according to the
5040# toolchain type.
5041
5042
5043# Setup additional tools that is considered a part of the toolchain, but not the
5044# core part. Many of these are highly platform-specific and do not exist,
5045# and/or are not needed on all platforms.
5046
5047
5048# Setup the build tools (i.e, the compiler and linker used to build programs
5049# that should be run on the build platform, not the target platform, as a build
5050# helper). Since the non-cross-compile case uses the normal, target compilers
5051# for this, we can only do this after these have been setup.
5052
5053
5054# Do some additional checks on the detected tools.
5055
5056
5057# Setup the JTReg Regression Test Harness.
5058
5059
5060# Setup the JIB dependency resolver
5061
5062
5063#
5064# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5066#
5067# This code is free software; you can redistribute it and/or modify it
5068# under the terms of the GNU General Public License version 2 only, as
5069# published by the Free Software Foundation.  Oracle designates this
5070# particular file as subject to the "Classpath" exception as provided
5071# by Oracle in the LICENSE file that accompanied this code.
5072#
5073# This code is distributed in the hope that it will be useful, but WITHOUT
5074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5076# version 2 for more details (a copy is included in the LICENSE file that
5077# accompanied this code).
5078#
5079# You should have received a copy of the GNU General Public License version
5080# 2 along with this work; if not, write to the Free Software Foundation,
5081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5082#
5083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5084# or visit www.oracle.com if you need additional information or have any
5085# questions.
5086#
5087
5088################################################################################
5089# The order of these defines the priority by which we try to find them.
5090VALID_VS_VERSIONS="2013 2012 2010"
5091
5092VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5093VS_VERSION_INTERNAL_2010=100
5094VS_MSVCR_2010=msvcr100.dll
5095# We don't use msvcp on Visual Studio 2010
5096#VS_MSVCP_2010=msvcp100.dll
5097VS_ENVVAR_2010="VS100COMNTOOLS"
5098VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5099VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5100VS_VS_PLATFORM_NAME_2010="v100"
5101VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5102
5103VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5104VS_VERSION_INTERNAL_2012=110
5105VS_MSVCR_2012=msvcr110.dll
5106VS_MSVCP_2012=msvcp110.dll
5107VS_ENVVAR_2012="VS110COMNTOOLS"
5108VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5109VS_SDK_INSTALLDIR_2012=
5110VS_VS_PLATFORM_NAME_2012="v110"
5111VS_SDK_PLATFORM_NAME_2012=
5112
5113VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5114VS_VERSION_INTERNAL_2013=120
5115VS_MSVCR_2013=msvcr120.dll
5116VS_MSVCP_2013=msvcp120.dll
5117VS_ENVVAR_2013="VS120COMNTOOLS"
5118VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5119VS_SDK_INSTALLDIR_2013=
5120VS_VS_PLATFORM_NAME_2013="v120"
5121VS_SDK_PLATFORM_NAME_2013=
5122
5123################################################################################
5124
5125
5126
5127################################################################################
5128
5129
5130
5131################################################################################
5132# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5133# build environment and assigns it to VS_ENV_CMD
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Check if the VS env variables were setup prior to running configure.
5142# If not, then find vcvarsall.bat and run it automatically, and integrate
5143# the set env variables into the spec file.
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158# This line needs to be here, verbatim, after all includes and the dummy hook
5159# definitions. It is replaced with custom functionality when building
5160# custom sources.
5161#CUSTOM_AUTOCONF_INCLUDE
5162
5163# Do not change or remove the following line, it is needed for consistency checks:
5164DATE_WHEN_GENERATED=1504214237
5165
5166###############################################################################
5167#
5168# Initialization / Boot-strapping
5169#
5170# The bootstrapping process needs to solve the "chicken or the egg" problem,
5171# thus it jumps back and forth, each time gaining something needed later on.
5172#
5173###############################################################################
5174
5175# If we are requested to print additional help, do that and then exit.
5176# This must be the very first call.
5177
5178  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5179
5180    # Print available toolchains
5181    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5182    $PRINTF "Which are valid to use depends on the build platform.\n"
5183    for toolchain in $VALID_TOOLCHAINS_all; do
5184      # Use indirect variable referencing
5185      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5186      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5187      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5188    done
5189    $PRINTF "\n"
5190
5191    # Print available jvm features
5192    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5193    $PRINTF "Which are valid to use depends on the target platform.\n  "
5194    $PRINTF "%s " $VALID_JVM_FEATURES
5195    $PRINTF "\n"
5196
5197    # And now exit directly
5198    exit 0
5199  fi
5200
5201
5202# Basic initialization that must happen first of all in the normal process.
5203
5204  # Save the original command line. This is passed to us by the wrapper configure script.
5205
5206  # Save the path variable before it gets changed
5207  ORIGINAL_PATH="$PATH"
5208
5209  DATE_WHEN_CONFIGURED=`LANG=C date`
5210
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5212$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5214$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5215
5216
5217  # Start with tools that do not need have cross compilation support
5218  # and can be expected to be found in the default PATH. These tools are
5219  # used by configure.
5220
5221  # First are all the simple required tools.
5222
5223
5224
5225  # Publish this variable in the help.
5226
5227
5228  if [ -z "${BASENAME+x}" ]; then
5229    # The variable is not set by user, try to locate tool using the code snippet
5230    for ac_prog in basename
5231do
5232  # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5235$as_echo_n "checking for $ac_word... " >&6; }
5236if ${ac_cv_path_BASENAME+:} false; then :
5237  $as_echo_n "(cached) " >&6
5238else
5239  case $BASENAME in
5240  [\\/]* | ?:[\\/]*)
5241  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5242  ;;
5243  *)
5244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247  IFS=$as_save_IFS
5248  test -z "$as_dir" && as_dir=.
5249    for ac_exec_ext in '' $ac_executable_extensions; do
5250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5251    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253    break 2
5254  fi
5255done
5256  done
5257IFS=$as_save_IFS
5258
5259  ;;
5260esac
5261fi
5262BASENAME=$ac_cv_path_BASENAME
5263if test -n "$BASENAME"; then
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5265$as_echo "$BASENAME" >&6; }
5266else
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
5272  test -n "$BASENAME" && break
5273done
5274
5275  else
5276    # The variable is set, but is it from the command line or the environment?
5277
5278    # Try to remove the string !BASENAME! from our list.
5279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5281      # If it failed, the variable was not from the command line. Ignore it,
5282      # but warn the user (except for BASH, which is always set by the calling BASH).
5283      if test "xBASENAME" != xBASH; then
5284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5285$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5286      fi
5287      # Try to locate tool using the code snippet
5288      for ac_prog in basename
5289do
5290  # Extract the first word of "$ac_prog", so it can be a program name with args.
5291set dummy $ac_prog; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330  test -n "$BASENAME" && break
5331done
5332
5333    else
5334      # If it succeeded, then it was overridden by the user. We will use it
5335      # for the tool.
5336
5337      # First remove it from the list of overridden variables, so we can test
5338      # for unknown variables in the end.
5339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5340
5341      # Check if we try to supply an empty value
5342      if test "x$BASENAME" = x; then
5343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5344$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5346$as_echo_n "checking for BASENAME... " >&6; }
5347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5348$as_echo "disabled" >&6; }
5349      else
5350        # Check if the provided tool contains a complete path.
5351        tool_specified="$BASENAME"
5352        tool_basename="${tool_specified##*/}"
5353        if test "x$tool_basename" = "x$tool_specified"; then
5354          # A command without a complete path is provided, search $PATH.
5355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5356$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5357          # Extract the first word of "$tool_basename", so it can be a program name with args.
5358set dummy $tool_basename; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASENAME+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASENAME in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASENAME=$ac_cv_path_BASENAME
5388if test -n "$BASENAME"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5390$as_echo "$BASENAME" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397          if test "x$BASENAME" = x; then
5398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5399          fi
5400        else
5401          # Otherwise we believe it is a complete path. Use it as it is.
5402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5403$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5405$as_echo_n "checking for BASENAME... " >&6; }
5406          if test ! -x "$tool_specified"; then
5407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5408$as_echo "not found" >&6; }
5409            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5410          fi
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5412$as_echo "$tool_specified" >&6; }
5413        fi
5414      fi
5415    fi
5416
5417  fi
5418
5419
5420
5421  if test "x$BASENAME" = x; then
5422    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5423  fi
5424
5425
5426
5427
5428
5429  # Publish this variable in the help.
5430
5431
5432  if [ -z "${BASH+x}" ]; then
5433    # The variable is not set by user, try to locate tool using the code snippet
5434    for ac_prog in bash
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_BASH+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $BASH in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466BASH=$ac_cv_path_BASH
5467if test -n "$BASH"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5469$as_echo "$BASH" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$BASH" && break
5477done
5478
5479  else
5480    # The variable is set, but is it from the command line or the environment?
5481
5482    # Try to remove the string !BASH! from our list.
5483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5485      # If it failed, the variable was not from the command line. Ignore it,
5486      # but warn the user (except for BASH, which is always set by the calling BASH).
5487      if test "xBASH" != xBASH; then
5488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5489$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5490      fi
5491      # Try to locate tool using the code snippet
5492      for ac_prog in bash
5493do
5494  # Extract the first word of "$ac_prog", so it can be a program name with args.
5495set dummy $ac_prog; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534  test -n "$BASH" && break
5535done
5536
5537    else
5538      # If it succeeded, then it was overridden by the user. We will use it
5539      # for the tool.
5540
5541      # First remove it from the list of overridden variables, so we can test
5542      # for unknown variables in the end.
5543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5544
5545      # Check if we try to supply an empty value
5546      if test "x$BASH" = x; then
5547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5548$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5550$as_echo_n "checking for BASH... " >&6; }
5551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5552$as_echo "disabled" >&6; }
5553      else
5554        # Check if the provided tool contains a complete path.
5555        tool_specified="$BASH"
5556        tool_basename="${tool_specified##*/}"
5557        if test "x$tool_basename" = "x$tool_specified"; then
5558          # A command without a complete path is provided, search $PATH.
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5560$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5561          # Extract the first word of "$tool_basename", so it can be a program name with args.
5562set dummy $tool_basename; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_BASH+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $BASH in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591BASH=$ac_cv_path_BASH
5592if test -n "$BASH"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5594$as_echo "$BASH" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601          if test "x$BASH" = x; then
5602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5603          fi
5604        else
5605          # Otherwise we believe it is a complete path. Use it as it is.
5606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5607$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5609$as_echo_n "checking for BASH... " >&6; }
5610          if test ! -x "$tool_specified"; then
5611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5612$as_echo "not found" >&6; }
5613            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5614          fi
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5616$as_echo "$tool_specified" >&6; }
5617        fi
5618      fi
5619    fi
5620
5621  fi
5622
5623
5624
5625  if test "x$BASH" = x; then
5626    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5627  fi
5628
5629
5630
5631
5632
5633  # Publish this variable in the help.
5634
5635
5636  if [ -z "${CAT+x}" ]; then
5637    # The variable is not set by user, try to locate tool using the code snippet
5638    for ac_prog in cat
5639do
5640  # Extract the first word of "$ac_prog", so it can be a program name with args.
5641set dummy $ac_prog; ac_word=$2
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
5644if ${ac_cv_path_CAT+:} false; then :
5645  $as_echo_n "(cached) " >&6
5646else
5647  case $CAT in
5648  [\\/]* | ?:[\\/]*)
5649  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5650  ;;
5651  *)
5652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655  IFS=$as_save_IFS
5656  test -z "$as_dir" && as_dir=.
5657    for ac_exec_ext in '' $ac_executable_extensions; do
5658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661    break 2
5662  fi
5663done
5664  done
5665IFS=$as_save_IFS
5666
5667  ;;
5668esac
5669fi
5670CAT=$ac_cv_path_CAT
5671if test -n "$CAT"; then
5672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5673$as_echo "$CAT" >&6; }
5674else
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680  test -n "$CAT" && break
5681done
5682
5683  else
5684    # The variable is set, but is it from the command line or the environment?
5685
5686    # Try to remove the string !CAT! from our list.
5687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5689      # If it failed, the variable was not from the command line. Ignore it,
5690      # but warn the user (except for BASH, which is always set by the calling BASH).
5691      if test "xCAT" != xBASH; then
5692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5693$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5694      fi
5695      # Try to locate tool using the code snippet
5696      for ac_prog in cat
5697do
5698  # Extract the first word of "$ac_prog", so it can be a program name with args.
5699set dummy $ac_prog; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738  test -n "$CAT" && break
5739done
5740
5741    else
5742      # If it succeeded, then it was overridden by the user. We will use it
5743      # for the tool.
5744
5745      # First remove it from the list of overridden variables, so we can test
5746      # for unknown variables in the end.
5747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5748
5749      # Check if we try to supply an empty value
5750      if test "x$CAT" = x; then
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5752$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5754$as_echo_n "checking for CAT... " >&6; }
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5756$as_echo "disabled" >&6; }
5757      else
5758        # Check if the provided tool contains a complete path.
5759        tool_specified="$CAT"
5760        tool_basename="${tool_specified##*/}"
5761        if test "x$tool_basename" = "x$tool_specified"; then
5762          # A command without a complete path is provided, search $PATH.
5763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5764$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5765          # Extract the first word of "$tool_basename", so it can be a program name with args.
5766set dummy $tool_basename; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CAT+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CAT in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CAT=$ac_cv_path_CAT
5796if test -n "$CAT"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5798$as_echo "$CAT" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805          if test "x$CAT" = x; then
5806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5807          fi
5808        else
5809          # Otherwise we believe it is a complete path. Use it as it is.
5810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5811$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5813$as_echo_n "checking for CAT... " >&6; }
5814          if test ! -x "$tool_specified"; then
5815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5816$as_echo "not found" >&6; }
5817            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5818          fi
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5820$as_echo "$tool_specified" >&6; }
5821        fi
5822      fi
5823    fi
5824
5825  fi
5826
5827
5828
5829  if test "x$CAT" = x; then
5830    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5831  fi
5832
5833
5834
5835
5836
5837  # Publish this variable in the help.
5838
5839
5840  if [ -z "${CHMOD+x}" ]; then
5841    # The variable is not set by user, try to locate tool using the code snippet
5842    for ac_prog in chmod
5843do
5844  # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_path_CHMOD+:} false; then :
5849  $as_echo_n "(cached) " >&6
5850else
5851  case $CHMOD in
5852  [\\/]* | ?:[\\/]*)
5853  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5854  ;;
5855  *)
5856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859  IFS=$as_save_IFS
5860  test -z "$as_dir" && as_dir=.
5861    for ac_exec_ext in '' $ac_executable_extensions; do
5862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5863    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865    break 2
5866  fi
5867done
5868  done
5869IFS=$as_save_IFS
5870
5871  ;;
5872esac
5873fi
5874CHMOD=$ac_cv_path_CHMOD
5875if test -n "$CHMOD"; then
5876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5877$as_echo "$CHMOD" >&6; }
5878else
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884  test -n "$CHMOD" && break
5885done
5886
5887  else
5888    # The variable is set, but is it from the command line or the environment?
5889
5890    # Try to remove the string !CHMOD! from our list.
5891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5893      # If it failed, the variable was not from the command line. Ignore it,
5894      # but warn the user (except for BASH, which is always set by the calling BASH).
5895      if test "xCHMOD" != xBASH; then
5896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5897$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5898      fi
5899      # Try to locate tool using the code snippet
5900      for ac_prog in chmod
5901do
5902  # Extract the first word of "$ac_prog", so it can be a program name with args.
5903set dummy $ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942  test -n "$CHMOD" && break
5943done
5944
5945    else
5946      # If it succeeded, then it was overridden by the user. We will use it
5947      # for the tool.
5948
5949      # First remove it from the list of overridden variables, so we can test
5950      # for unknown variables in the end.
5951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5952
5953      # Check if we try to supply an empty value
5954      if test "x$CHMOD" = x; then
5955        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5956$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5958$as_echo_n "checking for CHMOD... " >&6; }
5959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5960$as_echo "disabled" >&6; }
5961      else
5962        # Check if the provided tool contains a complete path.
5963        tool_specified="$CHMOD"
5964        tool_basename="${tool_specified##*/}"
5965        if test "x$tool_basename" = "x$tool_specified"; then
5966          # A command without a complete path is provided, search $PATH.
5967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5969          # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CHMOD+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CHMOD in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CHMOD=$ac_cv_path_CHMOD
6000if test -n "$CHMOD"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6002$as_echo "$CHMOD" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009          if test "x$CHMOD" = x; then
6010            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011          fi
6012        else
6013          # Otherwise we believe it is a complete path. Use it as it is.
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6016          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6017$as_echo_n "checking for CHMOD... " >&6; }
6018          if test ! -x "$tool_specified"; then
6019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6022          fi
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025        fi
6026      fi
6027    fi
6028
6029  fi
6030
6031
6032
6033  if test "x$CHMOD" = x; then
6034    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6035  fi
6036
6037
6038
6039
6040
6041  # Publish this variable in the help.
6042
6043
6044  if [ -z "${CMP+x}" ]; then
6045    # The variable is not set by user, try to locate tool using the code snippet
6046    for ac_prog in cmp
6047do
6048  # Extract the first word of "$ac_prog", so it can be a program name with args.
6049set dummy $ac_prog; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
6052if ${ac_cv_path_CMP+:} false; then :
6053  $as_echo_n "(cached) " >&6
6054else
6055  case $CMP in
6056  [\\/]* | ?:[\\/]*)
6057  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6058  ;;
6059  *)
6060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063  IFS=$as_save_IFS
6064  test -z "$as_dir" && as_dir=.
6065    for ac_exec_ext in '' $ac_executable_extensions; do
6066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6067    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069    break 2
6070  fi
6071done
6072  done
6073IFS=$as_save_IFS
6074
6075  ;;
6076esac
6077fi
6078CMP=$ac_cv_path_CMP
6079if test -n "$CMP"; then
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6081$as_echo "$CMP" >&6; }
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088  test -n "$CMP" && break
6089done
6090
6091  else
6092    # The variable is set, but is it from the command line or the environment?
6093
6094    # Try to remove the string !CMP! from our list.
6095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6097      # If it failed, the variable was not from the command line. Ignore it,
6098      # but warn the user (except for BASH, which is always set by the calling BASH).
6099      if test "xCMP" != xBASH; then
6100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6101$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6102      fi
6103      # Try to locate tool using the code snippet
6104      for ac_prog in cmp
6105do
6106  # Extract the first word of "$ac_prog", so it can be a program name with args.
6107set dummy $ac_prog; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146  test -n "$CMP" && break
6147done
6148
6149    else
6150      # If it succeeded, then it was overridden by the user. We will use it
6151      # for the tool.
6152
6153      # First remove it from the list of overridden variables, so we can test
6154      # for unknown variables in the end.
6155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6156
6157      # Check if we try to supply an empty value
6158      if test "x$CMP" = x; then
6159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6160$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6162$as_echo_n "checking for CMP... " >&6; }
6163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6164$as_echo "disabled" >&6; }
6165      else
6166        # Check if the provided tool contains a complete path.
6167        tool_specified="$CMP"
6168        tool_basename="${tool_specified##*/}"
6169        if test "x$tool_basename" = "x$tool_specified"; then
6170          # A command without a complete path is provided, search $PATH.
6171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6172$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6173          # Extract the first word of "$tool_basename", so it can be a program name with args.
6174set dummy $tool_basename; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_CMP+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $CMP in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203CMP=$ac_cv_path_CMP
6204if test -n "$CMP"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6206$as_echo "$CMP" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213          if test "x$CMP" = x; then
6214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6215          fi
6216        else
6217          # Otherwise we believe it is a complete path. Use it as it is.
6218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6219$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6221$as_echo_n "checking for CMP... " >&6; }
6222          if test ! -x "$tool_specified"; then
6223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6224$as_echo "not found" >&6; }
6225            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6226          fi
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6228$as_echo "$tool_specified" >&6; }
6229        fi
6230      fi
6231    fi
6232
6233  fi
6234
6235
6236
6237  if test "x$CMP" = x; then
6238    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6239  fi
6240
6241
6242
6243
6244
6245  # Publish this variable in the help.
6246
6247
6248  if [ -z "${COMM+x}" ]; then
6249    # The variable is not set by user, try to locate tool using the code snippet
6250    for ac_prog in comm
6251do
6252  # Extract the first word of "$ac_prog", so it can be a program name with args.
6253set dummy $ac_prog; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
6256if ${ac_cv_path_COMM+:} false; then :
6257  $as_echo_n "(cached) " >&6
6258else
6259  case $COMM in
6260  [\\/]* | ?:[\\/]*)
6261  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6262  ;;
6263  *)
6264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267  IFS=$as_save_IFS
6268  test -z "$as_dir" && as_dir=.
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273    break 2
6274  fi
6275done
6276  done
6277IFS=$as_save_IFS
6278
6279  ;;
6280esac
6281fi
6282COMM=$ac_cv_path_COMM
6283if test -n "$COMM"; then
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6285$as_echo "$COMM" >&6; }
6286else
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
6289fi
6290
6291
6292  test -n "$COMM" && break
6293done
6294
6295  else
6296    # The variable is set, but is it from the command line or the environment?
6297
6298    # Try to remove the string !COMM! from our list.
6299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6301      # If it failed, the variable was not from the command line. Ignore it,
6302      # but warn the user (except for BASH, which is always set by the calling BASH).
6303      if test "xCOMM" != xBASH; then
6304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6305$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6306      fi
6307      # Try to locate tool using the code snippet
6308      for ac_prog in comm
6309do
6310  # Extract the first word of "$ac_prog", so it can be a program name with args.
6311set dummy $ac_prog; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350  test -n "$COMM" && break
6351done
6352
6353    else
6354      # If it succeeded, then it was overridden by the user. We will use it
6355      # for the tool.
6356
6357      # First remove it from the list of overridden variables, so we can test
6358      # for unknown variables in the end.
6359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6360
6361      # Check if we try to supply an empty value
6362      if test "x$COMM" = x; then
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6364$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6366$as_echo_n "checking for COMM... " >&6; }
6367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6368$as_echo "disabled" >&6; }
6369      else
6370        # Check if the provided tool contains a complete path.
6371        tool_specified="$COMM"
6372        tool_basename="${tool_specified##*/}"
6373        if test "x$tool_basename" = "x$tool_specified"; then
6374          # A command without a complete path is provided, search $PATH.
6375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6376$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6377          # Extract the first word of "$tool_basename", so it can be a program name with args.
6378set dummy $tool_basename; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_COMM+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $COMM in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407COMM=$ac_cv_path_COMM
6408if test -n "$COMM"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6410$as_echo "$COMM" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417          if test "x$COMM" = x; then
6418            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6419          fi
6420        else
6421          # Otherwise we believe it is a complete path. Use it as it is.
6422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6423$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6425$as_echo_n "checking for COMM... " >&6; }
6426          if test ! -x "$tool_specified"; then
6427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6428$as_echo "not found" >&6; }
6429            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6430          fi
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6432$as_echo "$tool_specified" >&6; }
6433        fi
6434      fi
6435    fi
6436
6437  fi
6438
6439
6440
6441  if test "x$COMM" = x; then
6442    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6443  fi
6444
6445
6446
6447
6448
6449  # Publish this variable in the help.
6450
6451
6452  if [ -z "${CP+x}" ]; then
6453    # The variable is not set by user, try to locate tool using the code snippet
6454    for ac_prog in cp
6455do
6456  # Extract the first word of "$ac_prog", so it can be a program name with args.
6457set dummy $ac_prog; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if ${ac_cv_path_CP+:} false; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $CP in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6475    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486CP=$ac_cv_path_CP
6487if test -n "$CP"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6489$as_echo "$CP" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496  test -n "$CP" && break
6497done
6498
6499  else
6500    # The variable is set, but is it from the command line or the environment?
6501
6502    # Try to remove the string !CP! from our list.
6503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6505      # If it failed, the variable was not from the command line. Ignore it,
6506      # but warn the user (except for BASH, which is always set by the calling BASH).
6507      if test "xCP" != xBASH; then
6508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6509$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6510      fi
6511      # Try to locate tool using the code snippet
6512      for ac_prog in cp
6513do
6514  # Extract the first word of "$ac_prog", so it can be a program name with args.
6515set dummy $ac_prog; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554  test -n "$CP" && break
6555done
6556
6557    else
6558      # If it succeeded, then it was overridden by the user. We will use it
6559      # for the tool.
6560
6561      # First remove it from the list of overridden variables, so we can test
6562      # for unknown variables in the end.
6563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6564
6565      # Check if we try to supply an empty value
6566      if test "x$CP" = x; then
6567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6568$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6570$as_echo_n "checking for CP... " >&6; }
6571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6572$as_echo "disabled" >&6; }
6573      else
6574        # Check if the provided tool contains a complete path.
6575        tool_specified="$CP"
6576        tool_basename="${tool_specified##*/}"
6577        if test "x$tool_basename" = "x$tool_specified"; then
6578          # A command without a complete path is provided, search $PATH.
6579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6580$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6581          # Extract the first word of "$tool_basename", so it can be a program name with args.
6582set dummy $tool_basename; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CP+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CP in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CP=$ac_cv_path_CP
6612if test -n "$CP"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6614$as_echo "$CP" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621          if test "x$CP" = x; then
6622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6623          fi
6624        else
6625          # Otherwise we believe it is a complete path. Use it as it is.
6626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6627$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6629$as_echo_n "checking for CP... " >&6; }
6630          if test ! -x "$tool_specified"; then
6631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6632$as_echo "not found" >&6; }
6633            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6634          fi
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6636$as_echo "$tool_specified" >&6; }
6637        fi
6638      fi
6639    fi
6640
6641  fi
6642
6643
6644
6645  if test "x$CP" = x; then
6646    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6647  fi
6648
6649
6650
6651
6652
6653  # Publish this variable in the help.
6654
6655
6656  if [ -z "${CUT+x}" ]; then
6657    # The variable is not set by user, try to locate tool using the code snippet
6658    for ac_prog in cut
6659do
6660  # Extract the first word of "$ac_prog", so it can be a program name with args.
6661set dummy $ac_prog; ac_word=$2
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663$as_echo_n "checking for $ac_word... " >&6; }
6664if ${ac_cv_path_CUT+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  case $CUT in
6668  [\\/]* | ?:[\\/]*)
6669  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6670  ;;
6671  *)
6672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6673for as_dir in $PATH
6674do
6675  IFS=$as_save_IFS
6676  test -z "$as_dir" && as_dir=.
6677    for ac_exec_ext in '' $ac_executable_extensions; do
6678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6679    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6681    break 2
6682  fi
6683done
6684  done
6685IFS=$as_save_IFS
6686
6687  ;;
6688esac
6689fi
6690CUT=$ac_cv_path_CUT
6691if test -n "$CUT"; then
6692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6693$as_echo "$CUT" >&6; }
6694else
6695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
6697fi
6698
6699
6700  test -n "$CUT" && break
6701done
6702
6703  else
6704    # The variable is set, but is it from the command line or the environment?
6705
6706    # Try to remove the string !CUT! from our list.
6707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6709      # If it failed, the variable was not from the command line. Ignore it,
6710      # but warn the user (except for BASH, which is always set by the calling BASH).
6711      if test "xCUT" != xBASH; then
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6713$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6714      fi
6715      # Try to locate tool using the code snippet
6716      for ac_prog in cut
6717do
6718  # Extract the first word of "$ac_prog", so it can be a program name with args.
6719set dummy $ac_prog; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758  test -n "$CUT" && break
6759done
6760
6761    else
6762      # If it succeeded, then it was overridden by the user. We will use it
6763      # for the tool.
6764
6765      # First remove it from the list of overridden variables, so we can test
6766      # for unknown variables in the end.
6767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6768
6769      # Check if we try to supply an empty value
6770      if test "x$CUT" = x; then
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6772$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6774$as_echo_n "checking for CUT... " >&6; }
6775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6776$as_echo "disabled" >&6; }
6777      else
6778        # Check if the provided tool contains a complete path.
6779        tool_specified="$CUT"
6780        tool_basename="${tool_specified##*/}"
6781        if test "x$tool_basename" = "x$tool_specified"; then
6782          # A command without a complete path is provided, search $PATH.
6783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6784$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6785          # Extract the first word of "$tool_basename", so it can be a program name with args.
6786set dummy $tool_basename; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_CUT+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $CUT in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815CUT=$ac_cv_path_CUT
6816if test -n "$CUT"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6818$as_echo "$CUT" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825          if test "x$CUT" = x; then
6826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6827          fi
6828        else
6829          # Otherwise we believe it is a complete path. Use it as it is.
6830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6831$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6833$as_echo_n "checking for CUT... " >&6; }
6834          if test ! -x "$tool_specified"; then
6835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6836$as_echo "not found" >&6; }
6837            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6838          fi
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6840$as_echo "$tool_specified" >&6; }
6841        fi
6842      fi
6843    fi
6844
6845  fi
6846
6847
6848
6849  if test "x$CUT" = x; then
6850    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6851  fi
6852
6853
6854
6855
6856
6857  # Publish this variable in the help.
6858
6859
6860  if [ -z "${DATE+x}" ]; then
6861    # The variable is not set by user, try to locate tool using the code snippet
6862    for ac_prog in date
6863do
6864  # Extract the first word of "$ac_prog", so it can be a program name with args.
6865set dummy $ac_prog; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_path_DATE+:} false; then :
6869  $as_echo_n "(cached) " >&6
6870else
6871  case $DATE in
6872  [\\/]* | ?:[\\/]*)
6873  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6874  ;;
6875  *)
6876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877for as_dir in $PATH
6878do
6879  IFS=$as_save_IFS
6880  test -z "$as_dir" && as_dir=.
6881    for ac_exec_ext in '' $ac_executable_extensions; do
6882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885    break 2
6886  fi
6887done
6888  done
6889IFS=$as_save_IFS
6890
6891  ;;
6892esac
6893fi
6894DATE=$ac_cv_path_DATE
6895if test -n "$DATE"; then
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6897$as_echo "$DATE" >&6; }
6898else
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900$as_echo "no" >&6; }
6901fi
6902
6903
6904  test -n "$DATE" && break
6905done
6906
6907  else
6908    # The variable is set, but is it from the command line or the environment?
6909
6910    # Try to remove the string !DATE! from our list.
6911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6913      # If it failed, the variable was not from the command line. Ignore it,
6914      # but warn the user (except for BASH, which is always set by the calling BASH).
6915      if test "xDATE" != xBASH; then
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6917$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6918      fi
6919      # Try to locate tool using the code snippet
6920      for ac_prog in date
6921do
6922  # Extract the first word of "$ac_prog", so it can be a program name with args.
6923set dummy $ac_prog; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962  test -n "$DATE" && break
6963done
6964
6965    else
6966      # If it succeeded, then it was overridden by the user. We will use it
6967      # for the tool.
6968
6969      # First remove it from the list of overridden variables, so we can test
6970      # for unknown variables in the end.
6971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6972
6973      # Check if we try to supply an empty value
6974      if test "x$DATE" = x; then
6975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6976$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6978$as_echo_n "checking for DATE... " >&6; }
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6980$as_echo "disabled" >&6; }
6981      else
6982        # Check if the provided tool contains a complete path.
6983        tool_specified="$DATE"
6984        tool_basename="${tool_specified##*/}"
6985        if test "x$tool_basename" = "x$tool_specified"; then
6986          # A command without a complete path is provided, search $PATH.
6987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6988$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6989          # Extract the first word of "$tool_basename", so it can be a program name with args.
6990set dummy $tool_basename; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DATE+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DATE in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DATE=$ac_cv_path_DATE
7020if test -n "$DATE"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7022$as_echo "$DATE" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029          if test "x$DATE" = x; then
7030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7031          fi
7032        else
7033          # Otherwise we believe it is a complete path. Use it as it is.
7034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7035$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7037$as_echo_n "checking for DATE... " >&6; }
7038          if test ! -x "$tool_specified"; then
7039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7040$as_echo "not found" >&6; }
7041            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7042          fi
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7044$as_echo "$tool_specified" >&6; }
7045        fi
7046      fi
7047    fi
7048
7049  fi
7050
7051
7052
7053  if test "x$DATE" = x; then
7054    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7055  fi
7056
7057
7058
7059
7060
7061  # Publish this variable in the help.
7062
7063
7064  if [ -z "${DIFF+x}" ]; then
7065    # The variable is not set by user, try to locate tool using the code snippet
7066    for ac_prog in gdiff diff
7067do
7068  # Extract the first word of "$ac_prog", so it can be a program name with args.
7069set dummy $ac_prog; ac_word=$2
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071$as_echo_n "checking for $ac_word... " >&6; }
7072if ${ac_cv_path_DIFF+:} false; then :
7073  $as_echo_n "(cached) " >&6
7074else
7075  case $DIFF in
7076  [\\/]* | ?:[\\/]*)
7077  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7078  ;;
7079  *)
7080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081for as_dir in $PATH
7082do
7083  IFS=$as_save_IFS
7084  test -z "$as_dir" && as_dir=.
7085    for ac_exec_ext in '' $ac_executable_extensions; do
7086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089    break 2
7090  fi
7091done
7092  done
7093IFS=$as_save_IFS
7094
7095  ;;
7096esac
7097fi
7098DIFF=$ac_cv_path_DIFF
7099if test -n "$DIFF"; then
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7101$as_echo "$DIFF" >&6; }
7102else
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104$as_echo "no" >&6; }
7105fi
7106
7107
7108  test -n "$DIFF" && break
7109done
7110
7111  else
7112    # The variable is set, but is it from the command line or the environment?
7113
7114    # Try to remove the string !DIFF! from our list.
7115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7117      # If it failed, the variable was not from the command line. Ignore it,
7118      # but warn the user (except for BASH, which is always set by the calling BASH).
7119      if test "xDIFF" != xBASH; then
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7121$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7122      fi
7123      # Try to locate tool using the code snippet
7124      for ac_prog in gdiff diff
7125do
7126  # Extract the first word of "$ac_prog", so it can be a program name with args.
7127set dummy $ac_prog; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166  test -n "$DIFF" && break
7167done
7168
7169    else
7170      # If it succeeded, then it was overridden by the user. We will use it
7171      # for the tool.
7172
7173      # First remove it from the list of overridden variables, so we can test
7174      # for unknown variables in the end.
7175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7176
7177      # Check if we try to supply an empty value
7178      if test "x$DIFF" = x; then
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7180$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7182$as_echo_n "checking for DIFF... " >&6; }
7183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7184$as_echo "disabled" >&6; }
7185      else
7186        # Check if the provided tool contains a complete path.
7187        tool_specified="$DIFF"
7188        tool_basename="${tool_specified##*/}"
7189        if test "x$tool_basename" = "x$tool_specified"; then
7190          # A command without a complete path is provided, search $PATH.
7191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7192$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7193          # Extract the first word of "$tool_basename", so it can be a program name with args.
7194set dummy $tool_basename; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIFF+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIFF in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIFF=$ac_cv_path_DIFF
7224if test -n "$DIFF"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7226$as_echo "$DIFF" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233          if test "x$DIFF" = x; then
7234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7235          fi
7236        else
7237          # Otherwise we believe it is a complete path. Use it as it is.
7238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7239$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7241$as_echo_n "checking for DIFF... " >&6; }
7242          if test ! -x "$tool_specified"; then
7243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7244$as_echo "not found" >&6; }
7245            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7246          fi
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7248$as_echo "$tool_specified" >&6; }
7249        fi
7250      fi
7251    fi
7252
7253  fi
7254
7255
7256
7257  if test "x$DIFF" = x; then
7258    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7259  fi
7260
7261
7262
7263
7264
7265  # Publish this variable in the help.
7266
7267
7268  if [ -z "${DIRNAME+x}" ]; then
7269    # The variable is not set by user, try to locate tool using the code snippet
7270    for ac_prog in dirname
7271do
7272  # Extract the first word of "$ac_prog", so it can be a program name with args.
7273set dummy $ac_prog; ac_word=$2
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7275$as_echo_n "checking for $ac_word... " >&6; }
7276if ${ac_cv_path_DIRNAME+:} false; then :
7277  $as_echo_n "(cached) " >&6
7278else
7279  case $DIRNAME in
7280  [\\/]* | ?:[\\/]*)
7281  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7282  ;;
7283  *)
7284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285for as_dir in $PATH
7286do
7287  IFS=$as_save_IFS
7288  test -z "$as_dir" && as_dir=.
7289    for ac_exec_ext in '' $ac_executable_extensions; do
7290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7291    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7293    break 2
7294  fi
7295done
7296  done
7297IFS=$as_save_IFS
7298
7299  ;;
7300esac
7301fi
7302DIRNAME=$ac_cv_path_DIRNAME
7303if test -n "$DIRNAME"; then
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7305$as_echo "$DIRNAME" >&6; }
7306else
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
7309fi
7310
7311
7312  test -n "$DIRNAME" && break
7313done
7314
7315  else
7316    # The variable is set, but is it from the command line or the environment?
7317
7318    # Try to remove the string !DIRNAME! from our list.
7319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7321      # If it failed, the variable was not from the command line. Ignore it,
7322      # but warn the user (except for BASH, which is always set by the calling BASH).
7323      if test "xDIRNAME" != xBASH; then
7324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7325$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7326      fi
7327      # Try to locate tool using the code snippet
7328      for ac_prog in dirname
7329do
7330  # Extract the first word of "$ac_prog", so it can be a program name with args.
7331set dummy $ac_prog; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370  test -n "$DIRNAME" && break
7371done
7372
7373    else
7374      # If it succeeded, then it was overridden by the user. We will use it
7375      # for the tool.
7376
7377      # First remove it from the list of overridden variables, so we can test
7378      # for unknown variables in the end.
7379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7380
7381      # Check if we try to supply an empty value
7382      if test "x$DIRNAME" = x; then
7383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7384$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7386$as_echo_n "checking for DIRNAME... " >&6; }
7387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7388$as_echo "disabled" >&6; }
7389      else
7390        # Check if the provided tool contains a complete path.
7391        tool_specified="$DIRNAME"
7392        tool_basename="${tool_specified##*/}"
7393        if test "x$tool_basename" = "x$tool_specified"; then
7394          # A command without a complete path is provided, search $PATH.
7395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7396$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7397          # Extract the first word of "$tool_basename", so it can be a program name with args.
7398set dummy $tool_basename; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_DIRNAME+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $DIRNAME in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427DIRNAME=$ac_cv_path_DIRNAME
7428if test -n "$DIRNAME"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7430$as_echo "$DIRNAME" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437          if test "x$DIRNAME" = x; then
7438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7439          fi
7440        else
7441          # Otherwise we believe it is a complete path. Use it as it is.
7442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7443$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7445$as_echo_n "checking for DIRNAME... " >&6; }
7446          if test ! -x "$tool_specified"; then
7447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7448$as_echo "not found" >&6; }
7449            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7450          fi
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7452$as_echo "$tool_specified" >&6; }
7453        fi
7454      fi
7455    fi
7456
7457  fi
7458
7459
7460
7461  if test "x$DIRNAME" = x; then
7462    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7463  fi
7464
7465
7466
7467
7468
7469  # Publish this variable in the help.
7470
7471
7472  if [ -z "${ECHO+x}" ]; then
7473    # The variable is not set by user, try to locate tool using the code snippet
7474    for ac_prog in echo
7475do
7476  # Extract the first word of "$ac_prog", so it can be a program name with args.
7477set dummy $ac_prog; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_ECHO+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $ECHO in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506ECHO=$ac_cv_path_ECHO
7507if test -n "$ECHO"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7509$as_echo "$ECHO" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516  test -n "$ECHO" && break
7517done
7518
7519  else
7520    # The variable is set, but is it from the command line or the environment?
7521
7522    # Try to remove the string !ECHO! from our list.
7523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7525      # If it failed, the variable was not from the command line. Ignore it,
7526      # but warn the user (except for BASH, which is always set by the calling BASH).
7527      if test "xECHO" != xBASH; then
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7529$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7530      fi
7531      # Try to locate tool using the code snippet
7532      for ac_prog in echo
7533do
7534  # Extract the first word of "$ac_prog", so it can be a program name with args.
7535set dummy $ac_prog; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574  test -n "$ECHO" && break
7575done
7576
7577    else
7578      # If it succeeded, then it was overridden by the user. We will use it
7579      # for the tool.
7580
7581      # First remove it from the list of overridden variables, so we can test
7582      # for unknown variables in the end.
7583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7584
7585      # Check if we try to supply an empty value
7586      if test "x$ECHO" = x; then
7587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7588$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7590$as_echo_n "checking for ECHO... " >&6; }
7591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7592$as_echo "disabled" >&6; }
7593      else
7594        # Check if the provided tool contains a complete path.
7595        tool_specified="$ECHO"
7596        tool_basename="${tool_specified##*/}"
7597        if test "x$tool_basename" = "x$tool_specified"; then
7598          # A command without a complete path is provided, search $PATH.
7599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7600$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7601          # Extract the first word of "$tool_basename", so it can be a program name with args.
7602set dummy $tool_basename; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_ECHO+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $ECHO in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631ECHO=$ac_cv_path_ECHO
7632if test -n "$ECHO"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7634$as_echo "$ECHO" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641          if test "x$ECHO" = x; then
7642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7643          fi
7644        else
7645          # Otherwise we believe it is a complete path. Use it as it is.
7646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7647$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7649$as_echo_n "checking for ECHO... " >&6; }
7650          if test ! -x "$tool_specified"; then
7651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7652$as_echo "not found" >&6; }
7653            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7654          fi
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7656$as_echo "$tool_specified" >&6; }
7657        fi
7658      fi
7659    fi
7660
7661  fi
7662
7663
7664
7665  if test "x$ECHO" = x; then
7666    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7667  fi
7668
7669
7670
7671
7672
7673  # Publish this variable in the help.
7674
7675
7676  if [ -z "${EXPR+x}" ]; then
7677    # The variable is not set by user, try to locate tool using the code snippet
7678    for ac_prog in expr
7679do
7680  # Extract the first word of "$ac_prog", so it can be a program name with args.
7681set dummy $ac_prog; ac_word=$2
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7683$as_echo_n "checking for $ac_word... " >&6; }
7684if ${ac_cv_path_EXPR+:} false; then :
7685  $as_echo_n "(cached) " >&6
7686else
7687  case $EXPR in
7688  [\\/]* | ?:[\\/]*)
7689  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7690  ;;
7691  *)
7692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7693for as_dir in $PATH
7694do
7695  IFS=$as_save_IFS
7696  test -z "$as_dir" && as_dir=.
7697    for ac_exec_ext in '' $ac_executable_extensions; do
7698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7699    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7701    break 2
7702  fi
7703done
7704  done
7705IFS=$as_save_IFS
7706
7707  ;;
7708esac
7709fi
7710EXPR=$ac_cv_path_EXPR
7711if test -n "$EXPR"; then
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7713$as_echo "$EXPR" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718
7719
7720  test -n "$EXPR" && break
7721done
7722
7723  else
7724    # The variable is set, but is it from the command line or the environment?
7725
7726    # Try to remove the string !EXPR! from our list.
7727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7729      # If it failed, the variable was not from the command line. Ignore it,
7730      # but warn the user (except for BASH, which is always set by the calling BASH).
7731      if test "xEXPR" != xBASH; then
7732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7733$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7734      fi
7735      # Try to locate tool using the code snippet
7736      for ac_prog in expr
7737do
7738  # Extract the first word of "$ac_prog", so it can be a program name with args.
7739set dummy $ac_prog; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778  test -n "$EXPR" && break
7779done
7780
7781    else
7782      # If it succeeded, then it was overridden by the user. We will use it
7783      # for the tool.
7784
7785      # First remove it from the list of overridden variables, so we can test
7786      # for unknown variables in the end.
7787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7788
7789      # Check if we try to supply an empty value
7790      if test "x$EXPR" = x; then
7791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7792$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7794$as_echo_n "checking for EXPR... " >&6; }
7795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7796$as_echo "disabled" >&6; }
7797      else
7798        # Check if the provided tool contains a complete path.
7799        tool_specified="$EXPR"
7800        tool_basename="${tool_specified##*/}"
7801        if test "x$tool_basename" = "x$tool_specified"; then
7802          # A command without a complete path is provided, search $PATH.
7803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7804$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7805          # Extract the first word of "$tool_basename", so it can be a program name with args.
7806set dummy $tool_basename; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_EXPR+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $EXPR in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835EXPR=$ac_cv_path_EXPR
7836if test -n "$EXPR"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7838$as_echo "$EXPR" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845          if test "x$EXPR" = x; then
7846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7847          fi
7848        else
7849          # Otherwise we believe it is a complete path. Use it as it is.
7850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7851$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7853$as_echo_n "checking for EXPR... " >&6; }
7854          if test ! -x "$tool_specified"; then
7855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7856$as_echo "not found" >&6; }
7857            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7858          fi
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7860$as_echo "$tool_specified" >&6; }
7861        fi
7862      fi
7863    fi
7864
7865  fi
7866
7867
7868
7869  if test "x$EXPR" = x; then
7870    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7871  fi
7872
7873
7874
7875
7876
7877  # Publish this variable in the help.
7878
7879
7880  if [ -z "${FILE+x}" ]; then
7881    # The variable is not set by user, try to locate tool using the code snippet
7882    for ac_prog in file
7883do
7884  # Extract the first word of "$ac_prog", so it can be a program name with args.
7885set dummy $ac_prog; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_FILE+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $FILE in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914FILE=$ac_cv_path_FILE
7915if test -n "$FILE"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7917$as_echo "$FILE" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924  test -n "$FILE" && break
7925done
7926
7927  else
7928    # The variable is set, but is it from the command line or the environment?
7929
7930    # Try to remove the string !FILE! from our list.
7931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7933      # If it failed, the variable was not from the command line. Ignore it,
7934      # but warn the user (except for BASH, which is always set by the calling BASH).
7935      if test "xFILE" != xBASH; then
7936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7937$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7938      fi
7939      # Try to locate tool using the code snippet
7940      for ac_prog in file
7941do
7942  # Extract the first word of "$ac_prog", so it can be a program name with args.
7943set dummy $ac_prog; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982  test -n "$FILE" && break
7983done
7984
7985    else
7986      # If it succeeded, then it was overridden by the user. We will use it
7987      # for the tool.
7988
7989      # First remove it from the list of overridden variables, so we can test
7990      # for unknown variables in the end.
7991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7992
7993      # Check if we try to supply an empty value
7994      if test "x$FILE" = x; then
7995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7996$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7998$as_echo_n "checking for FILE... " >&6; }
7999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8000$as_echo "disabled" >&6; }
8001      else
8002        # Check if the provided tool contains a complete path.
8003        tool_specified="$FILE"
8004        tool_basename="${tool_specified##*/}"
8005        if test "x$tool_basename" = "x$tool_specified"; then
8006          # A command without a complete path is provided, search $PATH.
8007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8008$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8009          # Extract the first word of "$tool_basename", so it can be a program name with args.
8010set dummy $tool_basename; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FILE+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FILE in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FILE=$ac_cv_path_FILE
8040if test -n "$FILE"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8042$as_echo "$FILE" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049          if test "x$FILE" = x; then
8050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8051          fi
8052        else
8053          # Otherwise we believe it is a complete path. Use it as it is.
8054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8055$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8057$as_echo_n "checking for FILE... " >&6; }
8058          if test ! -x "$tool_specified"; then
8059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8060$as_echo "not found" >&6; }
8061            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8062          fi
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8064$as_echo "$tool_specified" >&6; }
8065        fi
8066      fi
8067    fi
8068
8069  fi
8070
8071
8072
8073  if test "x$FILE" = x; then
8074    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8075  fi
8076
8077
8078
8079
8080
8081  # Publish this variable in the help.
8082
8083
8084  if [ -z "${FIND+x}" ]; then
8085    # The variable is not set by user, try to locate tool using the code snippet
8086    for ac_prog in find
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if ${ac_cv_path_FIND+:} false; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  case $FIND in
8096  [\\/]* | ?:[\\/]*)
8097  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8098  ;;
8099  *)
8100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101for as_dir in $PATH
8102do
8103  IFS=$as_save_IFS
8104  test -z "$as_dir" && as_dir=.
8105    for ac_exec_ext in '' $ac_executable_extensions; do
8106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109    break 2
8110  fi
8111done
8112  done
8113IFS=$as_save_IFS
8114
8115  ;;
8116esac
8117fi
8118FIND=$ac_cv_path_FIND
8119if test -n "$FIND"; then
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8121$as_echo "$FIND" >&6; }
8122else
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
8125fi
8126
8127
8128  test -n "$FIND" && break
8129done
8130
8131  else
8132    # The variable is set, but is it from the command line or the environment?
8133
8134    # Try to remove the string !FIND! from our list.
8135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8137      # If it failed, the variable was not from the command line. Ignore it,
8138      # but warn the user (except for BASH, which is always set by the calling BASH).
8139      if test "xFIND" != xBASH; then
8140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8141$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8142      fi
8143      # Try to locate tool using the code snippet
8144      for ac_prog in find
8145do
8146  # Extract the first word of "$ac_prog", so it can be a program name with args.
8147set dummy $ac_prog; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186  test -n "$FIND" && break
8187done
8188
8189    else
8190      # If it succeeded, then it was overridden by the user. We will use it
8191      # for the tool.
8192
8193      # First remove it from the list of overridden variables, so we can test
8194      # for unknown variables in the end.
8195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8196
8197      # Check if we try to supply an empty value
8198      if test "x$FIND" = x; then
8199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8200$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8202$as_echo_n "checking for FIND... " >&6; }
8203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8204$as_echo "disabled" >&6; }
8205      else
8206        # Check if the provided tool contains a complete path.
8207        tool_specified="$FIND"
8208        tool_basename="${tool_specified##*/}"
8209        if test "x$tool_basename" = "x$tool_specified"; then
8210          # A command without a complete path is provided, search $PATH.
8211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8212$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8213          # Extract the first word of "$tool_basename", so it can be a program name with args.
8214set dummy $tool_basename; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_FIND+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $FIND in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243FIND=$ac_cv_path_FIND
8244if test -n "$FIND"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8246$as_echo "$FIND" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253          if test "x$FIND" = x; then
8254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8255          fi
8256        else
8257          # Otherwise we believe it is a complete path. Use it as it is.
8258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8259$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8261$as_echo_n "checking for FIND... " >&6; }
8262          if test ! -x "$tool_specified"; then
8263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8264$as_echo "not found" >&6; }
8265            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8266          fi
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8268$as_echo "$tool_specified" >&6; }
8269        fi
8270      fi
8271    fi
8272
8273  fi
8274
8275
8276
8277  if test "x$FIND" = x; then
8278    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8279  fi
8280
8281
8282
8283
8284
8285  # Publish this variable in the help.
8286
8287
8288  if [ -z "${HEAD+x}" ]; then
8289    # The variable is not set by user, try to locate tool using the code snippet
8290    for ac_prog in head
8291do
8292  # Extract the first word of "$ac_prog", so it can be a program name with args.
8293set dummy $ac_prog; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_HEAD+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $HEAD in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322HEAD=$ac_cv_path_HEAD
8323if test -n "$HEAD"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8325$as_echo "$HEAD" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332  test -n "$HEAD" && break
8333done
8334
8335  else
8336    # The variable is set, but is it from the command line or the environment?
8337
8338    # Try to remove the string !HEAD! from our list.
8339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8341      # If it failed, the variable was not from the command line. Ignore it,
8342      # but warn the user (except for BASH, which is always set by the calling BASH).
8343      if test "xHEAD" != xBASH; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8345$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8346      fi
8347      # Try to locate tool using the code snippet
8348      for ac_prog in head
8349do
8350  # Extract the first word of "$ac_prog", so it can be a program name with args.
8351set dummy $ac_prog; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390  test -n "$HEAD" && break
8391done
8392
8393    else
8394      # If it succeeded, then it was overridden by the user. We will use it
8395      # for the tool.
8396
8397      # First remove it from the list of overridden variables, so we can test
8398      # for unknown variables in the end.
8399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8400
8401      # Check if we try to supply an empty value
8402      if test "x$HEAD" = x; then
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8404$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8406$as_echo_n "checking for HEAD... " >&6; }
8407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8408$as_echo "disabled" >&6; }
8409      else
8410        # Check if the provided tool contains a complete path.
8411        tool_specified="$HEAD"
8412        tool_basename="${tool_specified##*/}"
8413        if test "x$tool_basename" = "x$tool_specified"; then
8414          # A command without a complete path is provided, search $PATH.
8415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8416$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8417          # Extract the first word of "$tool_basename", so it can be a program name with args.
8418set dummy $tool_basename; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_HEAD+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $HEAD in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447HEAD=$ac_cv_path_HEAD
8448if test -n "$HEAD"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8450$as_echo "$HEAD" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457          if test "x$HEAD" = x; then
8458            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8459          fi
8460        else
8461          # Otherwise we believe it is a complete path. Use it as it is.
8462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8463$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8464          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8465$as_echo_n "checking for HEAD... " >&6; }
8466          if test ! -x "$tool_specified"; then
8467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8468$as_echo "not found" >&6; }
8469            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8470          fi
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8472$as_echo "$tool_specified" >&6; }
8473        fi
8474      fi
8475    fi
8476
8477  fi
8478
8479
8480
8481  if test "x$HEAD" = x; then
8482    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8483  fi
8484
8485
8486
8487
8488
8489  # Publish this variable in the help.
8490
8491
8492  if [ -z "${GUNZIP+x}" ]; then
8493    # The variable is not set by user, try to locate tool using the code snippet
8494    for ac_prog in gunzip
8495do
8496  # Extract the first word of "$ac_prog", so it can be a program name with args.
8497set dummy $ac_prog; ac_word=$2
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8499$as_echo_n "checking for $ac_word... " >&6; }
8500if ${ac_cv_path_GUNZIP+:} false; then :
8501  $as_echo_n "(cached) " >&6
8502else
8503  case $GUNZIP in
8504  [\\/]* | ?:[\\/]*)
8505  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8506  ;;
8507  *)
8508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8509for as_dir in $PATH
8510do
8511  IFS=$as_save_IFS
8512  test -z "$as_dir" && as_dir=.
8513    for ac_exec_ext in '' $ac_executable_extensions; do
8514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8515    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8517    break 2
8518  fi
8519done
8520  done
8521IFS=$as_save_IFS
8522
8523  ;;
8524esac
8525fi
8526GUNZIP=$ac_cv_path_GUNZIP
8527if test -n "$GUNZIP"; then
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8529$as_echo "$GUNZIP" >&6; }
8530else
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8532$as_echo "no" >&6; }
8533fi
8534
8535
8536  test -n "$GUNZIP" && break
8537done
8538
8539  else
8540    # The variable is set, but is it from the command line or the environment?
8541
8542    # Try to remove the string !GUNZIP! from our list.
8543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8545      # If it failed, the variable was not from the command line. Ignore it,
8546      # but warn the user (except for BASH, which is always set by the calling BASH).
8547      if test "xGUNZIP" != xBASH; then
8548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8549$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8550      fi
8551      # Try to locate tool using the code snippet
8552      for ac_prog in gunzip
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$GUNZIP" && break
8595done
8596
8597    else
8598      # If it succeeded, then it was overridden by the user. We will use it
8599      # for the tool.
8600
8601      # First remove it from the list of overridden variables, so we can test
8602      # for unknown variables in the end.
8603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8604
8605      # Check if we try to supply an empty value
8606      if test "x$GUNZIP" = x; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8608$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8610$as_echo_n "checking for GUNZIP... " >&6; }
8611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8612$as_echo "disabled" >&6; }
8613      else
8614        # Check if the provided tool contains a complete path.
8615        tool_specified="$GUNZIP"
8616        tool_basename="${tool_specified##*/}"
8617        if test "x$tool_basename" = "x$tool_specified"; then
8618          # A command without a complete path is provided, search $PATH.
8619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8620$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8621          # Extract the first word of "$tool_basename", so it can be a program name with args.
8622set dummy $tool_basename; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_GUNZIP+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $GUNZIP in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651GUNZIP=$ac_cv_path_GUNZIP
8652if test -n "$GUNZIP"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8654$as_echo "$GUNZIP" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661          if test "x$GUNZIP" = x; then
8662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8663          fi
8664        else
8665          # Otherwise we believe it is a complete path. Use it as it is.
8666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8667$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8669$as_echo_n "checking for GUNZIP... " >&6; }
8670          if test ! -x "$tool_specified"; then
8671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8672$as_echo "not found" >&6; }
8673            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8674          fi
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8676$as_echo "$tool_specified" >&6; }
8677        fi
8678      fi
8679    fi
8680
8681  fi
8682
8683
8684
8685  if test "x$GUNZIP" = x; then
8686    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8687  fi
8688
8689
8690
8691
8692
8693  # Publish this variable in the help.
8694
8695
8696  if [ -z "${GZIP+x}" ]; then
8697    # The variable is not set by user, try to locate tool using the code snippet
8698    for ac_prog in pigz gzip
8699do
8700  # Extract the first word of "$ac_prog", so it can be a program name with args.
8701set dummy $ac_prog; ac_word=$2
8702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8703$as_echo_n "checking for $ac_word... " >&6; }
8704if ${ac_cv_path_GZIP+:} false; then :
8705  $as_echo_n "(cached) " >&6
8706else
8707  case $GZIP in
8708  [\\/]* | ?:[\\/]*)
8709  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8710  ;;
8711  *)
8712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715  IFS=$as_save_IFS
8716  test -z "$as_dir" && as_dir=.
8717    for ac_exec_ext in '' $ac_executable_extensions; do
8718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8719    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8721    break 2
8722  fi
8723done
8724  done
8725IFS=$as_save_IFS
8726
8727  ;;
8728esac
8729fi
8730GZIP=$ac_cv_path_GZIP
8731if test -n "$GZIP"; then
8732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8733$as_echo "$GZIP" >&6; }
8734else
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8736$as_echo "no" >&6; }
8737fi
8738
8739
8740  test -n "$GZIP" && break
8741done
8742
8743  else
8744    # The variable is set, but is it from the command line or the environment?
8745
8746    # Try to remove the string !GZIP! from our list.
8747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8749      # If it failed, the variable was not from the command line. Ignore it,
8750      # but warn the user (except for BASH, which is always set by the calling BASH).
8751      if test "xGZIP" != xBASH; then
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8753$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8754      fi
8755      # Try to locate tool using the code snippet
8756      for ac_prog in pigz gzip
8757do
8758  # Extract the first word of "$ac_prog", so it can be a program name with args.
8759set dummy $ac_prog; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798  test -n "$GZIP" && break
8799done
8800
8801    else
8802      # If it succeeded, then it was overridden by the user. We will use it
8803      # for the tool.
8804
8805      # First remove it from the list of overridden variables, so we can test
8806      # for unknown variables in the end.
8807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8808
8809      # Check if we try to supply an empty value
8810      if test "x$GZIP" = x; then
8811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8812$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8814$as_echo_n "checking for GZIP... " >&6; }
8815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8816$as_echo "disabled" >&6; }
8817      else
8818        # Check if the provided tool contains a complete path.
8819        tool_specified="$GZIP"
8820        tool_basename="${tool_specified##*/}"
8821        if test "x$tool_basename" = "x$tool_specified"; then
8822          # A command without a complete path is provided, search $PATH.
8823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8824$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8825          # Extract the first word of "$tool_basename", so it can be a program name with args.
8826set dummy $tool_basename; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_GZIP+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $GZIP in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855GZIP=$ac_cv_path_GZIP
8856if test -n "$GZIP"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8858$as_echo "$GZIP" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865          if test "x$GZIP" = x; then
8866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8867          fi
8868        else
8869          # Otherwise we believe it is a complete path. Use it as it is.
8870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8871$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8873$as_echo_n "checking for GZIP... " >&6; }
8874          if test ! -x "$tool_specified"; then
8875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8876$as_echo "not found" >&6; }
8877            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8878          fi
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8880$as_echo "$tool_specified" >&6; }
8881        fi
8882      fi
8883    fi
8884
8885  fi
8886
8887
8888
8889  if test "x$GZIP" = x; then
8890    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8891  fi
8892
8893
8894
8895
8896
8897  # Publish this variable in the help.
8898
8899
8900  if [ -z "${LN+x}" ]; then
8901    # The variable is not set by user, try to locate tool using the code snippet
8902    for ac_prog in ln
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if ${ac_cv_path_LN+:} false; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $LN in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934LN=$ac_cv_path_LN
8935if test -n "$LN"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8937$as_echo "$LN" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$LN" && break
8945done
8946
8947  else
8948    # The variable is set, but is it from the command line or the environment?
8949
8950    # Try to remove the string !LN! from our list.
8951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8953      # If it failed, the variable was not from the command line. Ignore it,
8954      # but warn the user (except for BASH, which is always set by the calling BASH).
8955      if test "xLN" != xBASH; then
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8957$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8958      fi
8959      # Try to locate tool using the code snippet
8960      for ac_prog in ln
8961do
8962  # Extract the first word of "$ac_prog", so it can be a program name with args.
8963set dummy $ac_prog; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002  test -n "$LN" && break
9003done
9004
9005    else
9006      # If it succeeded, then it was overridden by the user. We will use it
9007      # for the tool.
9008
9009      # First remove it from the list of overridden variables, so we can test
9010      # for unknown variables in the end.
9011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9012
9013      # Check if we try to supply an empty value
9014      if test "x$LN" = x; then
9015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9016$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9018$as_echo_n "checking for LN... " >&6; }
9019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9020$as_echo "disabled" >&6; }
9021      else
9022        # Check if the provided tool contains a complete path.
9023        tool_specified="$LN"
9024        tool_basename="${tool_specified##*/}"
9025        if test "x$tool_basename" = "x$tool_specified"; then
9026          # A command without a complete path is provided, search $PATH.
9027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9028$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9029          # Extract the first word of "$tool_basename", so it can be a program name with args.
9030set dummy $tool_basename; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_LN+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $LN in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059LN=$ac_cv_path_LN
9060if test -n "$LN"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9062$as_echo "$LN" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069          if test "x$LN" = x; then
9070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9071          fi
9072        else
9073          # Otherwise we believe it is a complete path. Use it as it is.
9074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9075$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9077$as_echo_n "checking for LN... " >&6; }
9078          if test ! -x "$tool_specified"; then
9079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9080$as_echo "not found" >&6; }
9081            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9082          fi
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9084$as_echo "$tool_specified" >&6; }
9085        fi
9086      fi
9087    fi
9088
9089  fi
9090
9091
9092
9093  if test "x$LN" = x; then
9094    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9095  fi
9096
9097
9098
9099
9100
9101  # Publish this variable in the help.
9102
9103
9104  if [ -z "${LS+x}" ]; then
9105    # The variable is not set by user, try to locate tool using the code snippet
9106    for ac_prog in ls
9107do
9108  # Extract the first word of "$ac_prog", so it can be a program name with args.
9109set dummy $ac_prog; ac_word=$2
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9111$as_echo_n "checking for $ac_word... " >&6; }
9112if ${ac_cv_path_LS+:} false; then :
9113  $as_echo_n "(cached) " >&6
9114else
9115  case $LS in
9116  [\\/]* | ?:[\\/]*)
9117  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9118  ;;
9119  *)
9120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9121for as_dir in $PATH
9122do
9123  IFS=$as_save_IFS
9124  test -z "$as_dir" && as_dir=.
9125    for ac_exec_ext in '' $ac_executable_extensions; do
9126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9127    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9129    break 2
9130  fi
9131done
9132  done
9133IFS=$as_save_IFS
9134
9135  ;;
9136esac
9137fi
9138LS=$ac_cv_path_LS
9139if test -n "$LS"; then
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9141$as_echo "$LS" >&6; }
9142else
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
9145fi
9146
9147
9148  test -n "$LS" && break
9149done
9150
9151  else
9152    # The variable is set, but is it from the command line or the environment?
9153
9154    # Try to remove the string !LS! from our list.
9155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9157      # If it failed, the variable was not from the command line. Ignore it,
9158      # but warn the user (except for BASH, which is always set by the calling BASH).
9159      if test "xLS" != xBASH; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9161$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9162      fi
9163      # Try to locate tool using the code snippet
9164      for ac_prog in ls
9165do
9166  # Extract the first word of "$ac_prog", so it can be a program name with args.
9167set dummy $ac_prog; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206  test -n "$LS" && break
9207done
9208
9209    else
9210      # If it succeeded, then it was overridden by the user. We will use it
9211      # for the tool.
9212
9213      # First remove it from the list of overridden variables, so we can test
9214      # for unknown variables in the end.
9215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9216
9217      # Check if we try to supply an empty value
9218      if test "x$LS" = x; then
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9220$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9222$as_echo_n "checking for LS... " >&6; }
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9224$as_echo "disabled" >&6; }
9225      else
9226        # Check if the provided tool contains a complete path.
9227        tool_specified="$LS"
9228        tool_basename="${tool_specified##*/}"
9229        if test "x$tool_basename" = "x$tool_specified"; then
9230          # A command without a complete path is provided, search $PATH.
9231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9232$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9233          # Extract the first word of "$tool_basename", so it can be a program name with args.
9234set dummy $tool_basename; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_LS+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $LS in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263LS=$ac_cv_path_LS
9264if test -n "$LS"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9266$as_echo "$LS" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273          if test "x$LS" = x; then
9274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9275          fi
9276        else
9277          # Otherwise we believe it is a complete path. Use it as it is.
9278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9279$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9281$as_echo_n "checking for LS... " >&6; }
9282          if test ! -x "$tool_specified"; then
9283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9284$as_echo "not found" >&6; }
9285            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9286          fi
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9288$as_echo "$tool_specified" >&6; }
9289        fi
9290      fi
9291    fi
9292
9293  fi
9294
9295
9296
9297  if test "x$LS" = x; then
9298    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9299  fi
9300
9301
9302
9303
9304
9305  # Publish this variable in the help.
9306
9307
9308  if [ -z "${MKDIR+x}" ]; then
9309    # The variable is not set by user, try to locate tool using the code snippet
9310    for ac_prog in mkdir
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_MKDIR+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $MKDIR in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342MKDIR=$ac_cv_path_MKDIR
9343if test -n "$MKDIR"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9345$as_echo "$MKDIR" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$MKDIR" && break
9353done
9354
9355  else
9356    # The variable is set, but is it from the command line or the environment?
9357
9358    # Try to remove the string !MKDIR! from our list.
9359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9361      # If it failed, the variable was not from the command line. Ignore it,
9362      # but warn the user (except for BASH, which is always set by the calling BASH).
9363      if test "xMKDIR" != xBASH; then
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9365$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9366      fi
9367      # Try to locate tool using the code snippet
9368      for ac_prog in mkdir
9369do
9370  # Extract the first word of "$ac_prog", so it can be a program name with args.
9371set dummy $ac_prog; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410  test -n "$MKDIR" && break
9411done
9412
9413    else
9414      # If it succeeded, then it was overridden by the user. We will use it
9415      # for the tool.
9416
9417      # First remove it from the list of overridden variables, so we can test
9418      # for unknown variables in the end.
9419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9420
9421      # Check if we try to supply an empty value
9422      if test "x$MKDIR" = x; then
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9424$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9426$as_echo_n "checking for MKDIR... " >&6; }
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9428$as_echo "disabled" >&6; }
9429      else
9430        # Check if the provided tool contains a complete path.
9431        tool_specified="$MKDIR"
9432        tool_basename="${tool_specified##*/}"
9433        if test "x$tool_basename" = "x$tool_specified"; then
9434          # A command without a complete path is provided, search $PATH.
9435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9436$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9437          # Extract the first word of "$tool_basename", so it can be a program name with args.
9438set dummy $tool_basename; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_MKDIR+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $MKDIR in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467MKDIR=$ac_cv_path_MKDIR
9468if test -n "$MKDIR"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9470$as_echo "$MKDIR" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477          if test "x$MKDIR" = x; then
9478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9479          fi
9480        else
9481          # Otherwise we believe it is a complete path. Use it as it is.
9482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9483$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9485$as_echo_n "checking for MKDIR... " >&6; }
9486          if test ! -x "$tool_specified"; then
9487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9488$as_echo "not found" >&6; }
9489            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9490          fi
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9492$as_echo "$tool_specified" >&6; }
9493        fi
9494      fi
9495    fi
9496
9497  fi
9498
9499
9500
9501  if test "x$MKDIR" = x; then
9502    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9503  fi
9504
9505
9506
9507
9508
9509  # Publish this variable in the help.
9510
9511
9512  if [ -z "${MKTEMP+x}" ]; then
9513    # The variable is not set by user, try to locate tool using the code snippet
9514    for ac_prog in mktemp
9515do
9516  # Extract the first word of "$ac_prog", so it can be a program name with args.
9517set dummy $ac_prog; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_MKTEMP+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $MKTEMP in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546MKTEMP=$ac_cv_path_MKTEMP
9547if test -n "$MKTEMP"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9549$as_echo "$MKTEMP" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556  test -n "$MKTEMP" && break
9557done
9558
9559  else
9560    # The variable is set, but is it from the command line or the environment?
9561
9562    # Try to remove the string !MKTEMP! from our list.
9563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9565      # If it failed, the variable was not from the command line. Ignore it,
9566      # but warn the user (except for BASH, which is always set by the calling BASH).
9567      if test "xMKTEMP" != xBASH; then
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9569$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9570      fi
9571      # Try to locate tool using the code snippet
9572      for ac_prog in mktemp
9573do
9574  # Extract the first word of "$ac_prog", so it can be a program name with args.
9575set dummy $ac_prog; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614  test -n "$MKTEMP" && break
9615done
9616
9617    else
9618      # If it succeeded, then it was overridden by the user. We will use it
9619      # for the tool.
9620
9621      # First remove it from the list of overridden variables, so we can test
9622      # for unknown variables in the end.
9623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9624
9625      # Check if we try to supply an empty value
9626      if test "x$MKTEMP" = x; then
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9628$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9630$as_echo_n "checking for MKTEMP... " >&6; }
9631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9632$as_echo "disabled" >&6; }
9633      else
9634        # Check if the provided tool contains a complete path.
9635        tool_specified="$MKTEMP"
9636        tool_basename="${tool_specified##*/}"
9637        if test "x$tool_basename" = "x$tool_specified"; then
9638          # A command without a complete path is provided, search $PATH.
9639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9640$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9641          # Extract the first word of "$tool_basename", so it can be a program name with args.
9642set dummy $tool_basename; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_MKTEMP+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $MKTEMP in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671MKTEMP=$ac_cv_path_MKTEMP
9672if test -n "$MKTEMP"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9674$as_echo "$MKTEMP" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681          if test "x$MKTEMP" = x; then
9682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9683          fi
9684        else
9685          # Otherwise we believe it is a complete path. Use it as it is.
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9687$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9689$as_echo_n "checking for MKTEMP... " >&6; }
9690          if test ! -x "$tool_specified"; then
9691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9692$as_echo "not found" >&6; }
9693            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9694          fi
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9696$as_echo "$tool_specified" >&6; }
9697        fi
9698      fi
9699    fi
9700
9701  fi
9702
9703
9704
9705  if test "x$MKTEMP" = x; then
9706    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9707  fi
9708
9709
9710
9711
9712
9713  # Publish this variable in the help.
9714
9715
9716  if [ -z "${MV+x}" ]; then
9717    # The variable is not set by user, try to locate tool using the code snippet
9718    for ac_prog in mv
9719do
9720  # Extract the first word of "$ac_prog", so it can be a program name with args.
9721set dummy $ac_prog; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_MV+:} false; then :
9725  $as_echo_n "(cached) " >&6
9726else
9727  case $MV in
9728  [\\/]* | ?:[\\/]*)
9729  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9730  ;;
9731  *)
9732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735  IFS=$as_save_IFS
9736  test -z "$as_dir" && as_dir=.
9737    for ac_exec_ext in '' $ac_executable_extensions; do
9738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741    break 2
9742  fi
9743done
9744  done
9745IFS=$as_save_IFS
9746
9747  ;;
9748esac
9749fi
9750MV=$ac_cv_path_MV
9751if test -n "$MV"; then
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9753$as_echo "$MV" >&6; }
9754else
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760  test -n "$MV" && break
9761done
9762
9763  else
9764    # The variable is set, but is it from the command line or the environment?
9765
9766    # Try to remove the string !MV! from our list.
9767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9769      # If it failed, the variable was not from the command line. Ignore it,
9770      # but warn the user (except for BASH, which is always set by the calling BASH).
9771      if test "xMV" != xBASH; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9773$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9774      fi
9775      # Try to locate tool using the code snippet
9776      for ac_prog in mv
9777do
9778  # Extract the first word of "$ac_prog", so it can be a program name with args.
9779set dummy $ac_prog; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818  test -n "$MV" && break
9819done
9820
9821    else
9822      # If it succeeded, then it was overridden by the user. We will use it
9823      # for the tool.
9824
9825      # First remove it from the list of overridden variables, so we can test
9826      # for unknown variables in the end.
9827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9828
9829      # Check if we try to supply an empty value
9830      if test "x$MV" = x; then
9831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9832$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9834$as_echo_n "checking for MV... " >&6; }
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9836$as_echo "disabled" >&6; }
9837      else
9838        # Check if the provided tool contains a complete path.
9839        tool_specified="$MV"
9840        tool_basename="${tool_specified##*/}"
9841        if test "x$tool_basename" = "x$tool_specified"; then
9842          # A command without a complete path is provided, search $PATH.
9843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9844$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9845          # Extract the first word of "$tool_basename", so it can be a program name with args.
9846set dummy $tool_basename; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_MV+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $MV in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875MV=$ac_cv_path_MV
9876if test -n "$MV"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9878$as_echo "$MV" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885          if test "x$MV" = x; then
9886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9887          fi
9888        else
9889          # Otherwise we believe it is a complete path. Use it as it is.
9890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9891$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9893$as_echo_n "checking for MV... " >&6; }
9894          if test ! -x "$tool_specified"; then
9895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9896$as_echo "not found" >&6; }
9897            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9898          fi
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9900$as_echo "$tool_specified" >&6; }
9901        fi
9902      fi
9903    fi
9904
9905  fi
9906
9907
9908
9909  if test "x$MV" = x; then
9910    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9911  fi
9912
9913
9914
9915
9916
9917  # Publish this variable in the help.
9918
9919
9920  if [ -z "${NAWK+x}" ]; then
9921    # The variable is not set by user, try to locate tool using the code snippet
9922    for ac_prog in nawk gawk awk
9923do
9924  # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
9928if ${ac_cv_path_NAWK+:} false; then :
9929  $as_echo_n "(cached) " >&6
9930else
9931  case $NAWK in
9932  [\\/]* | ?:[\\/]*)
9933  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9934  ;;
9935  *)
9936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9937for as_dir in $PATH
9938do
9939  IFS=$as_save_IFS
9940  test -z "$as_dir" && as_dir=.
9941    for ac_exec_ext in '' $ac_executable_extensions; do
9942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9943    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9945    break 2
9946  fi
9947done
9948  done
9949IFS=$as_save_IFS
9950
9951  ;;
9952esac
9953fi
9954NAWK=$ac_cv_path_NAWK
9955if test -n "$NAWK"; then
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9957$as_echo "$NAWK" >&6; }
9958else
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
9961fi
9962
9963
9964  test -n "$NAWK" && break
9965done
9966
9967  else
9968    # The variable is set, but is it from the command line or the environment?
9969
9970    # Try to remove the string !NAWK! from our list.
9971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9973      # If it failed, the variable was not from the command line. Ignore it,
9974      # but warn the user (except for BASH, which is always set by the calling BASH).
9975      if test "xNAWK" != xBASH; then
9976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9977$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9978      fi
9979      # Try to locate tool using the code snippet
9980      for ac_prog in nawk gawk awk
9981do
9982  # Extract the first word of "$ac_prog", so it can be a program name with args.
9983set dummy $ac_prog; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022  test -n "$NAWK" && break
10023done
10024
10025    else
10026      # If it succeeded, then it was overridden by the user. We will use it
10027      # for the tool.
10028
10029      # First remove it from the list of overridden variables, so we can test
10030      # for unknown variables in the end.
10031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10032
10033      # Check if we try to supply an empty value
10034      if test "x$NAWK" = x; then
10035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10036$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10038$as_echo_n "checking for NAWK... " >&6; }
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10040$as_echo "disabled" >&6; }
10041      else
10042        # Check if the provided tool contains a complete path.
10043        tool_specified="$NAWK"
10044        tool_basename="${tool_specified##*/}"
10045        if test "x$tool_basename" = "x$tool_specified"; then
10046          # A command without a complete path is provided, search $PATH.
10047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10048$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10049          # Extract the first word of "$tool_basename", so it can be a program name with args.
10050set dummy $tool_basename; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_NAWK+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $NAWK in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079NAWK=$ac_cv_path_NAWK
10080if test -n "$NAWK"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10082$as_echo "$NAWK" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089          if test "x$NAWK" = x; then
10090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10091          fi
10092        else
10093          # Otherwise we believe it is a complete path. Use it as it is.
10094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10095$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10097$as_echo_n "checking for NAWK... " >&6; }
10098          if test ! -x "$tool_specified"; then
10099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10100$as_echo "not found" >&6; }
10101            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10102          fi
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10104$as_echo "$tool_specified" >&6; }
10105        fi
10106      fi
10107    fi
10108
10109  fi
10110
10111
10112
10113  if test "x$NAWK" = x; then
10114    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10115  fi
10116
10117
10118
10119
10120
10121  # Publish this variable in the help.
10122
10123
10124  if [ -z "${PRINTF+x}" ]; then
10125    # The variable is not set by user, try to locate tool using the code snippet
10126    for ac_prog in printf
10127do
10128  # Extract the first word of "$ac_prog", so it can be a program name with args.
10129set dummy $ac_prog; ac_word=$2
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10131$as_echo_n "checking for $ac_word... " >&6; }
10132if ${ac_cv_path_PRINTF+:} false; then :
10133  $as_echo_n "(cached) " >&6
10134else
10135  case $PRINTF in
10136  [\\/]* | ?:[\\/]*)
10137  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10138  ;;
10139  *)
10140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10141for as_dir in $PATH
10142do
10143  IFS=$as_save_IFS
10144  test -z "$as_dir" && as_dir=.
10145    for ac_exec_ext in '' $ac_executable_extensions; do
10146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10147    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10149    break 2
10150  fi
10151done
10152  done
10153IFS=$as_save_IFS
10154
10155  ;;
10156esac
10157fi
10158PRINTF=$ac_cv_path_PRINTF
10159if test -n "$PRINTF"; then
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10161$as_echo "$PRINTF" >&6; }
10162else
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168  test -n "$PRINTF" && break
10169done
10170
10171  else
10172    # The variable is set, but is it from the command line or the environment?
10173
10174    # Try to remove the string !PRINTF! from our list.
10175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10177      # If it failed, the variable was not from the command line. Ignore it,
10178      # but warn the user (except for BASH, which is always set by the calling BASH).
10179      if test "xPRINTF" != xBASH; then
10180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10181$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10182      fi
10183      # Try to locate tool using the code snippet
10184      for ac_prog in printf
10185do
10186  # Extract the first word of "$ac_prog", so it can be a program name with args.
10187set dummy $ac_prog; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226  test -n "$PRINTF" && break
10227done
10228
10229    else
10230      # If it succeeded, then it was overridden by the user. We will use it
10231      # for the tool.
10232
10233      # First remove it from the list of overridden variables, so we can test
10234      # for unknown variables in the end.
10235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10236
10237      # Check if we try to supply an empty value
10238      if test "x$PRINTF" = x; then
10239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10240$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10242$as_echo_n "checking for PRINTF... " >&6; }
10243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10244$as_echo "disabled" >&6; }
10245      else
10246        # Check if the provided tool contains a complete path.
10247        tool_specified="$PRINTF"
10248        tool_basename="${tool_specified##*/}"
10249        if test "x$tool_basename" = "x$tool_specified"; then
10250          # A command without a complete path is provided, search $PATH.
10251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10252$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10253          # Extract the first word of "$tool_basename", so it can be a program name with args.
10254set dummy $tool_basename; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_PRINTF+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $PRINTF in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283PRINTF=$ac_cv_path_PRINTF
10284if test -n "$PRINTF"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10286$as_echo "$PRINTF" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293          if test "x$PRINTF" = x; then
10294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10295          fi
10296        else
10297          # Otherwise we believe it is a complete path. Use it as it is.
10298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10299$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10301$as_echo_n "checking for PRINTF... " >&6; }
10302          if test ! -x "$tool_specified"; then
10303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10304$as_echo "not found" >&6; }
10305            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10306          fi
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10308$as_echo "$tool_specified" >&6; }
10309        fi
10310      fi
10311    fi
10312
10313  fi
10314
10315
10316
10317  if test "x$PRINTF" = x; then
10318    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10319  fi
10320
10321
10322
10323
10324
10325  # Publish this variable in the help.
10326
10327
10328  if [ -z "${RM+x}" ]; then
10329    # The variable is not set by user, try to locate tool using the code snippet
10330    for ac_prog in rm
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_RM+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $RM in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362RM=$ac_cv_path_RM
10363if test -n "$RM"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10365$as_echo "$RM" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  test -n "$RM" && break
10373done
10374
10375  else
10376    # The variable is set, but is it from the command line or the environment?
10377
10378    # Try to remove the string !RM! from our list.
10379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10381      # If it failed, the variable was not from the command line. Ignore it,
10382      # but warn the user (except for BASH, which is always set by the calling BASH).
10383      if test "xRM" != xBASH; then
10384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10385$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10386      fi
10387      # Try to locate tool using the code snippet
10388      for ac_prog in rm
10389do
10390  # Extract the first word of "$ac_prog", so it can be a program name with args.
10391set dummy $ac_prog; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430  test -n "$RM" && break
10431done
10432
10433    else
10434      # If it succeeded, then it was overridden by the user. We will use it
10435      # for the tool.
10436
10437      # First remove it from the list of overridden variables, so we can test
10438      # for unknown variables in the end.
10439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10440
10441      # Check if we try to supply an empty value
10442      if test "x$RM" = x; then
10443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10444$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10446$as_echo_n "checking for RM... " >&6; }
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10448$as_echo "disabled" >&6; }
10449      else
10450        # Check if the provided tool contains a complete path.
10451        tool_specified="$RM"
10452        tool_basename="${tool_specified##*/}"
10453        if test "x$tool_basename" = "x$tool_specified"; then
10454          # A command without a complete path is provided, search $PATH.
10455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10456$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10457          # Extract the first word of "$tool_basename", so it can be a program name with args.
10458set dummy $tool_basename; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_RM+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $RM in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487RM=$ac_cv_path_RM
10488if test -n "$RM"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10490$as_echo "$RM" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497          if test "x$RM" = x; then
10498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10499          fi
10500        else
10501          # Otherwise we believe it is a complete path. Use it as it is.
10502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10503$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10505$as_echo_n "checking for RM... " >&6; }
10506          if test ! -x "$tool_specified"; then
10507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10508$as_echo "not found" >&6; }
10509            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10510          fi
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10512$as_echo "$tool_specified" >&6; }
10513        fi
10514      fi
10515    fi
10516
10517  fi
10518
10519
10520
10521  if test "x$RM" = x; then
10522    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10523  fi
10524
10525
10526
10527
10528
10529  # Publish this variable in the help.
10530
10531
10532  if [ -z "${RMDIR+x}" ]; then
10533    # The variable is not set by user, try to locate tool using the code snippet
10534    for ac_prog in rmdir
10535do
10536  # Extract the first word of "$ac_prog", so it can be a program name with args.
10537set dummy $ac_prog; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_path_RMDIR+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  case $RMDIR in
10544  [\\/]* | ?:[\\/]*)
10545  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10546  ;;
10547  *)
10548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10549for as_dir in $PATH
10550do
10551  IFS=$as_save_IFS
10552  test -z "$as_dir" && as_dir=.
10553    for ac_exec_ext in '' $ac_executable_extensions; do
10554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10555    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10557    break 2
10558  fi
10559done
10560  done
10561IFS=$as_save_IFS
10562
10563  ;;
10564esac
10565fi
10566RMDIR=$ac_cv_path_RMDIR
10567if test -n "$RMDIR"; then
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10569$as_echo "$RMDIR" >&6; }
10570else
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573fi
10574
10575
10576  test -n "$RMDIR" && break
10577done
10578
10579  else
10580    # The variable is set, but is it from the command line or the environment?
10581
10582    # Try to remove the string !RMDIR! from our list.
10583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10585      # If it failed, the variable was not from the command line. Ignore it,
10586      # but warn the user (except for BASH, which is always set by the calling BASH).
10587      if test "xRMDIR" != xBASH; then
10588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10589$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10590      fi
10591      # Try to locate tool using the code snippet
10592      for ac_prog in rmdir
10593do
10594  # Extract the first word of "$ac_prog", so it can be a program name with args.
10595set dummy $ac_prog; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634  test -n "$RMDIR" && break
10635done
10636
10637    else
10638      # If it succeeded, then it was overridden by the user. We will use it
10639      # for the tool.
10640
10641      # First remove it from the list of overridden variables, so we can test
10642      # for unknown variables in the end.
10643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10644
10645      # Check if we try to supply an empty value
10646      if test "x$RMDIR" = x; then
10647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10648$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10650$as_echo_n "checking for RMDIR... " >&6; }
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10652$as_echo "disabled" >&6; }
10653      else
10654        # Check if the provided tool contains a complete path.
10655        tool_specified="$RMDIR"
10656        tool_basename="${tool_specified##*/}"
10657        if test "x$tool_basename" = "x$tool_specified"; then
10658          # A command without a complete path is provided, search $PATH.
10659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10660$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10661          # Extract the first word of "$tool_basename", so it can be a program name with args.
10662set dummy $tool_basename; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_RMDIR+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $RMDIR in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691RMDIR=$ac_cv_path_RMDIR
10692if test -n "$RMDIR"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10694$as_echo "$RMDIR" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701          if test "x$RMDIR" = x; then
10702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10703          fi
10704        else
10705          # Otherwise we believe it is a complete path. Use it as it is.
10706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10707$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10709$as_echo_n "checking for RMDIR... " >&6; }
10710          if test ! -x "$tool_specified"; then
10711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10712$as_echo "not found" >&6; }
10713            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10714          fi
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10716$as_echo "$tool_specified" >&6; }
10717        fi
10718      fi
10719    fi
10720
10721  fi
10722
10723
10724
10725  if test "x$RMDIR" = x; then
10726    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10727  fi
10728
10729
10730
10731
10732
10733  # Publish this variable in the help.
10734
10735
10736  if [ -z "${SH+x}" ]; then
10737    # The variable is not set by user, try to locate tool using the code snippet
10738    for ac_prog in sh
10739do
10740  # Extract the first word of "$ac_prog", so it can be a program name with args.
10741set dummy $ac_prog; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_SH+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $SH in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770SH=$ac_cv_path_SH
10771if test -n "$SH"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10773$as_echo "$SH" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780  test -n "$SH" && break
10781done
10782
10783  else
10784    # The variable is set, but is it from the command line or the environment?
10785
10786    # Try to remove the string !SH! from our list.
10787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10789      # If it failed, the variable was not from the command line. Ignore it,
10790      # but warn the user (except for BASH, which is always set by the calling BASH).
10791      if test "xSH" != xBASH; then
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10793$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10794      fi
10795      # Try to locate tool using the code snippet
10796      for ac_prog in sh
10797do
10798  # Extract the first word of "$ac_prog", so it can be a program name with args.
10799set dummy $ac_prog; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838  test -n "$SH" && break
10839done
10840
10841    else
10842      # If it succeeded, then it was overridden by the user. We will use it
10843      # for the tool.
10844
10845      # First remove it from the list of overridden variables, so we can test
10846      # for unknown variables in the end.
10847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10848
10849      # Check if we try to supply an empty value
10850      if test "x$SH" = x; then
10851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10852$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10854$as_echo_n "checking for SH... " >&6; }
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10856$as_echo "disabled" >&6; }
10857      else
10858        # Check if the provided tool contains a complete path.
10859        tool_specified="$SH"
10860        tool_basename="${tool_specified##*/}"
10861        if test "x$tool_basename" = "x$tool_specified"; then
10862          # A command without a complete path is provided, search $PATH.
10863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10864$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10865          # Extract the first word of "$tool_basename", so it can be a program name with args.
10866set dummy $tool_basename; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_SH+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $SH in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895SH=$ac_cv_path_SH
10896if test -n "$SH"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10898$as_echo "$SH" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905          if test "x$SH" = x; then
10906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10907          fi
10908        else
10909          # Otherwise we believe it is a complete path. Use it as it is.
10910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10911$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10913$as_echo_n "checking for SH... " >&6; }
10914          if test ! -x "$tool_specified"; then
10915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10916$as_echo "not found" >&6; }
10917            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10918          fi
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10920$as_echo "$tool_specified" >&6; }
10921        fi
10922      fi
10923    fi
10924
10925  fi
10926
10927
10928
10929  if test "x$SH" = x; then
10930    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10931  fi
10932
10933
10934
10935
10936
10937  # Publish this variable in the help.
10938
10939
10940  if [ -z "${SORT+x}" ]; then
10941    # The variable is not set by user, try to locate tool using the code snippet
10942    for ac_prog in sort
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_SORT+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $SORT in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974SORT=$ac_cv_path_SORT
10975if test -n "$SORT"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10977$as_echo "$SORT" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$SORT" && break
10985done
10986
10987  else
10988    # The variable is set, but is it from the command line or the environment?
10989
10990    # Try to remove the string !SORT! from our list.
10991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10993      # If it failed, the variable was not from the command line. Ignore it,
10994      # but warn the user (except for BASH, which is always set by the calling BASH).
10995      if test "xSORT" != xBASH; then
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10997$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10998      fi
10999      # Try to locate tool using the code snippet
11000      for ac_prog in sort
11001do
11002  # Extract the first word of "$ac_prog", so it can be a program name with args.
11003set dummy $ac_prog; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042  test -n "$SORT" && break
11043done
11044
11045    else
11046      # If it succeeded, then it was overridden by the user. We will use it
11047      # for the tool.
11048
11049      # First remove it from the list of overridden variables, so we can test
11050      # for unknown variables in the end.
11051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11052
11053      # Check if we try to supply an empty value
11054      if test "x$SORT" = x; then
11055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11056$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11058$as_echo_n "checking for SORT... " >&6; }
11059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11060$as_echo "disabled" >&6; }
11061      else
11062        # Check if the provided tool contains a complete path.
11063        tool_specified="$SORT"
11064        tool_basename="${tool_specified##*/}"
11065        if test "x$tool_basename" = "x$tool_specified"; then
11066          # A command without a complete path is provided, search $PATH.
11067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11068$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11069          # Extract the first word of "$tool_basename", so it can be a program name with args.
11070set dummy $tool_basename; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_SORT+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $SORT in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099SORT=$ac_cv_path_SORT
11100if test -n "$SORT"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11102$as_echo "$SORT" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109          if test "x$SORT" = x; then
11110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11111          fi
11112        else
11113          # Otherwise we believe it is a complete path. Use it as it is.
11114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11115$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11117$as_echo_n "checking for SORT... " >&6; }
11118          if test ! -x "$tool_specified"; then
11119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11120$as_echo "not found" >&6; }
11121            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11122          fi
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11124$as_echo "$tool_specified" >&6; }
11125        fi
11126      fi
11127    fi
11128
11129  fi
11130
11131
11132
11133  if test "x$SORT" = x; then
11134    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11135  fi
11136
11137
11138
11139
11140
11141  # Publish this variable in the help.
11142
11143
11144  if [ -z "${TAIL+x}" ]; then
11145    # The variable is not set by user, try to locate tool using the code snippet
11146    for ac_prog in tail
11147do
11148  # Extract the first word of "$ac_prog", so it can be a program name with args.
11149set dummy $ac_prog; ac_word=$2
11150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11151$as_echo_n "checking for $ac_word... " >&6; }
11152if ${ac_cv_path_TAIL+:} false; then :
11153  $as_echo_n "(cached) " >&6
11154else
11155  case $TAIL in
11156  [\\/]* | ?:[\\/]*)
11157  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11158  ;;
11159  *)
11160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11161for as_dir in $PATH
11162do
11163  IFS=$as_save_IFS
11164  test -z "$as_dir" && as_dir=.
11165    for ac_exec_ext in '' $ac_executable_extensions; do
11166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11167    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11169    break 2
11170  fi
11171done
11172  done
11173IFS=$as_save_IFS
11174
11175  ;;
11176esac
11177fi
11178TAIL=$ac_cv_path_TAIL
11179if test -n "$TAIL"; then
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11181$as_echo "$TAIL" >&6; }
11182else
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
11185fi
11186
11187
11188  test -n "$TAIL" && break
11189done
11190
11191  else
11192    # The variable is set, but is it from the command line or the environment?
11193
11194    # Try to remove the string !TAIL! from our list.
11195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11197      # If it failed, the variable was not from the command line. Ignore it,
11198      # but warn the user (except for BASH, which is always set by the calling BASH).
11199      if test "xTAIL" != xBASH; then
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11201$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11202      fi
11203      # Try to locate tool using the code snippet
11204      for ac_prog in tail
11205do
11206  # Extract the first word of "$ac_prog", so it can be a program name with args.
11207set dummy $ac_prog; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246  test -n "$TAIL" && break
11247done
11248
11249    else
11250      # If it succeeded, then it was overridden by the user. We will use it
11251      # for the tool.
11252
11253      # First remove it from the list of overridden variables, so we can test
11254      # for unknown variables in the end.
11255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11256
11257      # Check if we try to supply an empty value
11258      if test "x$TAIL" = x; then
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11260$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11262$as_echo_n "checking for TAIL... " >&6; }
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11264$as_echo "disabled" >&6; }
11265      else
11266        # Check if the provided tool contains a complete path.
11267        tool_specified="$TAIL"
11268        tool_basename="${tool_specified##*/}"
11269        if test "x$tool_basename" = "x$tool_specified"; then
11270          # A command without a complete path is provided, search $PATH.
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11272$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11273          # Extract the first word of "$tool_basename", so it can be a program name with args.
11274set dummy $tool_basename; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TAIL+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TAIL in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TAIL=$ac_cv_path_TAIL
11304if test -n "$TAIL"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11306$as_echo "$TAIL" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313          if test "x$TAIL" = x; then
11314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11315          fi
11316        else
11317          # Otherwise we believe it is a complete path. Use it as it is.
11318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11319$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11321$as_echo_n "checking for TAIL... " >&6; }
11322          if test ! -x "$tool_specified"; then
11323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11324$as_echo "not found" >&6; }
11325            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11326          fi
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11328$as_echo "$tool_specified" >&6; }
11329        fi
11330      fi
11331    fi
11332
11333  fi
11334
11335
11336
11337  if test "x$TAIL" = x; then
11338    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11339  fi
11340
11341
11342
11343
11344
11345  # Publish this variable in the help.
11346
11347
11348  if [ -z "${TAR+x}" ]; then
11349    # The variable is not set by user, try to locate tool using the code snippet
11350    for ac_prog in gtar tar
11351do
11352  # Extract the first word of "$ac_prog", so it can be a program name with args.
11353set dummy $ac_prog; ac_word=$2
11354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11355$as_echo_n "checking for $ac_word... " >&6; }
11356if ${ac_cv_path_TAR+:} false; then :
11357  $as_echo_n "(cached) " >&6
11358else
11359  case $TAR in
11360  [\\/]* | ?:[\\/]*)
11361  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11362  ;;
11363  *)
11364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11365for as_dir in $PATH
11366do
11367  IFS=$as_save_IFS
11368  test -z "$as_dir" && as_dir=.
11369    for ac_exec_ext in '' $ac_executable_extensions; do
11370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11371    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11373    break 2
11374  fi
11375done
11376  done
11377IFS=$as_save_IFS
11378
11379  ;;
11380esac
11381fi
11382TAR=$ac_cv_path_TAR
11383if test -n "$TAR"; then
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11385$as_echo "$TAR" >&6; }
11386else
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
11389fi
11390
11391
11392  test -n "$TAR" && break
11393done
11394
11395  else
11396    # The variable is set, but is it from the command line or the environment?
11397
11398    # Try to remove the string !TAR! from our list.
11399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11401      # If it failed, the variable was not from the command line. Ignore it,
11402      # but warn the user (except for BASH, which is always set by the calling BASH).
11403      if test "xTAR" != xBASH; then
11404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11405$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11406      fi
11407      # Try to locate tool using the code snippet
11408      for ac_prog in gtar tar
11409do
11410  # Extract the first word of "$ac_prog", so it can be a program name with args.
11411set dummy $ac_prog; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450  test -n "$TAR" && break
11451done
11452
11453    else
11454      # If it succeeded, then it was overridden by the user. We will use it
11455      # for the tool.
11456
11457      # First remove it from the list of overridden variables, so we can test
11458      # for unknown variables in the end.
11459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11460
11461      # Check if we try to supply an empty value
11462      if test "x$TAR" = x; then
11463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11464$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11466$as_echo_n "checking for TAR... " >&6; }
11467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11468$as_echo "disabled" >&6; }
11469      else
11470        # Check if the provided tool contains a complete path.
11471        tool_specified="$TAR"
11472        tool_basename="${tool_specified##*/}"
11473        if test "x$tool_basename" = "x$tool_specified"; then
11474          # A command without a complete path is provided, search $PATH.
11475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11476$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11477          # Extract the first word of "$tool_basename", so it can be a program name with args.
11478set dummy $tool_basename; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TAR+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TAR in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TAR=$ac_cv_path_TAR
11508if test -n "$TAR"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11510$as_echo "$TAR" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517          if test "x$TAR" = x; then
11518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11519          fi
11520        else
11521          # Otherwise we believe it is a complete path. Use it as it is.
11522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11523$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11525$as_echo_n "checking for TAR... " >&6; }
11526          if test ! -x "$tool_specified"; then
11527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11528$as_echo "not found" >&6; }
11529            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11530          fi
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11532$as_echo "$tool_specified" >&6; }
11533        fi
11534      fi
11535    fi
11536
11537  fi
11538
11539
11540
11541  if test "x$TAR" = x; then
11542    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11543  fi
11544
11545
11546
11547
11548
11549  # Publish this variable in the help.
11550
11551
11552  if [ -z "${TEE+x}" ]; then
11553    # The variable is not set by user, try to locate tool using the code snippet
11554    for ac_prog in tee
11555do
11556  # Extract the first word of "$ac_prog", so it can be a program name with args.
11557set dummy $ac_prog; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_TEE+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $TEE in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586TEE=$ac_cv_path_TEE
11587if test -n "$TEE"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11589$as_echo "$TEE" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596  test -n "$TEE" && break
11597done
11598
11599  else
11600    # The variable is set, but is it from the command line or the environment?
11601
11602    # Try to remove the string !TEE! from our list.
11603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11605      # If it failed, the variable was not from the command line. Ignore it,
11606      # but warn the user (except for BASH, which is always set by the calling BASH).
11607      if test "xTEE" != xBASH; then
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11609$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11610      fi
11611      # Try to locate tool using the code snippet
11612      for ac_prog in tee
11613do
11614  # Extract the first word of "$ac_prog", so it can be a program name with args.
11615set dummy $ac_prog; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654  test -n "$TEE" && break
11655done
11656
11657    else
11658      # If it succeeded, then it was overridden by the user. We will use it
11659      # for the tool.
11660
11661      # First remove it from the list of overridden variables, so we can test
11662      # for unknown variables in the end.
11663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11664
11665      # Check if we try to supply an empty value
11666      if test "x$TEE" = x; then
11667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11668$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11670$as_echo_n "checking for TEE... " >&6; }
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11672$as_echo "disabled" >&6; }
11673      else
11674        # Check if the provided tool contains a complete path.
11675        tool_specified="$TEE"
11676        tool_basename="${tool_specified##*/}"
11677        if test "x$tool_basename" = "x$tool_specified"; then
11678          # A command without a complete path is provided, search $PATH.
11679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11680$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11681          # Extract the first word of "$tool_basename", so it can be a program name with args.
11682set dummy $tool_basename; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_TEE+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $TEE in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711TEE=$ac_cv_path_TEE
11712if test -n "$TEE"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11714$as_echo "$TEE" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721          if test "x$TEE" = x; then
11722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11723          fi
11724        else
11725          # Otherwise we believe it is a complete path. Use it as it is.
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11727$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11729$as_echo_n "checking for TEE... " >&6; }
11730          if test ! -x "$tool_specified"; then
11731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11732$as_echo "not found" >&6; }
11733            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11734          fi
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11736$as_echo "$tool_specified" >&6; }
11737        fi
11738      fi
11739    fi
11740
11741  fi
11742
11743
11744
11745  if test "x$TEE" = x; then
11746    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11747  fi
11748
11749
11750
11751
11752
11753  # Publish this variable in the help.
11754
11755
11756  if [ -z "${TOUCH+x}" ]; then
11757    # The variable is not set by user, try to locate tool using the code snippet
11758    for ac_prog in touch
11759do
11760  # Extract the first word of "$ac_prog", so it can be a program name with args.
11761set dummy $ac_prog; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_TOUCH+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $TOUCH in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790TOUCH=$ac_cv_path_TOUCH
11791if test -n "$TOUCH"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11793$as_echo "$TOUCH" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800  test -n "$TOUCH" && break
11801done
11802
11803  else
11804    # The variable is set, but is it from the command line or the environment?
11805
11806    # Try to remove the string !TOUCH! from our list.
11807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11809      # If it failed, the variable was not from the command line. Ignore it,
11810      # but warn the user (except for BASH, which is always set by the calling BASH).
11811      if test "xTOUCH" != xBASH; then
11812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11813$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11814      fi
11815      # Try to locate tool using the code snippet
11816      for ac_prog in touch
11817do
11818  # Extract the first word of "$ac_prog", so it can be a program name with args.
11819set dummy $ac_prog; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858  test -n "$TOUCH" && break
11859done
11860
11861    else
11862      # If it succeeded, then it was overridden by the user. We will use it
11863      # for the tool.
11864
11865      # First remove it from the list of overridden variables, so we can test
11866      # for unknown variables in the end.
11867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11868
11869      # Check if we try to supply an empty value
11870      if test "x$TOUCH" = x; then
11871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11872$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11874$as_echo_n "checking for TOUCH... " >&6; }
11875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11876$as_echo "disabled" >&6; }
11877      else
11878        # Check if the provided tool contains a complete path.
11879        tool_specified="$TOUCH"
11880        tool_basename="${tool_specified##*/}"
11881        if test "x$tool_basename" = "x$tool_specified"; then
11882          # A command without a complete path is provided, search $PATH.
11883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11884$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11885          # Extract the first word of "$tool_basename", so it can be a program name with args.
11886set dummy $tool_basename; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_TOUCH+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $TOUCH in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915TOUCH=$ac_cv_path_TOUCH
11916if test -n "$TOUCH"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11918$as_echo "$TOUCH" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925          if test "x$TOUCH" = x; then
11926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11927          fi
11928        else
11929          # Otherwise we believe it is a complete path. Use it as it is.
11930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11931$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11933$as_echo_n "checking for TOUCH... " >&6; }
11934          if test ! -x "$tool_specified"; then
11935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11936$as_echo "not found" >&6; }
11937            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11938          fi
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11940$as_echo "$tool_specified" >&6; }
11941        fi
11942      fi
11943    fi
11944
11945  fi
11946
11947
11948
11949  if test "x$TOUCH" = x; then
11950    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11951  fi
11952
11953
11954
11955
11956
11957  # Publish this variable in the help.
11958
11959
11960  if [ -z "${TR+x}" ]; then
11961    # The variable is not set by user, try to locate tool using the code snippet
11962    for ac_prog in tr
11963do
11964  # Extract the first word of "$ac_prog", so it can be a program name with args.
11965set dummy $ac_prog; ac_word=$2
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11967$as_echo_n "checking for $ac_word... " >&6; }
11968if ${ac_cv_path_TR+:} false; then :
11969  $as_echo_n "(cached) " >&6
11970else
11971  case $TR in
11972  [\\/]* | ?:[\\/]*)
11973  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11974  ;;
11975  *)
11976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11977for as_dir in $PATH
11978do
11979  IFS=$as_save_IFS
11980  test -z "$as_dir" && as_dir=.
11981    for ac_exec_ext in '' $ac_executable_extensions; do
11982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11983    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11985    break 2
11986  fi
11987done
11988  done
11989IFS=$as_save_IFS
11990
11991  ;;
11992esac
11993fi
11994TR=$ac_cv_path_TR
11995if test -n "$TR"; then
11996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11997$as_echo "$TR" >&6; }
11998else
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
12001fi
12002
12003
12004  test -n "$TR" && break
12005done
12006
12007  else
12008    # The variable is set, but is it from the command line or the environment?
12009
12010    # Try to remove the string !TR! from our list.
12011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12013      # If it failed, the variable was not from the command line. Ignore it,
12014      # but warn the user (except for BASH, which is always set by the calling BASH).
12015      if test "xTR" != xBASH; then
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12017$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12018      fi
12019      # Try to locate tool using the code snippet
12020      for ac_prog in tr
12021do
12022  # Extract the first word of "$ac_prog", so it can be a program name with args.
12023set dummy $ac_prog; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062  test -n "$TR" && break
12063done
12064
12065    else
12066      # If it succeeded, then it was overridden by the user. We will use it
12067      # for the tool.
12068
12069      # First remove it from the list of overridden variables, so we can test
12070      # for unknown variables in the end.
12071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12072
12073      # Check if we try to supply an empty value
12074      if test "x$TR" = x; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12076$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12078$as_echo_n "checking for TR... " >&6; }
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12080$as_echo "disabled" >&6; }
12081      else
12082        # Check if the provided tool contains a complete path.
12083        tool_specified="$TR"
12084        tool_basename="${tool_specified##*/}"
12085        if test "x$tool_basename" = "x$tool_specified"; then
12086          # A command without a complete path is provided, search $PATH.
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12088$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12089          # Extract the first word of "$tool_basename", so it can be a program name with args.
12090set dummy $tool_basename; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_TR+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $TR in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119TR=$ac_cv_path_TR
12120if test -n "$TR"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12122$as_echo "$TR" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129          if test "x$TR" = x; then
12130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12131          fi
12132        else
12133          # Otherwise we believe it is a complete path. Use it as it is.
12134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12135$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12137$as_echo_n "checking for TR... " >&6; }
12138          if test ! -x "$tool_specified"; then
12139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12140$as_echo "not found" >&6; }
12141            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12142          fi
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12144$as_echo "$tool_specified" >&6; }
12145        fi
12146      fi
12147    fi
12148
12149  fi
12150
12151
12152
12153  if test "x$TR" = x; then
12154    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12155  fi
12156
12157
12158
12159
12160
12161  # Publish this variable in the help.
12162
12163
12164  if [ -z "${UNAME+x}" ]; then
12165    # The variable is not set by user, try to locate tool using the code snippet
12166    for ac_prog in uname
12167do
12168  # Extract the first word of "$ac_prog", so it can be a program name with args.
12169set dummy $ac_prog; ac_word=$2
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12171$as_echo_n "checking for $ac_word... " >&6; }
12172if ${ac_cv_path_UNAME+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  case $UNAME in
12176  [\\/]* | ?:[\\/]*)
12177  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12178  ;;
12179  *)
12180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_exec_ext in '' $ac_executable_extensions; do
12186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189    break 2
12190  fi
12191done
12192  done
12193IFS=$as_save_IFS
12194
12195  ;;
12196esac
12197fi
12198UNAME=$ac_cv_path_UNAME
12199if test -n "$UNAME"; then
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12201$as_echo "$UNAME" >&6; }
12202else
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12204$as_echo "no" >&6; }
12205fi
12206
12207
12208  test -n "$UNAME" && break
12209done
12210
12211  else
12212    # The variable is set, but is it from the command line or the environment?
12213
12214    # Try to remove the string !UNAME! from our list.
12215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12217      # If it failed, the variable was not from the command line. Ignore it,
12218      # but warn the user (except for BASH, which is always set by the calling BASH).
12219      if test "xUNAME" != xBASH; then
12220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12221$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12222      fi
12223      # Try to locate tool using the code snippet
12224      for ac_prog in uname
12225do
12226  # Extract the first word of "$ac_prog", so it can be a program name with args.
12227set dummy $ac_prog; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266  test -n "$UNAME" && break
12267done
12268
12269    else
12270      # If it succeeded, then it was overridden by the user. We will use it
12271      # for the tool.
12272
12273      # First remove it from the list of overridden variables, so we can test
12274      # for unknown variables in the end.
12275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12276
12277      # Check if we try to supply an empty value
12278      if test "x$UNAME" = x; then
12279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12280$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12282$as_echo_n "checking for UNAME... " >&6; }
12283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12284$as_echo "disabled" >&6; }
12285      else
12286        # Check if the provided tool contains a complete path.
12287        tool_specified="$UNAME"
12288        tool_basename="${tool_specified##*/}"
12289        if test "x$tool_basename" = "x$tool_specified"; then
12290          # A command without a complete path is provided, search $PATH.
12291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12292$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12293          # Extract the first word of "$tool_basename", so it can be a program name with args.
12294set dummy $tool_basename; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_UNAME+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $UNAME in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323UNAME=$ac_cv_path_UNAME
12324if test -n "$UNAME"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12326$as_echo "$UNAME" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333          if test "x$UNAME" = x; then
12334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12335          fi
12336        else
12337          # Otherwise we believe it is a complete path. Use it as it is.
12338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12339$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12341$as_echo_n "checking for UNAME... " >&6; }
12342          if test ! -x "$tool_specified"; then
12343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12344$as_echo "not found" >&6; }
12345            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12346          fi
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12348$as_echo "$tool_specified" >&6; }
12349        fi
12350      fi
12351    fi
12352
12353  fi
12354
12355
12356
12357  if test "x$UNAME" = x; then
12358    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12359  fi
12360
12361
12362
12363
12364
12365  # Publish this variable in the help.
12366
12367
12368  if [ -z "${UNIQ+x}" ]; then
12369    # The variable is not set by user, try to locate tool using the code snippet
12370    for ac_prog in uniq
12371do
12372  # Extract the first word of "$ac_prog", so it can be a program name with args.
12373set dummy $ac_prog; ac_word=$2
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12375$as_echo_n "checking for $ac_word... " >&6; }
12376if ${ac_cv_path_UNIQ+:} false; then :
12377  $as_echo_n "(cached) " >&6
12378else
12379  case $UNIQ in
12380  [\\/]* | ?:[\\/]*)
12381  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12382  ;;
12383  *)
12384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12385for as_dir in $PATH
12386do
12387  IFS=$as_save_IFS
12388  test -z "$as_dir" && as_dir=.
12389    for ac_exec_ext in '' $ac_executable_extensions; do
12390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12391    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12393    break 2
12394  fi
12395done
12396  done
12397IFS=$as_save_IFS
12398
12399  ;;
12400esac
12401fi
12402UNIQ=$ac_cv_path_UNIQ
12403if test -n "$UNIQ"; then
12404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12405$as_echo "$UNIQ" >&6; }
12406else
12407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408$as_echo "no" >&6; }
12409fi
12410
12411
12412  test -n "$UNIQ" && break
12413done
12414
12415  else
12416    # The variable is set, but is it from the command line or the environment?
12417
12418    # Try to remove the string !UNIQ! from our list.
12419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12421      # If it failed, the variable was not from the command line. Ignore it,
12422      # but warn the user (except for BASH, which is always set by the calling BASH).
12423      if test "xUNIQ" != xBASH; then
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12425$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12426      fi
12427      # Try to locate tool using the code snippet
12428      for ac_prog in uniq
12429do
12430  # Extract the first word of "$ac_prog", so it can be a program name with args.
12431set dummy $ac_prog; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470  test -n "$UNIQ" && break
12471done
12472
12473    else
12474      # If it succeeded, then it was overridden by the user. We will use it
12475      # for the tool.
12476
12477      # First remove it from the list of overridden variables, so we can test
12478      # for unknown variables in the end.
12479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12480
12481      # Check if we try to supply an empty value
12482      if test "x$UNIQ" = x; then
12483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12484$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12486$as_echo_n "checking for UNIQ... " >&6; }
12487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12488$as_echo "disabled" >&6; }
12489      else
12490        # Check if the provided tool contains a complete path.
12491        tool_specified="$UNIQ"
12492        tool_basename="${tool_specified##*/}"
12493        if test "x$tool_basename" = "x$tool_specified"; then
12494          # A command without a complete path is provided, search $PATH.
12495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12497          # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_UNIQ+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $UNIQ in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527UNIQ=$ac_cv_path_UNIQ
12528if test -n "$UNIQ"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12530$as_echo "$UNIQ" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537          if test "x$UNIQ" = x; then
12538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539          fi
12540        else
12541          # Otherwise we believe it is a complete path. Use it as it is.
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12545$as_echo_n "checking for UNIQ... " >&6; }
12546          if test ! -x "$tool_specified"; then
12547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12550          fi
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553        fi
12554      fi
12555    fi
12556
12557  fi
12558
12559
12560
12561  if test "x$UNIQ" = x; then
12562    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12563  fi
12564
12565
12566
12567
12568
12569  # Publish this variable in the help.
12570
12571
12572  if [ -z "${WC+x}" ]; then
12573    # The variable is not set by user, try to locate tool using the code snippet
12574    for ac_prog in wc
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_WC+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $WC in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606WC=$ac_cv_path_WC
12607if test -n "$WC"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12609$as_echo "$WC" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$WC" && break
12617done
12618
12619  else
12620    # The variable is set, but is it from the command line or the environment?
12621
12622    # Try to remove the string !WC! from our list.
12623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625      # If it failed, the variable was not from the command line. Ignore it,
12626      # but warn the user (except for BASH, which is always set by the calling BASH).
12627      if test "xWC" != xBASH; then
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12629$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12630      fi
12631      # Try to locate tool using the code snippet
12632      for ac_prog in wc
12633do
12634  # Extract the first word of "$ac_prog", so it can be a program name with args.
12635set dummy $ac_prog; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674  test -n "$WC" && break
12675done
12676
12677    else
12678      # If it succeeded, then it was overridden by the user. We will use it
12679      # for the tool.
12680
12681      # First remove it from the list of overridden variables, so we can test
12682      # for unknown variables in the end.
12683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684
12685      # Check if we try to supply an empty value
12686      if test "x$WC" = x; then
12687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12688$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12690$as_echo_n "checking for WC... " >&6; }
12691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12692$as_echo "disabled" >&6; }
12693      else
12694        # Check if the provided tool contains a complete path.
12695        tool_specified="$WC"
12696        tool_basename="${tool_specified##*/}"
12697        if test "x$tool_basename" = "x$tool_specified"; then
12698          # A command without a complete path is provided, search $PATH.
12699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12700$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12701          # Extract the first word of "$tool_basename", so it can be a program name with args.
12702set dummy $tool_basename; ac_word=$2
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12704$as_echo_n "checking for $ac_word... " >&6; }
12705if ${ac_cv_path_WC+:} false; then :
12706  $as_echo_n "(cached) " >&6
12707else
12708  case $WC in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716  IFS=$as_save_IFS
12717  test -z "$as_dir" && as_dir=.
12718    for ac_exec_ext in '' $ac_executable_extensions; do
12719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12720    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12722    break 2
12723  fi
12724done
12725  done
12726IFS=$as_save_IFS
12727
12728  ;;
12729esac
12730fi
12731WC=$ac_cv_path_WC
12732if test -n "$WC"; then
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12734$as_echo "$WC" >&6; }
12735else
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738fi
12739
12740
12741          if test "x$WC" = x; then
12742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12743          fi
12744        else
12745          # Otherwise we believe it is a complete path. Use it as it is.
12746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12747$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12749$as_echo_n "checking for WC... " >&6; }
12750          if test ! -x "$tool_specified"; then
12751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12752$as_echo "not found" >&6; }
12753            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12754          fi
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12756$as_echo "$tool_specified" >&6; }
12757        fi
12758      fi
12759    fi
12760
12761  fi
12762
12763
12764
12765  if test "x$WC" = x; then
12766    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12767  fi
12768
12769
12770
12771
12772
12773  # Publish this variable in the help.
12774
12775
12776  if [ -z "${WHICH+x}" ]; then
12777    # The variable is not set by user, try to locate tool using the code snippet
12778    for ac_prog in which
12779do
12780  # Extract the first word of "$ac_prog", so it can be a program name with args.
12781set dummy $ac_prog; ac_word=$2
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783$as_echo_n "checking for $ac_word... " >&6; }
12784if ${ac_cv_path_WHICH+:} false; then :
12785  $as_echo_n "(cached) " >&6
12786else
12787  case $WHICH in
12788  [\\/]* | ?:[\\/]*)
12789  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12790  ;;
12791  *)
12792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793for as_dir in $PATH
12794do
12795  IFS=$as_save_IFS
12796  test -z "$as_dir" && as_dir=.
12797    for ac_exec_ext in '' $ac_executable_extensions; do
12798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801    break 2
12802  fi
12803done
12804  done
12805IFS=$as_save_IFS
12806
12807  ;;
12808esac
12809fi
12810WHICH=$ac_cv_path_WHICH
12811if test -n "$WHICH"; then
12812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12813$as_echo "$WHICH" >&6; }
12814else
12815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816$as_echo "no" >&6; }
12817fi
12818
12819
12820  test -n "$WHICH" && break
12821done
12822
12823  else
12824    # The variable is set, but is it from the command line or the environment?
12825
12826    # Try to remove the string !WHICH! from our list.
12827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12829      # If it failed, the variable was not from the command line. Ignore it,
12830      # but warn the user (except for BASH, which is always set by the calling BASH).
12831      if test "xWHICH" != xBASH; then
12832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12833$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12834      fi
12835      # Try to locate tool using the code snippet
12836      for ac_prog in which
12837do
12838  # Extract the first word of "$ac_prog", so it can be a program name with args.
12839set dummy $ac_prog; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878  test -n "$WHICH" && break
12879done
12880
12881    else
12882      # If it succeeded, then it was overridden by the user. We will use it
12883      # for the tool.
12884
12885      # First remove it from the list of overridden variables, so we can test
12886      # for unknown variables in the end.
12887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12888
12889      # Check if we try to supply an empty value
12890      if test "x$WHICH" = x; then
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12892$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12894$as_echo_n "checking for WHICH... " >&6; }
12895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12896$as_echo "disabled" >&6; }
12897      else
12898        # Check if the provided tool contains a complete path.
12899        tool_specified="$WHICH"
12900        tool_basename="${tool_specified##*/}"
12901        if test "x$tool_basename" = "x$tool_specified"; then
12902          # A command without a complete path is provided, search $PATH.
12903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12904$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12905          # Extract the first word of "$tool_basename", so it can be a program name with args.
12906set dummy $tool_basename; ac_word=$2
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12908$as_echo_n "checking for $ac_word... " >&6; }
12909if ${ac_cv_path_WHICH+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  case $WHICH in
12913  [\\/]* | ?:[\\/]*)
12914  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12915  ;;
12916  *)
12917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918for as_dir in $PATH
12919do
12920  IFS=$as_save_IFS
12921  test -z "$as_dir" && as_dir=.
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12924    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12926    break 2
12927  fi
12928done
12929  done
12930IFS=$as_save_IFS
12931
12932  ;;
12933esac
12934fi
12935WHICH=$ac_cv_path_WHICH
12936if test -n "$WHICH"; then
12937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12938$as_echo "$WHICH" >&6; }
12939else
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12941$as_echo "no" >&6; }
12942fi
12943
12944
12945          if test "x$WHICH" = x; then
12946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12947          fi
12948        else
12949          # Otherwise we believe it is a complete path. Use it as it is.
12950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12951$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12953$as_echo_n "checking for WHICH... " >&6; }
12954          if test ! -x "$tool_specified"; then
12955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12956$as_echo "not found" >&6; }
12957            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12958          fi
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12960$as_echo "$tool_specified" >&6; }
12961        fi
12962      fi
12963    fi
12964
12965  fi
12966
12967
12968
12969  if test "x$WHICH" = x; then
12970    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12971  fi
12972
12973
12974
12975
12976
12977  # Publish this variable in the help.
12978
12979
12980  if [ -z "${XARGS+x}" ]; then
12981    # The variable is not set by user, try to locate tool using the code snippet
12982    for ac_prog in xargs
12983do
12984  # Extract the first word of "$ac_prog", so it can be a program name with args.
12985set dummy $ac_prog; ac_word=$2
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12987$as_echo_n "checking for $ac_word... " >&6; }
12988if ${ac_cv_path_XARGS+:} false; then :
12989  $as_echo_n "(cached) " >&6
12990else
12991  case $XARGS in
12992  [\\/]* | ?:[\\/]*)
12993  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12994  ;;
12995  *)
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_exec_ext in '' $ac_executable_extensions; do
13002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13003    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13005    break 2
13006  fi
13007done
13008  done
13009IFS=$as_save_IFS
13010
13011  ;;
13012esac
13013fi
13014XARGS=$ac_cv_path_XARGS
13015if test -n "$XARGS"; then
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13017$as_echo "$XARGS" >&6; }
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
13021fi
13022
13023
13024  test -n "$XARGS" && break
13025done
13026
13027  else
13028    # The variable is set, but is it from the command line or the environment?
13029
13030    # Try to remove the string !XARGS! from our list.
13031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13033      # If it failed, the variable was not from the command line. Ignore it,
13034      # but warn the user (except for BASH, which is always set by the calling BASH).
13035      if test "xXARGS" != xBASH; then
13036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13037$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13038      fi
13039      # Try to locate tool using the code snippet
13040      for ac_prog in xargs
13041do
13042  # Extract the first word of "$ac_prog", so it can be a program name with args.
13043set dummy $ac_prog; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082  test -n "$XARGS" && break
13083done
13084
13085    else
13086      # If it succeeded, then it was overridden by the user. We will use it
13087      # for the tool.
13088
13089      # First remove it from the list of overridden variables, so we can test
13090      # for unknown variables in the end.
13091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13092
13093      # Check if we try to supply an empty value
13094      if test "x$XARGS" = x; then
13095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13096$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13098$as_echo_n "checking for XARGS... " >&6; }
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13100$as_echo "disabled" >&6; }
13101      else
13102        # Check if the provided tool contains a complete path.
13103        tool_specified="$XARGS"
13104        tool_basename="${tool_specified##*/}"
13105        if test "x$tool_basename" = "x$tool_specified"; then
13106          # A command without a complete path is provided, search $PATH.
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13108$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13109          # Extract the first word of "$tool_basename", so it can be a program name with args.
13110set dummy $tool_basename; ac_word=$2
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13112$as_echo_n "checking for $ac_word... " >&6; }
13113if ${ac_cv_path_XARGS+:} false; then :
13114  $as_echo_n "(cached) " >&6
13115else
13116  case $XARGS in
13117  [\\/]* | ?:[\\/]*)
13118  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13119  ;;
13120  *)
13121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13122for as_dir in $PATH
13123do
13124  IFS=$as_save_IFS
13125  test -z "$as_dir" && as_dir=.
13126    for ac_exec_ext in '' $ac_executable_extensions; do
13127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13128    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13130    break 2
13131  fi
13132done
13133  done
13134IFS=$as_save_IFS
13135
13136  ;;
13137esac
13138fi
13139XARGS=$ac_cv_path_XARGS
13140if test -n "$XARGS"; then
13141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13142$as_echo "$XARGS" >&6; }
13143else
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13145$as_echo "no" >&6; }
13146fi
13147
13148
13149          if test "x$XARGS" = x; then
13150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13151          fi
13152        else
13153          # Otherwise we believe it is a complete path. Use it as it is.
13154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13155$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13157$as_echo_n "checking for XARGS... " >&6; }
13158          if test ! -x "$tool_specified"; then
13159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13160$as_echo "not found" >&6; }
13161            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13162          fi
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13164$as_echo "$tool_specified" >&6; }
13165        fi
13166      fi
13167    fi
13168
13169  fi
13170
13171
13172
13173  if test "x$XARGS" = x; then
13174    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13175  fi
13176
13177
13178
13179  # Then required tools that require some special treatment.
13180
13181
13182  # Publish this variable in the help.
13183
13184
13185  if [ -z "${AWK+x}" ]; then
13186    # The variable is not set by user, try to locate tool using the code snippet
13187    for ac_prog in gawk mawk nawk awk
13188do
13189  # Extract the first word of "$ac_prog", so it can be a program name with args.
13190set dummy $ac_prog; ac_word=$2
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13192$as_echo_n "checking for $ac_word... " >&6; }
13193if ${ac_cv_prog_AWK+:} false; then :
13194  $as_echo_n "(cached) " >&6
13195else
13196  if test -n "$AWK"; then
13197  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13198else
13199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200for as_dir in $PATH
13201do
13202  IFS=$as_save_IFS
13203  test -z "$as_dir" && as_dir=.
13204    for ac_exec_ext in '' $ac_executable_extensions; do
13205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13206    ac_cv_prog_AWK="$ac_prog"
13207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13208    break 2
13209  fi
13210done
13211  done
13212IFS=$as_save_IFS
13213
13214fi
13215fi
13216AWK=$ac_cv_prog_AWK
13217if test -n "$AWK"; then
13218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13219$as_echo "$AWK" >&6; }
13220else
13221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13222$as_echo "no" >&6; }
13223fi
13224
13225
13226  test -n "$AWK" && break
13227done
13228
13229  else
13230    # The variable is set, but is it from the command line or the environment?
13231
13232    # Try to remove the string !AWK! from our list.
13233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13235      # If it failed, the variable was not from the command line. Ignore it,
13236      # but warn the user (except for BASH, which is always set by the calling BASH).
13237      if test "xAWK" != xBASH; then
13238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13239$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13240      fi
13241      # Try to locate tool using the code snippet
13242      for ac_prog in gawk mawk nawk awk
13243do
13244  # Extract the first word of "$ac_prog", so it can be a program name with args.
13245set dummy $ac_prog; ac_word=$2
13246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13247$as_echo_n "checking for $ac_word... " >&6; }
13248if ${ac_cv_prog_AWK+:} false; then :
13249  $as_echo_n "(cached) " >&6
13250else
13251  if test -n "$AWK"; then
13252  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13253else
13254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255for as_dir in $PATH
13256do
13257  IFS=$as_save_IFS
13258  test -z "$as_dir" && as_dir=.
13259    for ac_exec_ext in '' $ac_executable_extensions; do
13260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261    ac_cv_prog_AWK="$ac_prog"
13262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263    break 2
13264  fi
13265done
13266  done
13267IFS=$as_save_IFS
13268
13269fi
13270fi
13271AWK=$ac_cv_prog_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281  test -n "$AWK" && break
13282done
13283
13284    else
13285      # If it succeeded, then it was overridden by the user. We will use it
13286      # for the tool.
13287
13288      # First remove it from the list of overridden variables, so we can test
13289      # for unknown variables in the end.
13290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13291
13292      # Check if we try to supply an empty value
13293      if test "x$AWK" = x; then
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13295$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13297$as_echo_n "checking for AWK... " >&6; }
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13299$as_echo "disabled" >&6; }
13300      else
13301        # Check if the provided tool contains a complete path.
13302        tool_specified="$AWK"
13303        tool_basename="${tool_specified##*/}"
13304        if test "x$tool_basename" = "x$tool_specified"; then
13305          # A command without a complete path is provided, search $PATH.
13306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13307$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13308          # Extract the first word of "$tool_basename", so it can be a program name with args.
13309set dummy $tool_basename; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_path_AWK+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  case $AWK in
13316  [\\/]* | ?:[\\/]*)
13317  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13318  ;;
13319  *)
13320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13321for as_dir in $PATH
13322do
13323  IFS=$as_save_IFS
13324  test -z "$as_dir" && as_dir=.
13325    for ac_exec_ext in '' $ac_executable_extensions; do
13326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13327    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13329    break 2
13330  fi
13331done
13332  done
13333IFS=$as_save_IFS
13334
13335  ;;
13336esac
13337fi
13338AWK=$ac_cv_path_AWK
13339if test -n "$AWK"; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13341$as_echo "$AWK" >&6; }
13342else
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
13345fi
13346
13347
13348          if test "x$AWK" = x; then
13349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13350          fi
13351        else
13352          # Otherwise we believe it is a complete path. Use it as it is.
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13354$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13356$as_echo_n "checking for AWK... " >&6; }
13357          if test ! -x "$tool_specified"; then
13358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13359$as_echo "not found" >&6; }
13360            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13361          fi
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13363$as_echo "$tool_specified" >&6; }
13364        fi
13365      fi
13366    fi
13367
13368  fi
13369
13370
13371  if test "x$AWK" = x; then
13372    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13373  fi
13374
13375
13376
13377
13378  # Publish this variable in the help.
13379
13380
13381  if [ -z "${GREP+x}" ]; then
13382    # The variable is not set by user, try to locate tool using the code snippet
13383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13384$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13385if ${ac_cv_path_GREP+:} false; then :
13386  $as_echo_n "(cached) " >&6
13387else
13388  if test -z "$GREP"; then
13389  ac_path_GREP_found=false
13390  # Loop through the user's path and test for each of PROGNAME-LIST
13391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13392for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13393do
13394  IFS=$as_save_IFS
13395  test -z "$as_dir" && as_dir=.
13396    for ac_prog in grep ggrep; do
13397    for ac_exec_ext in '' $ac_executable_extensions; do
13398      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13399      as_fn_executable_p "$ac_path_GREP" || continue
13400# Check for GNU ac_path_GREP and select it if it is found.
13401  # Check for GNU $ac_path_GREP
13402case `"$ac_path_GREP" --version 2>&1` in
13403*GNU*)
13404  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13405*)
13406  ac_count=0
13407  $as_echo_n 0123456789 >"conftest.in"
13408  while :
13409  do
13410    cat "conftest.in" "conftest.in" >"conftest.tmp"
13411    mv "conftest.tmp" "conftest.in"
13412    cp "conftest.in" "conftest.nl"
13413    $as_echo 'GREP' >> "conftest.nl"
13414    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13415    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13416    as_fn_arith $ac_count + 1 && ac_count=$as_val
13417    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13418      # Best one so far, save it but keep looking for a better one
13419      ac_cv_path_GREP="$ac_path_GREP"
13420      ac_path_GREP_max=$ac_count
13421    fi
13422    # 10*(2^10) chars as input seems more than enough
13423    test $ac_count -gt 10 && break
13424  done
13425  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13426esac
13427
13428      $ac_path_GREP_found && break 3
13429    done
13430  done
13431  done
13432IFS=$as_save_IFS
13433  if test -z "$ac_cv_path_GREP"; then
13434    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13435  fi
13436else
13437  ac_cv_path_GREP=$GREP
13438fi
13439
13440fi
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13442$as_echo "$ac_cv_path_GREP" >&6; }
13443 GREP="$ac_cv_path_GREP"
13444
13445
13446  else
13447    # The variable is set, but is it from the command line or the environment?
13448
13449    # Try to remove the string !GREP! from our list.
13450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13452      # If it failed, the variable was not from the command line. Ignore it,
13453      # but warn the user (except for BASH, which is always set by the calling BASH).
13454      if test "xGREP" != xBASH; then
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13456$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13457      fi
13458      # Try to locate tool using the code snippet
13459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13460$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13461if ${ac_cv_path_GREP+:} false; then :
13462  $as_echo_n "(cached) " >&6
13463else
13464  if test -z "$GREP"; then
13465  ac_path_GREP_found=false
13466  # Loop through the user's path and test for each of PROGNAME-LIST
13467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13469do
13470  IFS=$as_save_IFS
13471  test -z "$as_dir" && as_dir=.
13472    for ac_prog in grep ggrep; do
13473    for ac_exec_ext in '' $ac_executable_extensions; do
13474      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13475      as_fn_executable_p "$ac_path_GREP" || continue
13476# Check for GNU ac_path_GREP and select it if it is found.
13477  # Check for GNU $ac_path_GREP
13478case `"$ac_path_GREP" --version 2>&1` in
13479*GNU*)
13480  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13481*)
13482  ac_count=0
13483  $as_echo_n 0123456789 >"conftest.in"
13484  while :
13485  do
13486    cat "conftest.in" "conftest.in" >"conftest.tmp"
13487    mv "conftest.tmp" "conftest.in"
13488    cp "conftest.in" "conftest.nl"
13489    $as_echo 'GREP' >> "conftest.nl"
13490    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13491    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13492    as_fn_arith $ac_count + 1 && ac_count=$as_val
13493    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13494      # Best one so far, save it but keep looking for a better one
13495      ac_cv_path_GREP="$ac_path_GREP"
13496      ac_path_GREP_max=$ac_count
13497    fi
13498    # 10*(2^10) chars as input seems more than enough
13499    test $ac_count -gt 10 && break
13500  done
13501  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13502esac
13503
13504      $ac_path_GREP_found && break 3
13505    done
13506  done
13507  done
13508IFS=$as_save_IFS
13509  if test -z "$ac_cv_path_GREP"; then
13510    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13511  fi
13512else
13513  ac_cv_path_GREP=$GREP
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13518$as_echo "$ac_cv_path_GREP" >&6; }
13519 GREP="$ac_cv_path_GREP"
13520
13521
13522    else
13523      # If it succeeded, then it was overridden by the user. We will use it
13524      # for the tool.
13525
13526      # First remove it from the list of overridden variables, so we can test
13527      # for unknown variables in the end.
13528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13529
13530      # Check if we try to supply an empty value
13531      if test "x$GREP" = x; then
13532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13533$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13535$as_echo_n "checking for GREP... " >&6; }
13536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13537$as_echo "disabled" >&6; }
13538      else
13539        # Check if the provided tool contains a complete path.
13540        tool_specified="$GREP"
13541        tool_basename="${tool_specified##*/}"
13542        if test "x$tool_basename" = "x$tool_specified"; then
13543          # A command without a complete path is provided, search $PATH.
13544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13545$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13546          # Extract the first word of "$tool_basename", so it can be a program name with args.
13547set dummy $tool_basename; ac_word=$2
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13549$as_echo_n "checking for $ac_word... " >&6; }
13550if ${ac_cv_path_GREP+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  case $GREP in
13554  [\\/]* | ?:[\\/]*)
13555  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13556  ;;
13557  *)
13558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13559for as_dir in $PATH
13560do
13561  IFS=$as_save_IFS
13562  test -z "$as_dir" && as_dir=.
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13565    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13567    break 2
13568  fi
13569done
13570  done
13571IFS=$as_save_IFS
13572
13573  ;;
13574esac
13575fi
13576GREP=$ac_cv_path_GREP
13577if test -n "$GREP"; then
13578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13579$as_echo "$GREP" >&6; }
13580else
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
13583fi
13584
13585
13586          if test "x$GREP" = x; then
13587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13588          fi
13589        else
13590          # Otherwise we believe it is a complete path. Use it as it is.
13591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13592$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13594$as_echo_n "checking for GREP... " >&6; }
13595          if test ! -x "$tool_specified"; then
13596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13597$as_echo "not found" >&6; }
13598            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13599          fi
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13601$as_echo "$tool_specified" >&6; }
13602        fi
13603      fi
13604    fi
13605
13606  fi
13607
13608
13609  if test "x$GREP" = x; then
13610    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13611  fi
13612
13613
13614
13615
13616  # Publish this variable in the help.
13617
13618
13619  if [ -z "${EGREP+x}" ]; then
13620    # The variable is not set by user, try to locate tool using the code snippet
13621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13622$as_echo_n "checking for egrep... " >&6; }
13623if ${ac_cv_path_EGREP+:} false; then :
13624  $as_echo_n "(cached) " >&6
13625else
13626  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13627   then ac_cv_path_EGREP="$GREP -E"
13628   else
13629     if test -z "$EGREP"; then
13630  ac_path_EGREP_found=false
13631  # Loop through the user's path and test for each of PROGNAME-LIST
13632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13633for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13634do
13635  IFS=$as_save_IFS
13636  test -z "$as_dir" && as_dir=.
13637    for ac_prog in egrep; do
13638    for ac_exec_ext in '' $ac_executable_extensions; do
13639      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13640      as_fn_executable_p "$ac_path_EGREP" || continue
13641# Check for GNU ac_path_EGREP and select it if it is found.
13642  # Check for GNU $ac_path_EGREP
13643case `"$ac_path_EGREP" --version 2>&1` in
13644*GNU*)
13645  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13646*)
13647  ac_count=0
13648  $as_echo_n 0123456789 >"conftest.in"
13649  while :
13650  do
13651    cat "conftest.in" "conftest.in" >"conftest.tmp"
13652    mv "conftest.tmp" "conftest.in"
13653    cp "conftest.in" "conftest.nl"
13654    $as_echo 'EGREP' >> "conftest.nl"
13655    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13656    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13657    as_fn_arith $ac_count + 1 && ac_count=$as_val
13658    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13659      # Best one so far, save it but keep looking for a better one
13660      ac_cv_path_EGREP="$ac_path_EGREP"
13661      ac_path_EGREP_max=$ac_count
13662    fi
13663    # 10*(2^10) chars as input seems more than enough
13664    test $ac_count -gt 10 && break
13665  done
13666  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13667esac
13668
13669      $ac_path_EGREP_found && break 3
13670    done
13671  done
13672  done
13673IFS=$as_save_IFS
13674  if test -z "$ac_cv_path_EGREP"; then
13675    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13676  fi
13677else
13678  ac_cv_path_EGREP=$EGREP
13679fi
13680
13681   fi
13682fi
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13684$as_echo "$ac_cv_path_EGREP" >&6; }
13685 EGREP="$ac_cv_path_EGREP"
13686
13687
13688  else
13689    # The variable is set, but is it from the command line or the environment?
13690
13691    # Try to remove the string !EGREP! from our list.
13692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13694      # If it failed, the variable was not from the command line. Ignore it,
13695      # but warn the user (except for BASH, which is always set by the calling BASH).
13696      if test "xEGREP" != xBASH; then
13697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13698$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13699      fi
13700      # Try to locate tool using the code snippet
13701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13702$as_echo_n "checking for egrep... " >&6; }
13703if ${ac_cv_path_EGREP+:} false; then :
13704  $as_echo_n "(cached) " >&6
13705else
13706  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13707   then ac_cv_path_EGREP="$GREP -E"
13708   else
13709     if test -z "$EGREP"; then
13710  ac_path_EGREP_found=false
13711  # Loop through the user's path and test for each of PROGNAME-LIST
13712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13714do
13715  IFS=$as_save_IFS
13716  test -z "$as_dir" && as_dir=.
13717    for ac_prog in egrep; do
13718    for ac_exec_ext in '' $ac_executable_extensions; do
13719      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13720      as_fn_executable_p "$ac_path_EGREP" || continue
13721# Check for GNU ac_path_EGREP and select it if it is found.
13722  # Check for GNU $ac_path_EGREP
13723case `"$ac_path_EGREP" --version 2>&1` in
13724*GNU*)
13725  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13726*)
13727  ac_count=0
13728  $as_echo_n 0123456789 >"conftest.in"
13729  while :
13730  do
13731    cat "conftest.in" "conftest.in" >"conftest.tmp"
13732    mv "conftest.tmp" "conftest.in"
13733    cp "conftest.in" "conftest.nl"
13734    $as_echo 'EGREP' >> "conftest.nl"
13735    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13736    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13737    as_fn_arith $ac_count + 1 && ac_count=$as_val
13738    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13739      # Best one so far, save it but keep looking for a better one
13740      ac_cv_path_EGREP="$ac_path_EGREP"
13741      ac_path_EGREP_max=$ac_count
13742    fi
13743    # 10*(2^10) chars as input seems more than enough
13744    test $ac_count -gt 10 && break
13745  done
13746  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13747esac
13748
13749      $ac_path_EGREP_found && break 3
13750    done
13751  done
13752  done
13753IFS=$as_save_IFS
13754  if test -z "$ac_cv_path_EGREP"; then
13755    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13756  fi
13757else
13758  ac_cv_path_EGREP=$EGREP
13759fi
13760
13761   fi
13762fi
13763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13764$as_echo "$ac_cv_path_EGREP" >&6; }
13765 EGREP="$ac_cv_path_EGREP"
13766
13767
13768    else
13769      # If it succeeded, then it was overridden by the user. We will use it
13770      # for the tool.
13771
13772      # First remove it from the list of overridden variables, so we can test
13773      # for unknown variables in the end.
13774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13775
13776      # Check if we try to supply an empty value
13777      if test "x$EGREP" = x; then
13778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13779$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13781$as_echo_n "checking for EGREP... " >&6; }
13782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13783$as_echo "disabled" >&6; }
13784      else
13785        # Check if the provided tool contains a complete path.
13786        tool_specified="$EGREP"
13787        tool_basename="${tool_specified##*/}"
13788        if test "x$tool_basename" = "x$tool_specified"; then
13789          # A command without a complete path is provided, search $PATH.
13790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13791$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13792          # Extract the first word of "$tool_basename", so it can be a program name with args.
13793set dummy $tool_basename; ac_word=$2
13794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13795$as_echo_n "checking for $ac_word... " >&6; }
13796if ${ac_cv_path_EGREP+:} false; then :
13797  $as_echo_n "(cached) " >&6
13798else
13799  case $EGREP in
13800  [\\/]* | ?:[\\/]*)
13801  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13802  ;;
13803  *)
13804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13805for as_dir in $PATH
13806do
13807  IFS=$as_save_IFS
13808  test -z "$as_dir" && as_dir=.
13809    for ac_exec_ext in '' $ac_executable_extensions; do
13810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13811    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13813    break 2
13814  fi
13815done
13816  done
13817IFS=$as_save_IFS
13818
13819  ;;
13820esac
13821fi
13822EGREP=$ac_cv_path_EGREP
13823if test -n "$EGREP"; then
13824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13825$as_echo "$EGREP" >&6; }
13826else
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13828$as_echo "no" >&6; }
13829fi
13830
13831
13832          if test "x$EGREP" = x; then
13833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13834          fi
13835        else
13836          # Otherwise we believe it is a complete path. Use it as it is.
13837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13838$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13840$as_echo_n "checking for EGREP... " >&6; }
13841          if test ! -x "$tool_specified"; then
13842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13843$as_echo "not found" >&6; }
13844            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13845          fi
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13847$as_echo "$tool_specified" >&6; }
13848        fi
13849      fi
13850    fi
13851
13852  fi
13853
13854
13855  if test "x$EGREP" = x; then
13856    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13857  fi
13858
13859
13860
13861
13862  # Publish this variable in the help.
13863
13864
13865  if [ -z "${FGREP+x}" ]; then
13866    # The variable is not set by user, try to locate tool using the code snippet
13867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13868$as_echo_n "checking for fgrep... " >&6; }
13869if ${ac_cv_path_FGREP+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13873   then ac_cv_path_FGREP="$GREP -F"
13874   else
13875     if test -z "$FGREP"; then
13876  ac_path_FGREP_found=false
13877  # Loop through the user's path and test for each of PROGNAME-LIST
13878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13880do
13881  IFS=$as_save_IFS
13882  test -z "$as_dir" && as_dir=.
13883    for ac_prog in fgrep; do
13884    for ac_exec_ext in '' $ac_executable_extensions; do
13885      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13886      as_fn_executable_p "$ac_path_FGREP" || continue
13887# Check for GNU ac_path_FGREP and select it if it is found.
13888  # Check for GNU $ac_path_FGREP
13889case `"$ac_path_FGREP" --version 2>&1` in
13890*GNU*)
13891  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13892*)
13893  ac_count=0
13894  $as_echo_n 0123456789 >"conftest.in"
13895  while :
13896  do
13897    cat "conftest.in" "conftest.in" >"conftest.tmp"
13898    mv "conftest.tmp" "conftest.in"
13899    cp "conftest.in" "conftest.nl"
13900    $as_echo 'FGREP' >> "conftest.nl"
13901    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13903    as_fn_arith $ac_count + 1 && ac_count=$as_val
13904    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13905      # Best one so far, save it but keep looking for a better one
13906      ac_cv_path_FGREP="$ac_path_FGREP"
13907      ac_path_FGREP_max=$ac_count
13908    fi
13909    # 10*(2^10) chars as input seems more than enough
13910    test $ac_count -gt 10 && break
13911  done
13912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13913esac
13914
13915      $ac_path_FGREP_found && break 3
13916    done
13917  done
13918  done
13919IFS=$as_save_IFS
13920  if test -z "$ac_cv_path_FGREP"; then
13921    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13922  fi
13923else
13924  ac_cv_path_FGREP=$FGREP
13925fi
13926
13927   fi
13928fi
13929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13930$as_echo "$ac_cv_path_FGREP" >&6; }
13931 FGREP="$ac_cv_path_FGREP"
13932
13933
13934  else
13935    # The variable is set, but is it from the command line or the environment?
13936
13937    # Try to remove the string !FGREP! from our list.
13938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13940      # If it failed, the variable was not from the command line. Ignore it,
13941      # but warn the user (except for BASH, which is always set by the calling BASH).
13942      if test "xFGREP" != xBASH; then
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13944$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13945      fi
13946      # Try to locate tool using the code snippet
13947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13948$as_echo_n "checking for fgrep... " >&6; }
13949if ${ac_cv_path_FGREP+:} false; then :
13950  $as_echo_n "(cached) " >&6
13951else
13952  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13953   then ac_cv_path_FGREP="$GREP -F"
13954   else
13955     if test -z "$FGREP"; then
13956  ac_path_FGREP_found=false
13957  # Loop through the user's path and test for each of PROGNAME-LIST
13958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13959for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13960do
13961  IFS=$as_save_IFS
13962  test -z "$as_dir" && as_dir=.
13963    for ac_prog in fgrep; do
13964    for ac_exec_ext in '' $ac_executable_extensions; do
13965      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13966      as_fn_executable_p "$ac_path_FGREP" || continue
13967# Check for GNU ac_path_FGREP and select it if it is found.
13968  # Check for GNU $ac_path_FGREP
13969case `"$ac_path_FGREP" --version 2>&1` in
13970*GNU*)
13971  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13972*)
13973  ac_count=0
13974  $as_echo_n 0123456789 >"conftest.in"
13975  while :
13976  do
13977    cat "conftest.in" "conftest.in" >"conftest.tmp"
13978    mv "conftest.tmp" "conftest.in"
13979    cp "conftest.in" "conftest.nl"
13980    $as_echo 'FGREP' >> "conftest.nl"
13981    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13982    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13983    as_fn_arith $ac_count + 1 && ac_count=$as_val
13984    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13985      # Best one so far, save it but keep looking for a better one
13986      ac_cv_path_FGREP="$ac_path_FGREP"
13987      ac_path_FGREP_max=$ac_count
13988    fi
13989    # 10*(2^10) chars as input seems more than enough
13990    test $ac_count -gt 10 && break
13991  done
13992  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13993esac
13994
13995      $ac_path_FGREP_found && break 3
13996    done
13997  done
13998  done
13999IFS=$as_save_IFS
14000  if test -z "$ac_cv_path_FGREP"; then
14001    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14002  fi
14003else
14004  ac_cv_path_FGREP=$FGREP
14005fi
14006
14007   fi
14008fi
14009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14010$as_echo "$ac_cv_path_FGREP" >&6; }
14011 FGREP="$ac_cv_path_FGREP"
14012
14013
14014    else
14015      # If it succeeded, then it was overridden by the user. We will use it
14016      # for the tool.
14017
14018      # First remove it from the list of overridden variables, so we can test
14019      # for unknown variables in the end.
14020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14021
14022      # Check if we try to supply an empty value
14023      if test "x$FGREP" = x; then
14024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14025$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14027$as_echo_n "checking for FGREP... " >&6; }
14028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14029$as_echo "disabled" >&6; }
14030      else
14031        # Check if the provided tool contains a complete path.
14032        tool_specified="$FGREP"
14033        tool_basename="${tool_specified##*/}"
14034        if test "x$tool_basename" = "x$tool_specified"; then
14035          # A command without a complete path is provided, search $PATH.
14036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14037$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14038          # Extract the first word of "$tool_basename", so it can be a program name with args.
14039set dummy $tool_basename; ac_word=$2
14040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14041$as_echo_n "checking for $ac_word... " >&6; }
14042if ${ac_cv_path_FGREP+:} false; then :
14043  $as_echo_n "(cached) " >&6
14044else
14045  case $FGREP in
14046  [\\/]* | ?:[\\/]*)
14047  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14048  ;;
14049  *)
14050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14051for as_dir in $PATH
14052do
14053  IFS=$as_save_IFS
14054  test -z "$as_dir" && as_dir=.
14055    for ac_exec_ext in '' $ac_executable_extensions; do
14056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14057    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14059    break 2
14060  fi
14061done
14062  done
14063IFS=$as_save_IFS
14064
14065  ;;
14066esac
14067fi
14068FGREP=$ac_cv_path_FGREP
14069if test -n "$FGREP"; then
14070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14071$as_echo "$FGREP" >&6; }
14072else
14073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074$as_echo "no" >&6; }
14075fi
14076
14077
14078          if test "x$FGREP" = x; then
14079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14080          fi
14081        else
14082          # Otherwise we believe it is a complete path. Use it as it is.
14083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14084$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14086$as_echo_n "checking for FGREP... " >&6; }
14087          if test ! -x "$tool_specified"; then
14088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14089$as_echo "not found" >&6; }
14090            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14091          fi
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14093$as_echo "$tool_specified" >&6; }
14094        fi
14095      fi
14096    fi
14097
14098  fi
14099
14100
14101  if test "x$FGREP" = x; then
14102    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14103  fi
14104
14105
14106
14107
14108  # Publish this variable in the help.
14109
14110
14111  if [ -z "${SED+x}" ]; then
14112    # The variable is not set by user, try to locate tool using the code snippet
14113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14114$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14115if ${ac_cv_path_SED+:} false; then :
14116  $as_echo_n "(cached) " >&6
14117else
14118            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14119     for ac_i in 1 2 3 4 5 6 7; do
14120       ac_script="$ac_script$as_nl$ac_script"
14121     done
14122     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14123     { ac_script=; unset ac_script;}
14124     if test -z "$SED"; then
14125  ac_path_SED_found=false
14126  # Loop through the user's path and test for each of PROGNAME-LIST
14127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14128for as_dir in $PATH
14129do
14130  IFS=$as_save_IFS
14131  test -z "$as_dir" && as_dir=.
14132    for ac_prog in sed gsed; do
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14135      as_fn_executable_p "$ac_path_SED" || continue
14136# Check for GNU ac_path_SED and select it if it is found.
14137  # Check for GNU $ac_path_SED
14138case `"$ac_path_SED" --version 2>&1` in
14139*GNU*)
14140  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14141*)
14142  ac_count=0
14143  $as_echo_n 0123456789 >"conftest.in"
14144  while :
14145  do
14146    cat "conftest.in" "conftest.in" >"conftest.tmp"
14147    mv "conftest.tmp" "conftest.in"
14148    cp "conftest.in" "conftest.nl"
14149    $as_echo '' >> "conftest.nl"
14150    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14151    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14152    as_fn_arith $ac_count + 1 && ac_count=$as_val
14153    if test $ac_count -gt ${ac_path_SED_max-0}; then
14154      # Best one so far, save it but keep looking for a better one
14155      ac_cv_path_SED="$ac_path_SED"
14156      ac_path_SED_max=$ac_count
14157    fi
14158    # 10*(2^10) chars as input seems more than enough
14159    test $ac_count -gt 10 && break
14160  done
14161  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14162esac
14163
14164      $ac_path_SED_found && break 3
14165    done
14166  done
14167  done
14168IFS=$as_save_IFS
14169  if test -z "$ac_cv_path_SED"; then
14170    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14171  fi
14172else
14173  ac_cv_path_SED=$SED
14174fi
14175
14176fi
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14178$as_echo "$ac_cv_path_SED" >&6; }
14179 SED="$ac_cv_path_SED"
14180  rm -f conftest.sed
14181
14182  else
14183    # The variable is set, but is it from the command line or the environment?
14184
14185    # Try to remove the string !SED! from our list.
14186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14188      # If it failed, the variable was not from the command line. Ignore it,
14189      # but warn the user (except for BASH, which is always set by the calling BASH).
14190      if test "xSED" != xBASH; then
14191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14192$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14193      fi
14194      # Try to locate tool using the code snippet
14195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14196$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14197if ${ac_cv_path_SED+:} false; then :
14198  $as_echo_n "(cached) " >&6
14199else
14200            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14201     for ac_i in 1 2 3 4 5 6 7; do
14202       ac_script="$ac_script$as_nl$ac_script"
14203     done
14204     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14205     { ac_script=; unset ac_script;}
14206     if test -z "$SED"; then
14207  ac_path_SED_found=false
14208  # Loop through the user's path and test for each of PROGNAME-LIST
14209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14210for as_dir in $PATH
14211do
14212  IFS=$as_save_IFS
14213  test -z "$as_dir" && as_dir=.
14214    for ac_prog in sed gsed; do
14215    for ac_exec_ext in '' $ac_executable_extensions; do
14216      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14217      as_fn_executable_p "$ac_path_SED" || continue
14218# Check for GNU ac_path_SED and select it if it is found.
14219  # Check for GNU $ac_path_SED
14220case `"$ac_path_SED" --version 2>&1` in
14221*GNU*)
14222  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14223*)
14224  ac_count=0
14225  $as_echo_n 0123456789 >"conftest.in"
14226  while :
14227  do
14228    cat "conftest.in" "conftest.in" >"conftest.tmp"
14229    mv "conftest.tmp" "conftest.in"
14230    cp "conftest.in" "conftest.nl"
14231    $as_echo '' >> "conftest.nl"
14232    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14233    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14234    as_fn_arith $ac_count + 1 && ac_count=$as_val
14235    if test $ac_count -gt ${ac_path_SED_max-0}; then
14236      # Best one so far, save it but keep looking for a better one
14237      ac_cv_path_SED="$ac_path_SED"
14238      ac_path_SED_max=$ac_count
14239    fi
14240    # 10*(2^10) chars as input seems more than enough
14241    test $ac_count -gt 10 && break
14242  done
14243  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14244esac
14245
14246      $ac_path_SED_found && break 3
14247    done
14248  done
14249  done
14250IFS=$as_save_IFS
14251  if test -z "$ac_cv_path_SED"; then
14252    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14253  fi
14254else
14255  ac_cv_path_SED=$SED
14256fi
14257
14258fi
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14260$as_echo "$ac_cv_path_SED" >&6; }
14261 SED="$ac_cv_path_SED"
14262  rm -f conftest.sed
14263
14264    else
14265      # If it succeeded, then it was overridden by the user. We will use it
14266      # for the tool.
14267
14268      # First remove it from the list of overridden variables, so we can test
14269      # for unknown variables in the end.
14270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14271
14272      # Check if we try to supply an empty value
14273      if test "x$SED" = x; then
14274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14275$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14277$as_echo_n "checking for SED... " >&6; }
14278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14279$as_echo "disabled" >&6; }
14280      else
14281        # Check if the provided tool contains a complete path.
14282        tool_specified="$SED"
14283        tool_basename="${tool_specified##*/}"
14284        if test "x$tool_basename" = "x$tool_specified"; then
14285          # A command without a complete path is provided, search $PATH.
14286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14287$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14288          # Extract the first word of "$tool_basename", so it can be a program name with args.
14289set dummy $tool_basename; ac_word=$2
14290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14291$as_echo_n "checking for $ac_word... " >&6; }
14292if ${ac_cv_path_SED+:} false; then :
14293  $as_echo_n "(cached) " >&6
14294else
14295  case $SED in
14296  [\\/]* | ?:[\\/]*)
14297  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14298  ;;
14299  *)
14300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14301for as_dir in $PATH
14302do
14303  IFS=$as_save_IFS
14304  test -z "$as_dir" && as_dir=.
14305    for ac_exec_ext in '' $ac_executable_extensions; do
14306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14307    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14309    break 2
14310  fi
14311done
14312  done
14313IFS=$as_save_IFS
14314
14315  ;;
14316esac
14317fi
14318SED=$ac_cv_path_SED
14319if test -n "$SED"; then
14320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14321$as_echo "$SED" >&6; }
14322else
14323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14324$as_echo "no" >&6; }
14325fi
14326
14327
14328          if test "x$SED" = x; then
14329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14330          fi
14331        else
14332          # Otherwise we believe it is a complete path. Use it as it is.
14333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14334$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14336$as_echo_n "checking for SED... " >&6; }
14337          if test ! -x "$tool_specified"; then
14338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14339$as_echo "not found" >&6; }
14340            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14341          fi
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14343$as_echo "$tool_specified" >&6; }
14344        fi
14345      fi
14346    fi
14347
14348  fi
14349
14350
14351  if test "x$SED" = x; then
14352    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14353  fi
14354
14355
14356
14357  # Always force rm.
14358  RM="$RM -f"
14359
14360  # pwd behaves differently on various platforms and some don't support the -L flag.
14361  # Always use the bash builtin pwd to get uniform behavior.
14362  THEPWDCMD=pwd
14363
14364  # These are not required on all platforms
14365
14366
14367  # Publish this variable in the help.
14368
14369
14370  if [ -z "${CYGPATH+x}" ]; then
14371    # The variable is not set by user, try to locate tool using the code snippet
14372    for ac_prog in cygpath
14373do
14374  # Extract the first word of "$ac_prog", so it can be a program name with args.
14375set dummy $ac_prog; ac_word=$2
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14377$as_echo_n "checking for $ac_word... " >&6; }
14378if ${ac_cv_path_CYGPATH+:} false; then :
14379  $as_echo_n "(cached) " >&6
14380else
14381  case $CYGPATH in
14382  [\\/]* | ?:[\\/]*)
14383  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14384  ;;
14385  *)
14386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14387for as_dir in $PATH
14388do
14389  IFS=$as_save_IFS
14390  test -z "$as_dir" && as_dir=.
14391    for ac_exec_ext in '' $ac_executable_extensions; do
14392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14393    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14395    break 2
14396  fi
14397done
14398  done
14399IFS=$as_save_IFS
14400
14401  ;;
14402esac
14403fi
14404CYGPATH=$ac_cv_path_CYGPATH
14405if test -n "$CYGPATH"; then
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14407$as_echo "$CYGPATH" >&6; }
14408else
14409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410$as_echo "no" >&6; }
14411fi
14412
14413
14414  test -n "$CYGPATH" && break
14415done
14416
14417  else
14418    # The variable is set, but is it from the command line or the environment?
14419
14420    # Try to remove the string !CYGPATH! from our list.
14421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14423      # If it failed, the variable was not from the command line. Ignore it,
14424      # but warn the user (except for BASH, which is always set by the calling BASH).
14425      if test "xCYGPATH" != xBASH; then
14426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14427$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14428      fi
14429      # Try to locate tool using the code snippet
14430      for ac_prog in cygpath
14431do
14432  # Extract the first word of "$ac_prog", so it can be a program name with args.
14433set dummy $ac_prog; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472  test -n "$CYGPATH" && break
14473done
14474
14475    else
14476      # If it succeeded, then it was overridden by the user. We will use it
14477      # for the tool.
14478
14479      # First remove it from the list of overridden variables, so we can test
14480      # for unknown variables in the end.
14481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14482
14483      # Check if we try to supply an empty value
14484      if test "x$CYGPATH" = x; then
14485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14486$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14488$as_echo_n "checking for CYGPATH... " >&6; }
14489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14490$as_echo "disabled" >&6; }
14491      else
14492        # Check if the provided tool contains a complete path.
14493        tool_specified="$CYGPATH"
14494        tool_basename="${tool_specified##*/}"
14495        if test "x$tool_basename" = "x$tool_specified"; then
14496          # A command without a complete path is provided, search $PATH.
14497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14498$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14499          # Extract the first word of "$tool_basename", so it can be a program name with args.
14500set dummy $tool_basename; ac_word=$2
14501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14502$as_echo_n "checking for $ac_word... " >&6; }
14503if ${ac_cv_path_CYGPATH+:} false; then :
14504  $as_echo_n "(cached) " >&6
14505else
14506  case $CYGPATH in
14507  [\\/]* | ?:[\\/]*)
14508  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14509  ;;
14510  *)
14511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14512for as_dir in $PATH
14513do
14514  IFS=$as_save_IFS
14515  test -z "$as_dir" && as_dir=.
14516    for ac_exec_ext in '' $ac_executable_extensions; do
14517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14518    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14520    break 2
14521  fi
14522done
14523  done
14524IFS=$as_save_IFS
14525
14526  ;;
14527esac
14528fi
14529CYGPATH=$ac_cv_path_CYGPATH
14530if test -n "$CYGPATH"; then
14531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14532$as_echo "$CYGPATH" >&6; }
14533else
14534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14535$as_echo "no" >&6; }
14536fi
14537
14538
14539          if test "x$CYGPATH" = x; then
14540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14541          fi
14542        else
14543          # Otherwise we believe it is a complete path. Use it as it is.
14544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14545$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14547$as_echo_n "checking for CYGPATH... " >&6; }
14548          if test ! -x "$tool_specified"; then
14549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14550$as_echo "not found" >&6; }
14551            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14552          fi
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14554$as_echo "$tool_specified" >&6; }
14555        fi
14556      fi
14557    fi
14558
14559  fi
14560
14561
14562
14563
14564  # Publish this variable in the help.
14565
14566
14567  if [ -z "${READLINK+x}" ]; then
14568    # The variable is not set by user, try to locate tool using the code snippet
14569    for ac_prog in greadlink readlink
14570do
14571  # Extract the first word of "$ac_prog", so it can be a program name with args.
14572set dummy $ac_prog; ac_word=$2
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574$as_echo_n "checking for $ac_word... " >&6; }
14575if ${ac_cv_path_READLINK+:} false; then :
14576  $as_echo_n "(cached) " >&6
14577else
14578  case $READLINK in
14579  [\\/]* | ?:[\\/]*)
14580  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14581  ;;
14582  *)
14583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14584for as_dir in $PATH
14585do
14586  IFS=$as_save_IFS
14587  test -z "$as_dir" && as_dir=.
14588    for ac_exec_ext in '' $ac_executable_extensions; do
14589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14590    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14592    break 2
14593  fi
14594done
14595  done
14596IFS=$as_save_IFS
14597
14598  ;;
14599esac
14600fi
14601READLINK=$ac_cv_path_READLINK
14602if test -n "$READLINK"; then
14603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14604$as_echo "$READLINK" >&6; }
14605else
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608fi
14609
14610
14611  test -n "$READLINK" && break
14612done
14613
14614  else
14615    # The variable is set, but is it from the command line or the environment?
14616
14617    # Try to remove the string !READLINK! from our list.
14618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14620      # If it failed, the variable was not from the command line. Ignore it,
14621      # but warn the user (except for BASH, which is always set by the calling BASH).
14622      if test "xREADLINK" != xBASH; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14624$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14625      fi
14626      # Try to locate tool using the code snippet
14627      for ac_prog in greadlink readlink
14628do
14629  # Extract the first word of "$ac_prog", so it can be a program name with args.
14630set dummy $ac_prog; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669  test -n "$READLINK" && break
14670done
14671
14672    else
14673      # If it succeeded, then it was overridden by the user. We will use it
14674      # for the tool.
14675
14676      # First remove it from the list of overridden variables, so we can test
14677      # for unknown variables in the end.
14678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14679
14680      # Check if we try to supply an empty value
14681      if test "x$READLINK" = x; then
14682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14683$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14685$as_echo_n "checking for READLINK... " >&6; }
14686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14687$as_echo "disabled" >&6; }
14688      else
14689        # Check if the provided tool contains a complete path.
14690        tool_specified="$READLINK"
14691        tool_basename="${tool_specified##*/}"
14692        if test "x$tool_basename" = "x$tool_specified"; then
14693          # A command without a complete path is provided, search $PATH.
14694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14695$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14696          # Extract the first word of "$tool_basename", so it can be a program name with args.
14697set dummy $tool_basename; ac_word=$2
14698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14699$as_echo_n "checking for $ac_word... " >&6; }
14700if ${ac_cv_path_READLINK+:} false; then :
14701  $as_echo_n "(cached) " >&6
14702else
14703  case $READLINK in
14704  [\\/]* | ?:[\\/]*)
14705  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14706  ;;
14707  *)
14708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14709for as_dir in $PATH
14710do
14711  IFS=$as_save_IFS
14712  test -z "$as_dir" && as_dir=.
14713    for ac_exec_ext in '' $ac_executable_extensions; do
14714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14715    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14717    break 2
14718  fi
14719done
14720  done
14721IFS=$as_save_IFS
14722
14723  ;;
14724esac
14725fi
14726READLINK=$ac_cv_path_READLINK
14727if test -n "$READLINK"; then
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14729$as_echo "$READLINK" >&6; }
14730else
14731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14732$as_echo "no" >&6; }
14733fi
14734
14735
14736          if test "x$READLINK" = x; then
14737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14738          fi
14739        else
14740          # Otherwise we believe it is a complete path. Use it as it is.
14741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14742$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14744$as_echo_n "checking for READLINK... " >&6; }
14745          if test ! -x "$tool_specified"; then
14746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14747$as_echo "not found" >&6; }
14748            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14749          fi
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14751$as_echo "$tool_specified" >&6; }
14752        fi
14753      fi
14754    fi
14755
14756  fi
14757
14758
14759
14760
14761  # Publish this variable in the help.
14762
14763
14764  if [ -z "${DF+x}" ]; then
14765    # The variable is not set by user, try to locate tool using the code snippet
14766    for ac_prog in df
14767do
14768  # Extract the first word of "$ac_prog", so it can be a program name with args.
14769set dummy $ac_prog; ac_word=$2
14770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14771$as_echo_n "checking for $ac_word... " >&6; }
14772if ${ac_cv_path_DF+:} false; then :
14773  $as_echo_n "(cached) " >&6
14774else
14775  case $DF in
14776  [\\/]* | ?:[\\/]*)
14777  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14778  ;;
14779  *)
14780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14781for as_dir in $PATH
14782do
14783  IFS=$as_save_IFS
14784  test -z "$as_dir" && as_dir=.
14785    for ac_exec_ext in '' $ac_executable_extensions; do
14786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14787    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14789    break 2
14790  fi
14791done
14792  done
14793IFS=$as_save_IFS
14794
14795  ;;
14796esac
14797fi
14798DF=$ac_cv_path_DF
14799if test -n "$DF"; then
14800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14801$as_echo "$DF" >&6; }
14802else
14803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14804$as_echo "no" >&6; }
14805fi
14806
14807
14808  test -n "$DF" && break
14809done
14810
14811  else
14812    # The variable is set, but is it from the command line or the environment?
14813
14814    # Try to remove the string !DF! from our list.
14815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14817      # If it failed, the variable was not from the command line. Ignore it,
14818      # but warn the user (except for BASH, which is always set by the calling BASH).
14819      if test "xDF" != xBASH; then
14820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14821$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14822      fi
14823      # Try to locate tool using the code snippet
14824      for ac_prog in df
14825do
14826  # Extract the first word of "$ac_prog", so it can be a program name with args.
14827set dummy $ac_prog; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866  test -n "$DF" && break
14867done
14868
14869    else
14870      # If it succeeded, then it was overridden by the user. We will use it
14871      # for the tool.
14872
14873      # First remove it from the list of overridden variables, so we can test
14874      # for unknown variables in the end.
14875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14876
14877      # Check if we try to supply an empty value
14878      if test "x$DF" = x; then
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14880$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14882$as_echo_n "checking for DF... " >&6; }
14883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14884$as_echo "disabled" >&6; }
14885      else
14886        # Check if the provided tool contains a complete path.
14887        tool_specified="$DF"
14888        tool_basename="${tool_specified##*/}"
14889        if test "x$tool_basename" = "x$tool_specified"; then
14890          # A command without a complete path is provided, search $PATH.
14891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14892$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14893          # Extract the first word of "$tool_basename", so it can be a program name with args.
14894set dummy $tool_basename; ac_word=$2
14895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14896$as_echo_n "checking for $ac_word... " >&6; }
14897if ${ac_cv_path_DF+:} false; then :
14898  $as_echo_n "(cached) " >&6
14899else
14900  case $DF in
14901  [\\/]* | ?:[\\/]*)
14902  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14903  ;;
14904  *)
14905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14906for as_dir in $PATH
14907do
14908  IFS=$as_save_IFS
14909  test -z "$as_dir" && as_dir=.
14910    for ac_exec_ext in '' $ac_executable_extensions; do
14911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14912    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14914    break 2
14915  fi
14916done
14917  done
14918IFS=$as_save_IFS
14919
14920  ;;
14921esac
14922fi
14923DF=$ac_cv_path_DF
14924if test -n "$DF"; then
14925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14926$as_echo "$DF" >&6; }
14927else
14928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14929$as_echo "no" >&6; }
14930fi
14931
14932
14933          if test "x$DF" = x; then
14934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14935          fi
14936        else
14937          # Otherwise we believe it is a complete path. Use it as it is.
14938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14939$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14941$as_echo_n "checking for DF... " >&6; }
14942          if test ! -x "$tool_specified"; then
14943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14944$as_echo "not found" >&6; }
14945            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14946          fi
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14948$as_echo "$tool_specified" >&6; }
14949        fi
14950      fi
14951    fi
14952
14953  fi
14954
14955
14956
14957
14958  # Publish this variable in the help.
14959
14960
14961  if [ -z "${CPIO+x}" ]; then
14962    # The variable is not set by user, try to locate tool using the code snippet
14963    for ac_prog in cpio bsdcpio
14964do
14965  # Extract the first word of "$ac_prog", so it can be a program name with args.
14966set dummy $ac_prog; ac_word=$2
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14968$as_echo_n "checking for $ac_word... " >&6; }
14969if ${ac_cv_path_CPIO+:} false; then :
14970  $as_echo_n "(cached) " >&6
14971else
14972  case $CPIO in
14973  [\\/]* | ?:[\\/]*)
14974  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14975  ;;
14976  *)
14977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14978for as_dir in $PATH
14979do
14980  IFS=$as_save_IFS
14981  test -z "$as_dir" && as_dir=.
14982    for ac_exec_ext in '' $ac_executable_extensions; do
14983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14984    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14986    break 2
14987  fi
14988done
14989  done
14990IFS=$as_save_IFS
14991
14992  ;;
14993esac
14994fi
14995CPIO=$ac_cv_path_CPIO
14996if test -n "$CPIO"; then
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14998$as_echo "$CPIO" >&6; }
14999else
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
15002fi
15003
15004
15005  test -n "$CPIO" && break
15006done
15007
15008  else
15009    # The variable is set, but is it from the command line or the environment?
15010
15011    # Try to remove the string !CPIO! from our list.
15012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15014      # If it failed, the variable was not from the command line. Ignore it,
15015      # but warn the user (except for BASH, which is always set by the calling BASH).
15016      if test "xCPIO" != xBASH; then
15017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15018$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15019      fi
15020      # Try to locate tool using the code snippet
15021      for ac_prog in cpio bsdcpio
15022do
15023  # Extract the first word of "$ac_prog", so it can be a program name with args.
15024set dummy $ac_prog; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063  test -n "$CPIO" && break
15064done
15065
15066    else
15067      # If it succeeded, then it was overridden by the user. We will use it
15068      # for the tool.
15069
15070      # First remove it from the list of overridden variables, so we can test
15071      # for unknown variables in the end.
15072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15073
15074      # Check if we try to supply an empty value
15075      if test "x$CPIO" = x; then
15076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15077$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15079$as_echo_n "checking for CPIO... " >&6; }
15080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15081$as_echo "disabled" >&6; }
15082      else
15083        # Check if the provided tool contains a complete path.
15084        tool_specified="$CPIO"
15085        tool_basename="${tool_specified##*/}"
15086        if test "x$tool_basename" = "x$tool_specified"; then
15087          # A command without a complete path is provided, search $PATH.
15088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15089$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15090          # Extract the first word of "$tool_basename", so it can be a program name with args.
15091set dummy $tool_basename; ac_word=$2
15092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15093$as_echo_n "checking for $ac_word... " >&6; }
15094if ${ac_cv_path_CPIO+:} false; then :
15095  $as_echo_n "(cached) " >&6
15096else
15097  case $CPIO in
15098  [\\/]* | ?:[\\/]*)
15099  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15100  ;;
15101  *)
15102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15103for as_dir in $PATH
15104do
15105  IFS=$as_save_IFS
15106  test -z "$as_dir" && as_dir=.
15107    for ac_exec_ext in '' $ac_executable_extensions; do
15108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15109    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15111    break 2
15112  fi
15113done
15114  done
15115IFS=$as_save_IFS
15116
15117  ;;
15118esac
15119fi
15120CPIO=$ac_cv_path_CPIO
15121if test -n "$CPIO"; then
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15123$as_echo "$CPIO" >&6; }
15124else
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15126$as_echo "no" >&6; }
15127fi
15128
15129
15130          if test "x$CPIO" = x; then
15131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15132          fi
15133        else
15134          # Otherwise we believe it is a complete path. Use it as it is.
15135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15136$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15138$as_echo_n "checking for CPIO... " >&6; }
15139          if test ! -x "$tool_specified"; then
15140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15141$as_echo "not found" >&6; }
15142            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15143          fi
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15145$as_echo "$tool_specified" >&6; }
15146        fi
15147      fi
15148    fi
15149
15150  fi
15151
15152
15153
15154
15155  # Publish this variable in the help.
15156
15157
15158  if [ -z "${NICE+x}" ]; then
15159    # The variable is not set by user, try to locate tool using the code snippet
15160    for ac_prog in nice
15161do
15162  # Extract the first word of "$ac_prog", so it can be a program name with args.
15163set dummy $ac_prog; ac_word=$2
15164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15165$as_echo_n "checking for $ac_word... " >&6; }
15166if ${ac_cv_path_NICE+:} false; then :
15167  $as_echo_n "(cached) " >&6
15168else
15169  case $NICE in
15170  [\\/]* | ?:[\\/]*)
15171  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15172  ;;
15173  *)
15174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15175for as_dir in $PATH
15176do
15177  IFS=$as_save_IFS
15178  test -z "$as_dir" && as_dir=.
15179    for ac_exec_ext in '' $ac_executable_extensions; do
15180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15181    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15183    break 2
15184  fi
15185done
15186  done
15187IFS=$as_save_IFS
15188
15189  ;;
15190esac
15191fi
15192NICE=$ac_cv_path_NICE
15193if test -n "$NICE"; then
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15195$as_echo "$NICE" >&6; }
15196else
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15198$as_echo "no" >&6; }
15199fi
15200
15201
15202  test -n "$NICE" && break
15203done
15204
15205  else
15206    # The variable is set, but is it from the command line or the environment?
15207
15208    # Try to remove the string !NICE! from our list.
15209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15211      # If it failed, the variable was not from the command line. Ignore it,
15212      # but warn the user (except for BASH, which is always set by the calling BASH).
15213      if test "xNICE" != xBASH; then
15214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15215$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15216      fi
15217      # Try to locate tool using the code snippet
15218      for ac_prog in nice
15219do
15220  # Extract the first word of "$ac_prog", so it can be a program name with args.
15221set dummy $ac_prog; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260  test -n "$NICE" && break
15261done
15262
15263    else
15264      # If it succeeded, then it was overridden by the user. We will use it
15265      # for the tool.
15266
15267      # First remove it from the list of overridden variables, so we can test
15268      # for unknown variables in the end.
15269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15270
15271      # Check if we try to supply an empty value
15272      if test "x$NICE" = x; then
15273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15274$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15276$as_echo_n "checking for NICE... " >&6; }
15277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15278$as_echo "disabled" >&6; }
15279      else
15280        # Check if the provided tool contains a complete path.
15281        tool_specified="$NICE"
15282        tool_basename="${tool_specified##*/}"
15283        if test "x$tool_basename" = "x$tool_specified"; then
15284          # A command without a complete path is provided, search $PATH.
15285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15286$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15287          # Extract the first word of "$tool_basename", so it can be a program name with args.
15288set dummy $tool_basename; ac_word=$2
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15290$as_echo_n "checking for $ac_word... " >&6; }
15291if ${ac_cv_path_NICE+:} false; then :
15292  $as_echo_n "(cached) " >&6
15293else
15294  case $NICE in
15295  [\\/]* | ?:[\\/]*)
15296  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15297  ;;
15298  *)
15299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15300for as_dir in $PATH
15301do
15302  IFS=$as_save_IFS
15303  test -z "$as_dir" && as_dir=.
15304    for ac_exec_ext in '' $ac_executable_extensions; do
15305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15306    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15308    break 2
15309  fi
15310done
15311  done
15312IFS=$as_save_IFS
15313
15314  ;;
15315esac
15316fi
15317NICE=$ac_cv_path_NICE
15318if test -n "$NICE"; then
15319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15320$as_echo "$NICE" >&6; }
15321else
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15323$as_echo "no" >&6; }
15324fi
15325
15326
15327          if test "x$NICE" = x; then
15328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15329          fi
15330        else
15331          # Otherwise we believe it is a complete path. Use it as it is.
15332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15333$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15335$as_echo_n "checking for NICE... " >&6; }
15336          if test ! -x "$tool_specified"; then
15337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15338$as_echo "not found" >&6; }
15339            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15340          fi
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15342$as_echo "$tool_specified" >&6; }
15343        fi
15344      fi
15345    fi
15346
15347  fi
15348
15349
15350
15351
15352  # Publish this variable in the help.
15353
15354
15355  if [ -z "${PANDOC+x}" ]; then
15356    # The variable is not set by user, try to locate tool using the code snippet
15357    for ac_prog in pandoc
15358do
15359  # Extract the first word of "$ac_prog", so it can be a program name with args.
15360set dummy $ac_prog; ac_word=$2
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15362$as_echo_n "checking for $ac_word... " >&6; }
15363if ${ac_cv_path_PANDOC+:} false; then :
15364  $as_echo_n "(cached) " >&6
15365else
15366  case $PANDOC in
15367  [\\/]* | ?:[\\/]*)
15368  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15369  ;;
15370  *)
15371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15372for as_dir in $PATH
15373do
15374  IFS=$as_save_IFS
15375  test -z "$as_dir" && as_dir=.
15376    for ac_exec_ext in '' $ac_executable_extensions; do
15377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15378    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15380    break 2
15381  fi
15382done
15383  done
15384IFS=$as_save_IFS
15385
15386  ;;
15387esac
15388fi
15389PANDOC=$ac_cv_path_PANDOC
15390if test -n "$PANDOC"; then
15391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15392$as_echo "$PANDOC" >&6; }
15393else
15394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15395$as_echo "no" >&6; }
15396fi
15397
15398
15399  test -n "$PANDOC" && break
15400done
15401
15402  else
15403    # The variable is set, but is it from the command line or the environment?
15404
15405    # Try to remove the string !PANDOC! from our list.
15406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15408      # If it failed, the variable was not from the command line. Ignore it,
15409      # but warn the user (except for BASH, which is always set by the calling BASH).
15410      if test "xPANDOC" != xBASH; then
15411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15412$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15413      fi
15414      # Try to locate tool using the code snippet
15415      for ac_prog in pandoc
15416do
15417  # Extract the first word of "$ac_prog", so it can be a program name with args.
15418set dummy $ac_prog; ac_word=$2
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15420$as_echo_n "checking for $ac_word... " >&6; }
15421if ${ac_cv_path_PANDOC+:} false; then :
15422  $as_echo_n "(cached) " >&6
15423else
15424  case $PANDOC in
15425  [\\/]* | ?:[\\/]*)
15426  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15427  ;;
15428  *)
15429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15430for as_dir in $PATH
15431do
15432  IFS=$as_save_IFS
15433  test -z "$as_dir" && as_dir=.
15434    for ac_exec_ext in '' $ac_executable_extensions; do
15435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15436    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15438    break 2
15439  fi
15440done
15441  done
15442IFS=$as_save_IFS
15443
15444  ;;
15445esac
15446fi
15447PANDOC=$ac_cv_path_PANDOC
15448if test -n "$PANDOC"; then
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15450$as_echo "$PANDOC" >&6; }
15451else
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15453$as_echo "no" >&6; }
15454fi
15455
15456
15457  test -n "$PANDOC" && break
15458done
15459
15460    else
15461      # If it succeeded, then it was overridden by the user. We will use it
15462      # for the tool.
15463
15464      # First remove it from the list of overridden variables, so we can test
15465      # for unknown variables in the end.
15466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15467
15468      # Check if we try to supply an empty value
15469      if test "x$PANDOC" = x; then
15470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15471$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15473$as_echo_n "checking for PANDOC... " >&6; }
15474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15475$as_echo "disabled" >&6; }
15476      else
15477        # Check if the provided tool contains a complete path.
15478        tool_specified="$PANDOC"
15479        tool_basename="${tool_specified##*/}"
15480        if test "x$tool_basename" = "x$tool_specified"; then
15481          # A command without a complete path is provided, search $PATH.
15482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15483$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15484          # Extract the first word of "$tool_basename", so it can be a program name with args.
15485set dummy $tool_basename; ac_word=$2
15486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15487$as_echo_n "checking for $ac_word... " >&6; }
15488if ${ac_cv_path_PANDOC+:} false; then :
15489  $as_echo_n "(cached) " >&6
15490else
15491  case $PANDOC in
15492  [\\/]* | ?:[\\/]*)
15493  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15494  ;;
15495  *)
15496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15497for as_dir in $PATH
15498do
15499  IFS=$as_save_IFS
15500  test -z "$as_dir" && as_dir=.
15501    for ac_exec_ext in '' $ac_executable_extensions; do
15502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15503    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15505    break 2
15506  fi
15507done
15508  done
15509IFS=$as_save_IFS
15510
15511  ;;
15512esac
15513fi
15514PANDOC=$ac_cv_path_PANDOC
15515if test -n "$PANDOC"; then
15516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15517$as_echo "$PANDOC" >&6; }
15518else
15519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15520$as_echo "no" >&6; }
15521fi
15522
15523
15524          if test "x$PANDOC" = x; then
15525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15526          fi
15527        else
15528          # Otherwise we believe it is a complete path. Use it as it is.
15529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15530$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15532$as_echo_n "checking for PANDOC... " >&6; }
15533          if test ! -x "$tool_specified"; then
15534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15535$as_echo "not found" >&6; }
15536            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15537          fi
15538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15539$as_echo "$tool_specified" >&6; }
15540        fi
15541      fi
15542    fi
15543
15544  fi
15545
15546
15547
15548
15549# Now we can determine OpenJDK build and target platforms. This is required to
15550# have early on.
15551# Make sure we can run config.sub.
15552$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15553  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15554
15555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15556$as_echo_n "checking build system type... " >&6; }
15557if ${ac_cv_build+:} false; then :
15558  $as_echo_n "(cached) " >&6
15559else
15560  ac_build_alias=$build_alias
15561test "x$ac_build_alias" = x &&
15562  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15563test "x$ac_build_alias" = x &&
15564  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15565ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15566  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15567
15568fi
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15570$as_echo "$ac_cv_build" >&6; }
15571case $ac_cv_build in
15572*-*-*) ;;
15573*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15574esac
15575build=$ac_cv_build
15576ac_save_IFS=$IFS; IFS='-'
15577set x $ac_cv_build
15578shift
15579build_cpu=$1
15580build_vendor=$2
15581shift; shift
15582# Remember, the first character of IFS is used to create $*,
15583# except with old shells:
15584build_os=$*
15585IFS=$ac_save_IFS
15586case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15587
15588
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15590$as_echo_n "checking host system type... " >&6; }
15591if ${ac_cv_host+:} false; then :
15592  $as_echo_n "(cached) " >&6
15593else
15594  if test "x$host_alias" = x; then
15595  ac_cv_host=$ac_cv_build
15596else
15597  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15598    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15599fi
15600
15601fi
15602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15603$as_echo "$ac_cv_host" >&6; }
15604case $ac_cv_host in
15605*-*-*) ;;
15606*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15607esac
15608host=$ac_cv_host
15609ac_save_IFS=$IFS; IFS='-'
15610set x $ac_cv_host
15611shift
15612host_cpu=$1
15613host_vendor=$2
15614shift; shift
15615# Remember, the first character of IFS is used to create $*,
15616# except with old shells:
15617host_os=$*
15618IFS=$ac_save_IFS
15619case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15620
15621
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15623$as_echo_n "checking target system type... " >&6; }
15624if ${ac_cv_target+:} false; then :
15625  $as_echo_n "(cached) " >&6
15626else
15627  if test "x$target_alias" = x; then
15628  ac_cv_target=$ac_cv_host
15629else
15630  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15631    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15632fi
15633
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15636$as_echo "$ac_cv_target" >&6; }
15637case $ac_cv_target in
15638*-*-*) ;;
15639*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15640esac
15641target=$ac_cv_target
15642ac_save_IFS=$IFS; IFS='-'
15643set x $ac_cv_target
15644shift
15645target_cpu=$1
15646target_vendor=$2
15647shift; shift
15648# Remember, the first character of IFS is used to create $*,
15649# except with old shells:
15650target_os=$*
15651IFS=$ac_save_IFS
15652case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15653
15654
15655# The aliases save the names the user supplied, while $host etc.
15656# will get canonicalized.
15657test -n "$target_alias" &&
15658  test "$program_prefix$program_suffix$program_transform_name" = \
15659    NONENONEs,x,x, &&
15660  program_prefix=${target_alias}-
15661
15662  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15663  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15664  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15665  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15666  # to use the configure naming style.
15667
15668
15669
15670
15671
15672  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15673  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15674  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15675  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15676  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15677  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15678
15679
15680
15681  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15682
15683  case "$build_os" in
15684    *linux*)
15685      VAR_OS=linux
15686      VAR_OS_TYPE=unix
15687      ;;
15688    *solaris*)
15689      VAR_OS=solaris
15690      VAR_OS_TYPE=unix
15691      ;;
15692    *darwin*)
15693      VAR_OS=macosx
15694      VAR_OS_TYPE=unix
15695      ;;
15696    *bsd*)
15697      VAR_OS=bsd
15698      VAR_OS_TYPE=unix
15699      ;;
15700    *cygwin*)
15701      VAR_OS=windows
15702      VAR_OS_ENV=windows.cygwin
15703      ;;
15704    *mingw*)
15705      VAR_OS=windows
15706      VAR_OS_ENV=windows.msys
15707      ;;
15708    *aix*)
15709      VAR_OS=aix
15710      VAR_OS_TYPE=unix
15711      ;;
15712    *)
15713      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15714      ;;
15715  esac
15716
15717
15718  # First argument is the cpu name from the trip/quad
15719  case "$build_cpu" in
15720    x86_64)
15721      VAR_CPU=x86_64
15722      VAR_CPU_ARCH=x86
15723      VAR_CPU_BITS=64
15724      VAR_CPU_ENDIAN=little
15725      ;;
15726    i?86)
15727      VAR_CPU=x86
15728      VAR_CPU_ARCH=x86
15729      VAR_CPU_BITS=32
15730      VAR_CPU_ENDIAN=little
15731      ;;
15732    alpha*)
15733      VAR_CPU=alpha
15734      VAR_CPU_ARCH=alpha
15735      VAR_CPU_BITS=64
15736      VAR_CPU_ENDIAN=little
15737      ;;
15738    arm*)
15739      VAR_CPU=arm
15740      VAR_CPU_ARCH=arm
15741      VAR_CPU_BITS=32
15742      VAR_CPU_ENDIAN=little
15743      ;;
15744    aarch64)
15745      VAR_CPU=aarch64
15746      VAR_CPU_ARCH=aarch64
15747      VAR_CPU_BITS=64
15748      VAR_CPU_ENDIAN=little
15749      ;;
15750    m68k)
15751      VAR_CPU=m68k
15752      VAR_CPU_ARCH=m68k
15753      VAR_CPU_BITS=32
15754      VAR_CPU_ENDIAN=big
15755      ;;
15756    mips)
15757      VAR_CPU=mips
15758      VAR_CPU_ARCH=mips
15759      VAR_CPU_BITS=32
15760      VAR_CPU_ENDIAN=big
15761      ;;
15762    mipsel)
15763      VAR_CPU=mipsel
15764      VAR_CPU_ARCH=mipsel
15765      VAR_CPU_BITS=32
15766      VAR_CPU_ENDIAN=little
15767      ;;
15768    mips64)
15769      VAR_CPU=mips64
15770      VAR_CPU_ARCH=mips64
15771      VAR_CPU_BITS=64
15772      VAR_CPU_ENDIAN=big
15773      ;;
15774    mips64el)
15775      VAR_CPU=mips64el
15776      VAR_CPU_ARCH=mips64el
15777      VAR_CPU_BITS=64
15778      VAR_CPU_ENDIAN=little
15779      ;;
15780    powerpc)
15781      VAR_CPU=ppc
15782      VAR_CPU_ARCH=ppc
15783      VAR_CPU_BITS=32
15784      VAR_CPU_ENDIAN=big
15785      ;;
15786    powerpc64)
15787      VAR_CPU=ppc64
15788      VAR_CPU_ARCH=ppc
15789      VAR_CPU_BITS=64
15790      VAR_CPU_ENDIAN=big
15791      ;;
15792    powerpc64le)
15793      VAR_CPU=ppc64le
15794      VAR_CPU_ARCH=ppc
15795      VAR_CPU_BITS=64
15796      VAR_CPU_ENDIAN=little
15797      ;;
15798    s390)
15799      VAR_CPU=s390
15800      VAR_CPU_ARCH=s390
15801      VAR_CPU_BITS=32
15802      VAR_CPU_ENDIAN=big
15803      ;;
15804    s390x)
15805      VAR_CPU=s390x
15806      VAR_CPU_ARCH=s390
15807      VAR_CPU_BITS=64
15808      VAR_CPU_ENDIAN=big
15809      ;;
15810    sh*eb)
15811      VAR_CPU=sh
15812      VAR_CPU_ARCH=sh
15813      VAR_CPU_BITS=32
15814      VAR_CPU_ENDIAN=big
15815      ;;
15816    sh*)
15817      VAR_CPU=sh
15818      VAR_CPU_ARCH=sh
15819      VAR_CPU_BITS=32
15820      VAR_CPU_ENDIAN=little
15821      ;;
15822    sparc)
15823      VAR_CPU=sparc
15824      VAR_CPU_ARCH=sparc
15825      VAR_CPU_BITS=32
15826      VAR_CPU_ENDIAN=big
15827      ;;
15828    sparcv9|sparc64)
15829      VAR_CPU=sparcv9
15830      VAR_CPU_ARCH=sparc
15831      VAR_CPU_BITS=64
15832      VAR_CPU_ENDIAN=big
15833      ;;
15834    *)
15835      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15836      ;;
15837  esac
15838
15839  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15840  OPENJDK_BUILD_OS="$VAR_OS"
15841  if test "x$VAR_OS_TYPE" != x; then
15842    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15843  else
15844    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15845  fi
15846  if test "x$VAR_OS_ENV" != x; then
15847    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15848  else
15849    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15850  fi
15851  OPENJDK_BUILD_CPU="$VAR_CPU"
15852  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15853  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15854  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15855
15856
15857
15858
15859
15860
15861
15862
15863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15864$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15866$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15867
15868  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15869
15870  case "$host_os" in
15871    *linux*)
15872      VAR_OS=linux
15873      VAR_OS_TYPE=unix
15874      ;;
15875    *solaris*)
15876      VAR_OS=solaris
15877      VAR_OS_TYPE=unix
15878      ;;
15879    *darwin*)
15880      VAR_OS=macosx
15881      VAR_OS_TYPE=unix
15882      ;;
15883    *bsd*)
15884      VAR_OS=bsd
15885      VAR_OS_TYPE=unix
15886      ;;
15887    *cygwin*)
15888      VAR_OS=windows
15889      VAR_OS_ENV=windows.cygwin
15890      ;;
15891    *mingw*)
15892      VAR_OS=windows
15893      VAR_OS_ENV=windows.msys
15894      ;;
15895    *aix*)
15896      VAR_OS=aix
15897      VAR_OS_TYPE=unix
15898      ;;
15899    *)
15900      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15901      ;;
15902  esac
15903
15904
15905  # First argument is the cpu name from the trip/quad
15906  case "$host_cpu" in
15907    x86_64)
15908      VAR_CPU=x86_64
15909      VAR_CPU_ARCH=x86
15910      VAR_CPU_BITS=64
15911      VAR_CPU_ENDIAN=little
15912      ;;
15913    i?86)
15914      VAR_CPU=x86
15915      VAR_CPU_ARCH=x86
15916      VAR_CPU_BITS=32
15917      VAR_CPU_ENDIAN=little
15918      ;;
15919    alpha*)
15920      VAR_CPU=alpha
15921      VAR_CPU_ARCH=alpha
15922      VAR_CPU_BITS=64
15923      VAR_CPU_ENDIAN=little
15924      ;;
15925    arm*)
15926      VAR_CPU=arm
15927      VAR_CPU_ARCH=arm
15928      VAR_CPU_BITS=32
15929      VAR_CPU_ENDIAN=little
15930      ;;
15931    aarch64)
15932      VAR_CPU=aarch64
15933      VAR_CPU_ARCH=aarch64
15934      VAR_CPU_BITS=64
15935      VAR_CPU_ENDIAN=little
15936      ;;
15937    m68k)
15938      VAR_CPU=m68k
15939      VAR_CPU_ARCH=m68k
15940      VAR_CPU_BITS=32
15941      VAR_CPU_ENDIAN=big
15942      ;;
15943    mips)
15944      VAR_CPU=mips
15945      VAR_CPU_ARCH=mips
15946      VAR_CPU_BITS=32
15947      VAR_CPU_ENDIAN=big
15948      ;;
15949    mipsel)
15950      VAR_CPU=mipsel
15951      VAR_CPU_ARCH=mipsel
15952      VAR_CPU_BITS=32
15953      VAR_CPU_ENDIAN=little
15954      ;;
15955    mips64)
15956      VAR_CPU=mips64
15957      VAR_CPU_ARCH=mips64
15958      VAR_CPU_BITS=64
15959      VAR_CPU_ENDIAN=big
15960      ;;
15961    mips64el)
15962      VAR_CPU=mips64el
15963      VAR_CPU_ARCH=mips64el
15964      VAR_CPU_BITS=64
15965      VAR_CPU_ENDIAN=little
15966      ;;
15967    powerpc)
15968      VAR_CPU=ppc
15969      VAR_CPU_ARCH=ppc
15970      VAR_CPU_BITS=32
15971      VAR_CPU_ENDIAN=big
15972      ;;
15973    powerpc64)
15974      VAR_CPU=ppc64
15975      VAR_CPU_ARCH=ppc
15976      VAR_CPU_BITS=64
15977      VAR_CPU_ENDIAN=big
15978      ;;
15979    powerpc64le)
15980      VAR_CPU=ppc64le
15981      VAR_CPU_ARCH=ppc
15982      VAR_CPU_BITS=64
15983      VAR_CPU_ENDIAN=little
15984      ;;
15985    s390)
15986      VAR_CPU=s390
15987      VAR_CPU_ARCH=s390
15988      VAR_CPU_BITS=32
15989      VAR_CPU_ENDIAN=big
15990      ;;
15991    s390x)
15992      VAR_CPU=s390x
15993      VAR_CPU_ARCH=s390
15994      VAR_CPU_BITS=64
15995      VAR_CPU_ENDIAN=big
15996      ;;
15997    sh*eb)
15998      VAR_CPU=sh
15999      VAR_CPU_ARCH=sh
16000      VAR_CPU_BITS=32
16001      VAR_CPU_ENDIAN=big
16002      ;;
16003    sh*)
16004      VAR_CPU=sh
16005      VAR_CPU_ARCH=sh
16006      VAR_CPU_BITS=32
16007      VAR_CPU_ENDIAN=little
16008      ;;
16009    sparc)
16010      VAR_CPU=sparc
16011      VAR_CPU_ARCH=sparc
16012      VAR_CPU_BITS=32
16013      VAR_CPU_ENDIAN=big
16014      ;;
16015    sparcv9|sparc64)
16016      VAR_CPU=sparcv9
16017      VAR_CPU_ARCH=sparc
16018      VAR_CPU_BITS=64
16019      VAR_CPU_ENDIAN=big
16020      ;;
16021    *)
16022      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16023      ;;
16024  esac
16025
16026  # ... and setup our own variables. (Do this explicitly to facilitate searching)
16027  OPENJDK_TARGET_OS="$VAR_OS"
16028  if test "x$VAR_OS_TYPE" != x; then
16029    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16030  else
16031    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16032  fi
16033  if test "x$VAR_OS_ENV" != x; then
16034    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16035  else
16036    OPENJDK_TARGET_OS_ENV="$VAR_OS"
16037  fi
16038  OPENJDK_TARGET_CPU="$VAR_CPU"
16039  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16040  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16041  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16042
16043
16044
16045
16046
16047
16048
16049
16050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16051$as_echo_n "checking openjdk-target os-cpu... " >&6; }
16052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16053$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16054
16055
16056
16057# Check whether --with-target-bits was given.
16058if test "${with_target_bits+set}" = set; then :
16059  withval=$with_target_bits;
16060fi
16061
16062
16063  # We have three types of compiles:
16064  # native  == normal compilation, target system == build system
16065  # cross   == traditional cross compilation, target system != build system; special toolchain needed
16066  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16067  #
16068  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16069    # We're doing a proper cross-compilation
16070    COMPILE_TYPE="cross"
16071  else
16072    COMPILE_TYPE="native"
16073  fi
16074
16075  if test "x$with_target_bits" != x; then
16076    if test "x$COMPILE_TYPE" = "xcross"; then
16077      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16078    fi
16079
16080    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16081      # A reduced build is requested
16082      COMPILE_TYPE="reduced"
16083      OPENJDK_TARGET_CPU_BITS=32
16084      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16085        OPENJDK_TARGET_CPU=x86
16086      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16087        OPENJDK_TARGET_CPU=sparc
16088      else
16089        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16090      fi
16091    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16092      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
16093    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16094      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16095$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16096    else
16097      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16098    fi
16099  fi
16100
16101
16102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16103$as_echo_n "checking compilation type... " >&6; }
16104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16105$as_echo "$COMPILE_TYPE" >&6; }
16106
16107
16108  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16109    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16110  else
16111    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16112  fi
16113
16114  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16115    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16116  else
16117    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16118  fi
16119
16120  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16121
16122
16123
16124  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16125    RELEASE_FILE_OS_NAME=SunOS
16126  fi
16127  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16128    RELEASE_FILE_OS_NAME=Linux
16129  fi
16130  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16131    RELEASE_FILE_OS_NAME=Windows
16132  fi
16133  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16134    RELEASE_FILE_OS_NAME="Darwin"
16135  fi
16136  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16137    RELEASE_FILE_OS_NAME="AIX"
16138  fi
16139  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16140
16141
16142
16143
16144
16145
16146  # Also store the legacy naming of the cpu.
16147  # Ie i586 and amd64 instead of x86 and x86_64
16148  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16149  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16150    OPENJDK_TARGET_CPU_LEGACY="i586"
16151  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16152    # On all platforms except MacOSX replace x86_64 with amd64.
16153    OPENJDK_TARGET_CPU_LEGACY="amd64"
16154  fi
16155
16156
16157  # And the second legacy naming of the cpu.
16158  # Ie i386 and amd64 instead of x86 and x86_64.
16159  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16160  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16161    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16162  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16163    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16164  fi
16165
16166
16167  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16168  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16169  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16170  OPENJDK_TARGET_CPU_ISADIR=""
16171  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16172    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16173      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16174    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16175      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16176    fi
16177  fi
16178
16179
16180  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16181  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16182  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16183    # On linux only, we replace x86 with i386.
16184    OPENJDK_TARGET_CPU_OSARCH="i386"
16185  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16186    # On all platforms except macosx, we replace x86_64 with amd64.
16187    OPENJDK_TARGET_CPU_OSARCH="amd64"
16188  fi
16189
16190
16191  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16192  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16193    OPENJDK_TARGET_CPU_JLI="i386"
16194  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16195    # On all platforms except macosx, we replace x86_64 with amd64.
16196    OPENJDK_TARGET_CPU_JLI="amd64"
16197  fi
16198
16199  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16200      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16201  else
16202      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16203  fi
16204
16205
16206  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16207  # Macosx is osx and x86_64 is x64
16208  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16209    OPENJDK_TARGET_OS_BUNDLE="osx"
16210  else
16211    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16212  fi
16213  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16214    OPENJDK_TARGET_CPU_BUNDLE="x64"
16215  else
16216    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16217  fi
16218  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16219
16220
16221  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16222    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16223    # unpack200.exe. This variable is used in
16224    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16225    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16226      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16227    fi
16228  fi
16229
16230  if test "x$COMPILE_TYPE" = "xcross"; then
16231    # FIXME: ... or should this include reduced builds..?
16232    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16233  else
16234    DEFINE_CROSS_COMPILE_ARCH=""
16235  fi
16236
16237
16238  # Convert openjdk platform names to hotspot names
16239
16240  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16241  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16242    HOTSPOT_TARGET_OS=bsd
16243  fi
16244
16245
16246  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16247  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16248    HOTSPOT_TARGET_OS_TYPE=posix
16249  fi
16250
16251
16252  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16253  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16254    HOTSPOT_TARGET_CPU=x86_32
16255  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16256    HOTSPOT_TARGET_CPU=sparc
16257  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16258    HOTSPOT_TARGET_CPU=ppc_64
16259  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16260    HOTSPOT_TARGET_CPU=ppc_64
16261  fi
16262
16263
16264  # This is identical with OPENJDK_*, but define anyway for consistency.
16265  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16266
16267
16268  # Setup HOTSPOT_TARGET_CPU_DEFINE
16269  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16270    HOTSPOT_TARGET_CPU_DEFINE=IA32
16271  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16272    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16273  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16274    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16275  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16276    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16277  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16278    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16279  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16280    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16281
16282  # The cpu defines below are for zero, we don't support them directly.
16283  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16284    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16285  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16286    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16287  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16288    HOTSPOT_TARGET_CPU_DEFINE=S390
16289  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16290    HOTSPOT_TARGET_CPU_DEFINE=S390
16291  elif test "x$OPENJDK_TARGET_CPU" != x; then
16292    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16293  fi
16294
16295
16296
16297
16298  # Also store the legacy naming of the cpu.
16299  # Ie i586 and amd64 instead of x86 and x86_64
16300  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16301  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16302    OPENJDK_BUILD_CPU_LEGACY="i586"
16303  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16304    # On all platforms except MacOSX replace x86_64 with amd64.
16305    OPENJDK_BUILD_CPU_LEGACY="amd64"
16306  fi
16307
16308
16309  # And the second legacy naming of the cpu.
16310  # Ie i386 and amd64 instead of x86 and x86_64.
16311  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16312  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16313    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16314  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16316  fi
16317
16318
16319  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16320  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16321  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16322  OPENJDK_BUILD_CPU_ISADIR=""
16323  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16324    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16325      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16326    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16327      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16328    fi
16329  fi
16330
16331
16332  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16333  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16334  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16335    # On linux only, we replace x86 with i386.
16336    OPENJDK_BUILD_CPU_OSARCH="i386"
16337  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16338    # On all platforms except macosx, we replace x86_64 with amd64.
16339    OPENJDK_BUILD_CPU_OSARCH="amd64"
16340  fi
16341
16342
16343  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16344  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16345    OPENJDK_BUILD_CPU_JLI="i386"
16346  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16347    # On all platforms except macosx, we replace x86_64 with amd64.
16348    OPENJDK_BUILD_CPU_JLI="amd64"
16349  fi
16350
16351  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16352      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16353  else
16354      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16355  fi
16356
16357
16358  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16359  # Macosx is osx and x86_64 is x64
16360  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16361    OPENJDK_BUILD_OS_BUNDLE="osx"
16362  else
16363    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16364  fi
16365  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16366    OPENJDK_BUILD_CPU_BUNDLE="x64"
16367  else
16368    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16369  fi
16370  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16371
16372
16373  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16374    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16375    # unpack200.exe. This variable is used in
16376    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16377    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16378      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16379    fi
16380  fi
16381
16382  if test "x$COMPILE_TYPE" = "xcross"; then
16383    # FIXME: ... or should this include reduced builds..?
16384    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16385  else
16386    DEFINE_CROSS_COMPILE_ARCH=""
16387  fi
16388
16389
16390  # Convert openjdk platform names to hotspot names
16391
16392  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16393  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16394    HOTSPOT_BUILD_OS=bsd
16395  fi
16396
16397
16398  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16399  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16400    HOTSPOT_BUILD_OS_TYPE=posix
16401  fi
16402
16403
16404  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16405  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16406    HOTSPOT_BUILD_CPU=x86_32
16407  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16408    HOTSPOT_BUILD_CPU=sparc
16409  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16410    HOTSPOT_BUILD_CPU=ppc_64
16411  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16412    HOTSPOT_BUILD_CPU=ppc_64
16413  fi
16414
16415
16416  # This is identical with OPENJDK_*, but define anyway for consistency.
16417  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16418
16419
16420  # Setup HOTSPOT_BUILD_CPU_DEFINE
16421  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16422    HOTSPOT_BUILD_CPU_DEFINE=IA32
16423  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16424    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16425  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16426    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16427  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16428    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16429  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16430    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16431  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16432    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16433
16434  # The cpu defines below are for zero, we don't support them directly.
16435  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16436    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16437  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16438    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16439  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16440    HOTSPOT_BUILD_CPU_DEFINE=S390
16441  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16442    HOTSPOT_BUILD_CPU_DEFINE=S390
16443  elif test "x$OPENJDK_BUILD_CPU" != x; then
16444    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16445  fi
16446
16447
16448
16449
16450
16451
16452# Continue setting up basic stuff. Most remaining code require fundamental tools.
16453
16454  # Save the current directory this script was started from
16455  CURDIR="$PWD"
16456
16457  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16458  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16459  # was not available at that time.
16460  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16461  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16462    ORIGINAL_PATH="$REWRITTEN_PATH"
16463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16464$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16465  fi
16466
16467  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16468    PATH_SEP=";"
16469
16470  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16471  if test $SRC_ROOT_LENGTH -gt 100; then
16472    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16473  fi
16474
16475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16477$as_echo_n "checking cygwin release... " >&6; }
16478    CYGWIN_VERSION=`$UNAME -r`
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16480$as_echo "$CYGWIN_VERSION" >&6; }
16481    WINDOWS_ENV_VENDOR='cygwin'
16482    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16483
16484    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16485    if test "x$CYGWIN_VERSION_OLD" != x; then
16486      { $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
16487$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;}
16488      as_fn_error $? "Cannot continue" "$LINENO" 5
16489    fi
16490    if test "x$CYGPATH" = x; then
16491      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16492    fi
16493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16494$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16495    # The cmd output ends with Windows line endings (CR/LF)
16496    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16497    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16498    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16500$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16501    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16502    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16503    if test "x$test_cygdrive_prefix" = x; then
16504      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16505    fi
16506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16508$as_echo_n "checking msys release... " >&6; }
16509    MSYS_VERSION=`$UNAME -r`
16510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16511$as_echo "$MSYS_VERSION" >&6; }
16512
16513    WINDOWS_ENV_VENDOR='msys'
16514    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16515
16516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16517$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16518    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16519    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16520
16521  windows_path="$MSYS_ROOT_PATH"
16522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16523    unix_path=`$CYGPATH -u "$windows_path"`
16524    MSYS_ROOT_PATH="$unix_path"
16525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16527    MSYS_ROOT_PATH="$unix_path"
16528  fi
16529
16530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16531$as_echo "$MSYS_ROOT_PATH" >&6; }
16532    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16533  else
16534    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16535  fi
16536
16537  # Test if windows or unix (cygwin/msys) find is first in path.
16538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16539$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16540  FIND_BINARY_OUTPUT=`find --version 2>&1`
16541  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16543$as_echo "unix style" >&6; }
16544  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16546$as_echo "Windows" >&6; }
16547    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16548$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16549    { $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
16550$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16551    as_fn_error $? "Cannot continue" "$LINENO" 5
16552  else
16553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16554$as_echo "unknown" >&6; }
16555    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16556$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16557  fi
16558
16559  else
16560    PATH_SEP=":"
16561  fi
16562
16563
16564  # We get the top-level directory from the supporting wrappers.
16565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16566$as_echo_n "checking for top-level directory... " >&6; }
16567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16568$as_echo "$TOPDIR" >&6; }
16569
16570
16571  # Save the original version of TOPDIR for string comparisons
16572  ORIGINAL_TOPDIR="$TOPDIR"
16573
16574
16575  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16576
16577  # Only process if variable expands to non-empty
16578
16579  if test "x$CURDIR" != x; then
16580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16581
16582  # Input might be given as Windows format, start by converting to
16583  # unix format.
16584  path="$CURDIR"
16585  new_path=`$CYGPATH -u "$path"`
16586
16587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16590  # "foo.exe" is OK but "foo" is an error.
16591  #
16592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16593  # It is also a way to make sure we got the proper file name for the real test later on.
16594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16595  if test "x$test_shortpath" = x; then
16596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16597$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16598    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16599  fi
16600
16601  # Call helper function which possibly converts this using DOS-style short mode.
16602  # If so, the updated path is stored in $new_path.
16603
16604  input_path="$new_path"
16605  # Check if we need to convert this using DOS-style short mode. If the path
16606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16607  # take no chances and rewrite it.
16608  # Note: m4 eats our [], so we need to use [ and ] instead.
16609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16610  if test "x$has_forbidden_chars" != x; then
16611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16615      # Going to short mode and back again did indeed matter. Since short mode is
16616      # case insensitive, let's make it lowercase to improve readability.
16617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16618      # Now convert it back to Unix-style (cygpath)
16619      input_path=`$CYGPATH -u "$shortmode_path"`
16620      new_path="$input_path"
16621    fi
16622  fi
16623
16624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16625  if test "x$test_cygdrive_prefix" = x; then
16626    # As a simple fix, exclude /usr/bin since it's not a real path.
16627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16629      # a path prefixed by /cygdrive for fixpath to work.
16630      new_path="$CYGWIN_ROOT_PATH$input_path"
16631    fi
16632  fi
16633
16634
16635  if test "x$path" != "x$new_path"; then
16636    CURDIR="$new_path"
16637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16638$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16639  fi
16640
16641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16642
16643  path="$CURDIR"
16644  has_colon=`$ECHO $path | $GREP ^.:`
16645  new_path="$path"
16646  if test "x$has_colon" = x; then
16647    # Not in mixed or Windows style, start by that.
16648    new_path=`cmd //c echo $path`
16649  fi
16650
16651
16652  input_path="$new_path"
16653  # Check if we need to convert this using DOS-style short mode. If the path
16654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16655  # take no chances and rewrite it.
16656  # Note: m4 eats our [], so we need to use [ and ] instead.
16657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16658  if test "x$has_forbidden_chars" != x; then
16659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16661  fi
16662
16663
16664  windows_path="$new_path"
16665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16666    unix_path=`$CYGPATH -u "$windows_path"`
16667    new_path="$unix_path"
16668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16670    new_path="$unix_path"
16671  fi
16672
16673  if test "x$path" != "x$new_path"; then
16674    CURDIR="$new_path"
16675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16676$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16677  fi
16678
16679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16681
16682    else
16683      # We're on a unix platform. Hooray! :)
16684      path="$CURDIR"
16685      has_space=`$ECHO "$path" | $GREP " "`
16686      if test "x$has_space" != x; then
16687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16688$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16690      fi
16691
16692      # Use eval to expand a potential ~
16693      eval path="$path"
16694      if test ! -f "$path" && test ! -d "$path"; then
16695        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16696      fi
16697
16698      if test -d "$path"; then
16699        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16700      else
16701        dir="`$DIRNAME "$path"`"
16702        base="`$BASENAME "$path"`"
16703        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16704      fi
16705    fi
16706  fi
16707
16708
16709  # Only process if variable expands to non-empty
16710
16711  if test "x$TOPDIR" != x; then
16712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16713
16714  # Input might be given as Windows format, start by converting to
16715  # unix format.
16716  path="$TOPDIR"
16717  new_path=`$CYGPATH -u "$path"`
16718
16719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16722  # "foo.exe" is OK but "foo" is an error.
16723  #
16724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16725  # It is also a way to make sure we got the proper file name for the real test later on.
16726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16727  if test "x$test_shortpath" = x; then
16728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16729$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16730    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16731  fi
16732
16733  # Call helper function which possibly converts this using DOS-style short mode.
16734  # If so, the updated path is stored in $new_path.
16735
16736  input_path="$new_path"
16737  # Check if we need to convert this using DOS-style short mode. If the path
16738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16739  # take no chances and rewrite it.
16740  # Note: m4 eats our [], so we need to use [ and ] instead.
16741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16742  if test "x$has_forbidden_chars" != x; then
16743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16747      # Going to short mode and back again did indeed matter. Since short mode is
16748      # case insensitive, let's make it lowercase to improve readability.
16749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16750      # Now convert it back to Unix-style (cygpath)
16751      input_path=`$CYGPATH -u "$shortmode_path"`
16752      new_path="$input_path"
16753    fi
16754  fi
16755
16756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16757  if test "x$test_cygdrive_prefix" = x; then
16758    # As a simple fix, exclude /usr/bin since it's not a real path.
16759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16761      # a path prefixed by /cygdrive for fixpath to work.
16762      new_path="$CYGWIN_ROOT_PATH$input_path"
16763    fi
16764  fi
16765
16766
16767  if test "x$path" != "x$new_path"; then
16768    TOPDIR="$new_path"
16769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16770$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16771  fi
16772
16773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16774
16775  path="$TOPDIR"
16776  has_colon=`$ECHO $path | $GREP ^.:`
16777  new_path="$path"
16778  if test "x$has_colon" = x; then
16779    # Not in mixed or Windows style, start by that.
16780    new_path=`cmd //c echo $path`
16781  fi
16782
16783
16784  input_path="$new_path"
16785  # Check if we need to convert this using DOS-style short mode. If the path
16786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16787  # take no chances and rewrite it.
16788  # Note: m4 eats our [], so we need to use [ and ] instead.
16789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16790  if test "x$has_forbidden_chars" != x; then
16791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16793  fi
16794
16795
16796  windows_path="$new_path"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    new_path="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    new_path="$unix_path"
16803  fi
16804
16805  if test "x$path" != "x$new_path"; then
16806    TOPDIR="$new_path"
16807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16808$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16809  fi
16810
16811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16813
16814    else
16815      # We're on a unix platform. Hooray! :)
16816      path="$TOPDIR"
16817      has_space=`$ECHO "$path" | $GREP " "`
16818      if test "x$has_space" != x; then
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16820$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16822      fi
16823
16824      # Use eval to expand a potential ~
16825      eval path="$path"
16826      if test ! -f "$path" && test ! -d "$path"; then
16827        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16828      fi
16829
16830      if test -d "$path"; then
16831        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16832      else
16833        dir="`$DIRNAME "$path"`"
16834        base="`$BASENAME "$path"`"
16835        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16836      fi
16837    fi
16838  fi
16839
16840  # SRC_ROOT is a traditional alias for TOPDIR.
16841  SRC_ROOT=$TOPDIR
16842
16843  # Calculate a canonical version of TOPDIR for string comparisons
16844  CANONICAL_TOPDIR=$TOPDIR
16845
16846  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16847    # Follow a chain of symbolic links. Use readlink
16848    # where it exists, else fall back to horribly
16849    # complicated shell code.
16850    if test "x$READLINK_TESTED" != yes; then
16851      # On MacOSX there is a readlink tool with a different
16852      # purpose than the GNU readlink tool. Check the found readlink.
16853      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16854      if test "x$ISGNU" = x; then
16855        # A readlink that we do not know how to use.
16856        # Are there other non-GNU readlinks out there?
16857        READLINK_TESTED=yes
16858        READLINK=
16859      fi
16860    fi
16861
16862    if test "x$READLINK" != x; then
16863      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16864    else
16865      # Save the current directory for restoring afterwards
16866      STARTDIR=$PWD
16867      COUNTER=0
16868      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16869      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16870      cd $sym_link_dir
16871      # Use -P flag to resolve symlinks in directories.
16872      cd `$THEPWDCMD -P`
16873      sym_link_dir=`$THEPWDCMD -P`
16874      # Resolve file symlinks
16875      while test $COUNTER -lt 20; do
16876        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16877        if test "x$ISLINK" == x; then
16878          # This is not a symbolic link! We are done!
16879          break
16880        fi
16881        # Again resolve directory symlinks since the target of the just found
16882        # link could be in a different directory
16883        cd `$DIRNAME $ISLINK`
16884        sym_link_dir=`$THEPWDCMD -P`
16885        sym_link_file=`$BASENAME $ISLINK`
16886        let COUNTER=COUNTER+1
16887      done
16888      cd $STARTDIR
16889      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16890    fi
16891  fi
16892
16893
16894
16895  # Locate the directory of this script.
16896  AUTOCONF_DIR=$TOPDIR/common/autoconf
16897
16898  # Setup username (for use in adhoc version strings etc)
16899  # Outer [ ] to quote m4.
16900   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16901
16902
16903
16904# Check if it's a pure open build or if custom sources are to be used.
16905
16906  # Check whether --enable-openjdk-only was given.
16907if test "${enable_openjdk_only+set}" = set; then :
16908  enableval=$enable_openjdk_only;
16909else
16910  enable_openjdk_only="no"
16911fi
16912
16913
16914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16915$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16917$as_echo "$enable_openjdk_only" >&6; }
16918  if test "x$enable_openjdk_only" = "xyes"; then
16919    SUPPRESS_CUSTOM_EXTENSIONS="true"
16920  elif test "x$enable_openjdk_only" = "xno"; then
16921    SUPPRESS_CUSTOM_EXTENSIONS="false"
16922  else
16923    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16924  fi
16925
16926  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16927  # the IncludeCustomExtension macro.
16928
16929
16930# Check whether --with-custom-make-dir was given.
16931if test "${with_custom_make_dir+set}" = set; then :
16932  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
16933$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16934fi
16935
16936
16937
16938
16939# These are needed to be able to create a configuration name (and thus the output directory)
16940
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16942$as_echo_n "checking which variant of the JDK to build... " >&6; }
16943
16944# Check whether --with-jdk-variant was given.
16945if test "${with_jdk_variant+set}" = set; then :
16946  withval=$with_jdk_variant;
16947fi
16948
16949
16950  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16951    JDK_VARIANT="normal"
16952  else
16953    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16954  fi
16955
16956
16957
16958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16959$as_echo "$JDK_VARIANT" >&6; }
16960
16961
16962  DEBUG_LEVEL="release"
16963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16964$as_echo_n "checking which debug level to use... " >&6; }
16965  # Check whether --enable-debug was given.
16966if test "${enable_debug+set}" = set; then :
16967  enableval=$enable_debug;
16968        ENABLE_DEBUG="${enableval}"
16969        DEBUG_LEVEL="fastdebug"
16970
16971else
16972  ENABLE_DEBUG="no"
16973fi
16974
16975
16976
16977# Check whether --with-debug-level was given.
16978if test "${with_debug_level+set}" = set; then :
16979  withval=$with_debug_level;
16980        DEBUG_LEVEL="${withval}"
16981        if test "x$ENABLE_DEBUG" = xyes; then
16982          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16983        fi
16984
16985fi
16986
16987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16988$as_echo "$DEBUG_LEVEL" >&6; }
16989
16990  if test "x$DEBUG_LEVEL" != xrelease && \
16991      test "x$DEBUG_LEVEL" != xoptimized && \
16992      test "x$DEBUG_LEVEL" != xfastdebug && \
16993      test "x$DEBUG_LEVEL" != xslowdebug; then
16994    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16995  fi
16996
16997  # Translate DEBUG_LEVEL to debug level used by Hotspot
16998  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16999  if test "x$DEBUG_LEVEL" = xrelease; then
17000    HOTSPOT_DEBUG_LEVEL="product"
17001  elif test "x$DEBUG_LEVEL" = xslowdebug; then
17002    HOTSPOT_DEBUG_LEVEL="debug"
17003  fi
17004
17005  if test "x$DEBUG_LEVEL" = xoptimized; then
17006    # The debug level 'optimized' is a little special because it is currently only
17007    # applicable to the HotSpot build where it means to build a completely
17008    # optimized version of the VM without any debugging code (like for the
17009    # 'release' debug level which is called 'product' in the HotSpot build) but
17010    # with the exception that it can contain additional code which is otherwise
17011    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
17012    # test new and/or experimental features which are not intended for customer
17013    # shipment. Because these new features need to be tested and benchmarked in
17014    # real world scenarios, we want to build the containing JDK at the 'release'
17015    # debug level.
17016    DEBUG_LEVEL="release"
17017  fi
17018
17019
17020
17021
17022
17023
17024# Check whether --with-jvm-variants was given.
17025if test "${with_jvm_variants+set}" = set; then :
17026  withval=$with_jvm_variants;
17027fi
17028
17029
17030
17031
17032# Check whether --with-cpu-port was given.
17033if test "${with_cpu_port+set}" = set; then :
17034  withval=$with_cpu_port;
17035fi
17036
17037
17038  if test "x$with_cpu_port" != x; then
17039    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17040      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17041    fi
17042    if test "x$with_cpu_port" != xarm64 && \
17043        test "x$with_cpu_port" != xaarch64; then
17044      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17045    fi
17046    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17047  fi
17048
17049
17050  if test "x$with_jvm_variants" = x; then
17051    with_jvm_variants="server"
17052  fi
17053  JVM_VARIANTS_OPT="$with_jvm_variants"
17054
17055  # Has the user listed more than one variant?
17056  # Additional [] needed to keep m4 from mangling shell constructs.
17057  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17058    BUILDING_MULTIPLE_JVM_VARIANTS=true
17059  else
17060    BUILDING_MULTIPLE_JVM_VARIANTS=false
17061  fi
17062  # Replace the commas with AND for use in the build directory name.
17063  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17064
17065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17066$as_echo_n "checking which variants of the JVM to build... " >&6; }
17067  # JVM_VARIANTS is a space-separated list.
17068  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17069  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17071$as_echo "$JVM_VARIANTS" >&6; }
17072
17073  # Check that the selected variants are valid
17074
17075  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17076  # Notice that the original variant failes on SLES 10 and 11
17077  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17078  STACK=${JVM_VARIANTS// /$'\n'}
17079  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17080  if test "x$INVALID_VARIANTS" != x; then
17081    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17082$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17083    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17084  fi
17085
17086  # All "special" variants share the same output directory ("server")
17087  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17088  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17089  STACK=${JVM_VARIANTS// /$'\n'}
17090  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17091  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17092    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17093  fi
17094
17095  # The "main" variant is the one used by other libs to link against during the
17096  # build.
17097  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17098    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17099    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17100      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17101        JVM_VARIANT_MAIN="$variant"
17102        break
17103      fi
17104    done
17105  else
17106    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17107  fi
17108
17109
17110
17111
17112
17113  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17114    # zero behaves as a platform and rewrites these values. This is really weird. :(
17115    # We are guaranteed that we do not build any other variants when building zero.
17116    HOTSPOT_TARGET_CPU=zero
17117    HOTSPOT_TARGET_CPU_ARCH=zero
17118  fi
17119
17120
17121# With basic setup done, call the custom early hook.
17122
17123
17124# Check if we have devkits, extra paths or sysroot set.
17125
17126
17127# Check whether --with-devkit was given.
17128if test "${with_devkit+set}" = set; then :
17129  withval=$with_devkit;
17130
17131  # Only process if variable expands to non-empty
17132
17133  if test "x$with_devkit" != x; then
17134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17135
17136  # Input might be given as Windows format, start by converting to
17137  # unix format.
17138  path="$with_devkit"
17139  new_path=`$CYGPATH -u "$path"`
17140
17141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17144  # "foo.exe" is OK but "foo" is an error.
17145  #
17146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17147  # It is also a way to make sure we got the proper file name for the real test later on.
17148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17149  if test "x$test_shortpath" = x; then
17150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17151$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17152    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17153  fi
17154
17155  # Call helper function which possibly converts this using DOS-style short mode.
17156  # If so, the updated path is stored in $new_path.
17157
17158  input_path="$new_path"
17159  # Check if we need to convert this using DOS-style short mode. If the path
17160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17161  # take no chances and rewrite it.
17162  # Note: m4 eats our [], so we need to use [ and ] instead.
17163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17164  if test "x$has_forbidden_chars" != x; then
17165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17169      # Going to short mode and back again did indeed matter. Since short mode is
17170      # case insensitive, let's make it lowercase to improve readability.
17171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17172      # Now convert it back to Unix-style (cygpath)
17173      input_path=`$CYGPATH -u "$shortmode_path"`
17174      new_path="$input_path"
17175    fi
17176  fi
17177
17178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17179  if test "x$test_cygdrive_prefix" = x; then
17180    # As a simple fix, exclude /usr/bin since it's not a real path.
17181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17183      # a path prefixed by /cygdrive for fixpath to work.
17184      new_path="$CYGWIN_ROOT_PATH$input_path"
17185    fi
17186  fi
17187
17188
17189  if test "x$path" != "x$new_path"; then
17190    with_devkit="$new_path"
17191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17192$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17193  fi
17194
17195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17196
17197  path="$with_devkit"
17198  has_colon=`$ECHO $path | $GREP ^.:`
17199  new_path="$path"
17200  if test "x$has_colon" = x; then
17201    # Not in mixed or Windows style, start by that.
17202    new_path=`cmd //c echo $path`
17203  fi
17204
17205
17206  input_path="$new_path"
17207  # Check if we need to convert this using DOS-style short mode. If the path
17208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17209  # take no chances and rewrite it.
17210  # Note: m4 eats our [], so we need to use [ and ] instead.
17211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17212  if test "x$has_forbidden_chars" != x; then
17213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17215  fi
17216
17217
17218  windows_path="$new_path"
17219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17220    unix_path=`$CYGPATH -u "$windows_path"`
17221    new_path="$unix_path"
17222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17224    new_path="$unix_path"
17225  fi
17226
17227  if test "x$path" != "x$new_path"; then
17228    with_devkit="$new_path"
17229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17230$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17231  fi
17232
17233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17235
17236    else
17237      # We're on a unix platform. Hooray! :)
17238      path="$with_devkit"
17239      has_space=`$ECHO "$path" | $GREP " "`
17240      if test "x$has_space" != x; then
17241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17242$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17244      fi
17245
17246      # Use eval to expand a potential ~
17247      eval path="$path"
17248      if test ! -f "$path" && test ! -d "$path"; then
17249        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17250      fi
17251
17252      if test -d "$path"; then
17253        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17254      else
17255        dir="`$DIRNAME "$path"`"
17256        base="`$BASENAME "$path"`"
17257        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17258      fi
17259    fi
17260  fi
17261
17262        DEVKIT_ROOT="$with_devkit"
17263        # Check for a meta data info file in the root of the devkit
17264        if test -f "$DEVKIT_ROOT/devkit.info"; then
17265          . $DEVKIT_ROOT/devkit.info
17266          # This potentially sets the following:
17267          # A descriptive name of the devkit
17268
17269  if test "x$DEVKIT_NAME" = x; then
17270    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17271  fi
17272
17273          # Corresponds to --with-extra-path
17274
17275  if test "x$DEVKIT_EXTRA_PATH" = x; then
17276    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17277  fi
17278
17279          # Corresponds to --with-toolchain-path
17280
17281  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17282    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17283  fi
17284
17285          # Corresponds to --with-sysroot
17286
17287  if test "x$DEVKIT_SYSROOT" = x; then
17288    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17289  fi
17290
17291
17292          # Identifies the Visual Studio version in the devkit
17293
17294  if test "x$DEVKIT_VS_VERSION" = x; then
17295    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17296  fi
17297
17298          # The Visual Studio include environment variable
17299
17300  if test "x$DEVKIT_VS_INCLUDE" = x; then
17301    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17302  fi
17303
17304          # The Visual Studio lib environment variable
17305
17306  if test "x$DEVKIT_VS_LIB" = x; then
17307    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17308  fi
17309
17310          # Corresponds to --with-msvcr-dll
17311
17312  if test "x$DEVKIT_MSVCR_DLL" = x; then
17313    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17314  fi
17315
17316          # Corresponds to --with-msvcp-dll
17317
17318  if test "x$DEVKIT_MSVCP_DLL" = x; then
17319    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17320  fi
17321
17322        fi
17323
17324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17325$as_echo_n "checking for devkit... " >&6; }
17326        if test "x$DEVKIT_NAME" != x; then
17327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17328$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17329        else
17330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17331$as_echo "$DEVKIT_ROOT" >&6; }
17332        fi
17333
17334
17335  if test "x$DEVKIT_EXTRA_PATH" != x; then
17336    if test "x$EXTRA_PATH" = x; then
17337      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17338    else
17339      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17340    fi
17341  fi
17342
17343
17344        # Fallback default of just /bin if DEVKIT_PATH is not defined
17345        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17346          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17347        fi
17348
17349  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17350    if test "x$TOOLCHAIN_PATH" = x; then
17351      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17352    else
17353      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17354    fi
17355  fi
17356
17357
17358        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17359        # places for backwards compatiblity.
17360        if test "x$DEVKIT_SYSROOT" != x; then
17361          SYSROOT="$DEVKIT_SYSROOT"
17362        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17363          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17364        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17365          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17366        fi
17367
17368
17369fi
17370
17371
17372  # You can force the sysroot if the sysroot encoded into the compiler tools
17373  # is not correct.
17374
17375# Check whether --with-sys-root was given.
17376if test "${with_sys_root+set}" = set; then :
17377  withval=$with_sys_root; SYSROOT=$with_sys_root
17378
17379fi
17380
17381
17382
17383# Check whether --with-sysroot was given.
17384if test "${with_sysroot+set}" = set; then :
17385  withval=$with_sysroot; SYSROOT=$with_sysroot
17386
17387fi
17388
17389
17390
17391# Check whether --with-tools-dir was given.
17392if test "${with_tools_dir+set}" = set; then :
17393  withval=$with_tools_dir;
17394  if test "x$with_tools_dir" != x; then
17395    if test "x$TOOLCHAIN_PATH" = x; then
17396      TOOLCHAIN_PATH="$with_tools_dir"
17397    else
17398      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17399    fi
17400  fi
17401
17402
17403fi
17404
17405
17406
17407# Check whether --with-toolchain-path was given.
17408if test "${with_toolchain_path+set}" = set; then :
17409  withval=$with_toolchain_path;
17410  if test "x$with_toolchain_path" != x; then
17411    if test "x$TOOLCHAIN_PATH" = x; then
17412      TOOLCHAIN_PATH="$with_toolchain_path"
17413    else
17414      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17415    fi
17416  fi
17417
17418
17419fi
17420
17421
17422
17423# Check whether --with-extra-path was given.
17424if test "${with_extra_path+set}" = set; then :
17425  withval=$with_extra_path;
17426  if test "x$with_extra_path" != x; then
17427    if test "x$EXTRA_PATH" = x; then
17428      EXTRA_PATH="$with_extra_path"
17429    else
17430      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17431    fi
17432  fi
17433
17434
17435fi
17436
17437
17438  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17439    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17440    # If not, detect if Xcode is installed by running xcodebuild -version
17441    # if no Xcode installed, xcodebuild exits with 1
17442    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17443    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17444      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17445      # fall back on the stub binary in /usr/bin/xcodebuild
17446      # Extract the first word of "xcodebuild", so it can be a program name with args.
17447set dummy xcodebuild; ac_word=$2
17448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17449$as_echo_n "checking for $ac_word... " >&6; }
17450if ${ac_cv_path_XCODEBUILD+:} false; then :
17451  $as_echo_n "(cached) " >&6
17452else
17453  case $XCODEBUILD in
17454  [\\/]* | ?:[\\/]*)
17455  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17456  ;;
17457  *)
17458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17459for as_dir in $TOOLCHAIN_PATH
17460do
17461  IFS=$as_save_IFS
17462  test -z "$as_dir" && as_dir=.
17463    for ac_exec_ext in '' $ac_executable_extensions; do
17464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17465    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17467    break 2
17468  fi
17469done
17470  done
17471IFS=$as_save_IFS
17472
17473  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17474  ;;
17475esac
17476fi
17477XCODEBUILD=$ac_cv_path_XCODEBUILD
17478if test -n "$XCODEBUILD"; then
17479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17480$as_echo "$XCODEBUILD" >&6; }
17481else
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17483$as_echo "no" >&6; }
17484fi
17485
17486
17487    else
17488      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17489      # when only the command line tools are installed there are no SDKs, so headers
17490      # are copied into the system frameworks
17491      XCODEBUILD=
17492
17493    fi
17494
17495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17496$as_echo_n "checking for sdk name... " >&6; }
17497
17498# Check whether --with-sdk-name was given.
17499if test "${with_sdk_name+set}" = set; then :
17500  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17501
17502fi
17503
17504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17505$as_echo "$SDKNAME" >&6; }
17506
17507    # if toolchain path is specified then don't rely on system headers, they may not compile
17508    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17509    test -z "$TOOLCHAIN_PATH" && \
17510      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17511
17512    if test -z "$SYSROOT"; then
17513      if test -n "$XCODEBUILD"; then
17514        # if we don't have system headers, use default SDK name (last resort)
17515        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17516          SDKNAME=${SDKNAME:-macosx}
17517        fi
17518
17519        if test -n "$SDKNAME"; then
17520          # Call xcodebuild to determine SYSROOT
17521          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17522        fi
17523      else
17524        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17525          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
17526        fi
17527      fi
17528    else
17529      # warn user if --with-sdk-name was also set
17530      if test -n "$with_sdk_name"; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17532$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17533      fi
17534    fi
17535
17536    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17537      # If no system framework headers, then SYSROOT must be set, or we won't build
17538      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
17539    fi
17540
17541    # Perform a basic sanity test
17542    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17543      if test -z "$SYSROOT"; then
17544        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
17545      else
17546        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17547      fi
17548    fi
17549
17550    # set SDKROOT too, Xcode tools will pick it up
17551    SDKROOT="$SYSROOT"
17552
17553  fi
17554
17555  # Prepend the extra path to the global path
17556
17557  if test "x$EXTRA_PATH" != x; then
17558    if test "x$PATH" = x; then
17559      PATH="$EXTRA_PATH"
17560    else
17561      PATH="$EXTRA_PATH:$PATH"
17562    fi
17563  fi
17564
17565
17566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17567$as_echo_n "checking for sysroot... " >&6; }
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17569$as_echo "$SYSROOT" >&6; }
17570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17571$as_echo_n "checking for toolchain path... " >&6; }
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17573$as_echo "$TOOLCHAIN_PATH" >&6; }
17574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17575$as_echo_n "checking for extra path... " >&6; }
17576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17577$as_echo "$EXTRA_PATH" >&6; }
17578
17579
17580# To properly create a configuration name, we need to have the OpenJDK target
17581# and options (variants and debug level) parsed.
17582
17583
17584
17585# Check whether --with-conf-name was given.
17586if test "${with_conf_name+set}" = set; then :
17587  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17588fi
17589
17590
17591  # Test from where we are running configure, in or outside of src root.
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17593$as_echo_n "checking where to store configuration... " >&6; }
17594  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17595      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17596      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17597    # We are running configure from the src root.
17598    # Create a default ./build/target-variant-debuglevel output root.
17599    if test "x${CONF_NAME}" = x; then
17600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17601$as_echo "in default location" >&6; }
17602      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17603    else
17604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17605$as_echo "in build directory with custom name" >&6; }
17606    fi
17607    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17608    $MKDIR -p "$OUTPUT_ROOT"
17609    if test ! -d "$OUTPUT_ROOT"; then
17610      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17611    fi
17612  else
17613    # We are running configure from outside of the src dir.
17614    # Then use the current directory as output dir!
17615    # If configuration is situated in normal build directory, just use the build
17616    # directory name as configuration name, otherwise use the complete path.
17617    if test "x${CONF_NAME}" = x; then
17618      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17619    fi
17620    OUTPUT_ROOT="$CURDIR"
17621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17622$as_echo "in current directory" >&6; }
17623
17624    # WARNING: This might be a bad thing to do. You need to be sure you want to
17625    # have a configuration in this directory. Do some sanity checks!
17626
17627    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17628      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17629      # other files
17630      files_present=`$LS $OUTPUT_ROOT`
17631      # Configure has already touched config.log and confdefs.h in the current dir when this check
17632      # is performed.
17633      filtered_files=`$ECHO "$files_present" \
17634          | $SED -e 's/config.log//g' \
17635              -e 's/configure.log//g' \
17636              -e 's/confdefs.h//g' \
17637              -e 's/ //g' \
17638          | $TR -d '\n'`
17639      if test "x$filtered_files" != x; then
17640        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17641$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17642        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17643$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17644        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17645$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17646        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17647$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17648        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17649$as_echo "$as_me: seriously mess up just about everything." >&6;}
17650        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17651$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17652        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17653$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17654        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17655      fi
17656    fi
17657  fi
17658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17659$as_echo_n "checking what configuration name to use... " >&6; }
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17661$as_echo "$CONF_NAME" >&6; }
17662
17663
17664  # Only process if variable expands to non-empty
17665
17666  if test "x$OUTPUT_ROOT" != x; then
17667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17668
17669  # Input might be given as Windows format, start by converting to
17670  # unix format.
17671  path="$OUTPUT_ROOT"
17672  new_path=`$CYGPATH -u "$path"`
17673
17674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17677  # "foo.exe" is OK but "foo" is an error.
17678  #
17679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17680  # It is also a way to make sure we got the proper file name for the real test later on.
17681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17682  if test "x$test_shortpath" = x; then
17683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17684$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17685    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17686  fi
17687
17688  # Call helper function which possibly converts this using DOS-style short mode.
17689  # If so, the updated path is stored in $new_path.
17690
17691  input_path="$new_path"
17692  # Check if we need to convert this using DOS-style short mode. If the path
17693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17694  # take no chances and rewrite it.
17695  # Note: m4 eats our [], so we need to use [ and ] instead.
17696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17697  if test "x$has_forbidden_chars" != x; then
17698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17702      # Going to short mode and back again did indeed matter. Since short mode is
17703      # case insensitive, let's make it lowercase to improve readability.
17704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17705      # Now convert it back to Unix-style (cygpath)
17706      input_path=`$CYGPATH -u "$shortmode_path"`
17707      new_path="$input_path"
17708    fi
17709  fi
17710
17711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17712  if test "x$test_cygdrive_prefix" = x; then
17713    # As a simple fix, exclude /usr/bin since it's not a real path.
17714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17716      # a path prefixed by /cygdrive for fixpath to work.
17717      new_path="$CYGWIN_ROOT_PATH$input_path"
17718    fi
17719  fi
17720
17721
17722  if test "x$path" != "x$new_path"; then
17723    OUTPUT_ROOT="$new_path"
17724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17725$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17726  fi
17727
17728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17729
17730  path="$OUTPUT_ROOT"
17731  has_colon=`$ECHO $path | $GREP ^.:`
17732  new_path="$path"
17733  if test "x$has_colon" = x; then
17734    # Not in mixed or Windows style, start by that.
17735    new_path=`cmd //c echo $path`
17736  fi
17737
17738
17739  input_path="$new_path"
17740  # Check if we need to convert this using DOS-style short mode. If the path
17741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17742  # take no chances and rewrite it.
17743  # Note: m4 eats our [], so we need to use [ and ] instead.
17744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17745  if test "x$has_forbidden_chars" != x; then
17746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17748  fi
17749
17750
17751  windows_path="$new_path"
17752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17753    unix_path=`$CYGPATH -u "$windows_path"`
17754    new_path="$unix_path"
17755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17757    new_path="$unix_path"
17758  fi
17759
17760  if test "x$path" != "x$new_path"; then
17761    OUTPUT_ROOT="$new_path"
17762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17763$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17764  fi
17765
17766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17768
17769    else
17770      # We're on a unix platform. Hooray! :)
17771      path="$OUTPUT_ROOT"
17772      has_space=`$ECHO "$path" | $GREP " "`
17773      if test "x$has_space" != x; then
17774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17775$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17777      fi
17778
17779      # Use eval to expand a potential ~
17780      eval path="$path"
17781      if test ! -f "$path" && test ! -d "$path"; then
17782        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17783      fi
17784
17785      if test -d "$path"; then
17786        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17787      else
17788        dir="`$DIRNAME "$path"`"
17789        base="`$BASENAME "$path"`"
17790        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17791      fi
17792    fi
17793  fi
17794
17795
17796  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17797  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17798
17799  SPEC="$OUTPUT_ROOT/spec.gmk"
17800
17801
17802
17803
17804
17805  # The spec.gmk file contains all variables for the make system.
17806  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17807
17808  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17809  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17810
17811  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17812  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17813
17814  # The compare.sh is used to compare the build output to other builds.
17815  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17816
17817  # The generated Makefile knows where the spec.gmk is and where the source is.
17818  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17819  # which will look for generated configurations
17820  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17821
17822
17823
17824# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17825
17826  for ac_prog in apt-get yum brew port pkgutil pkgadd
17827do
17828  # Extract the first word of "$ac_prog", so it can be a program name with args.
17829set dummy $ac_prog; ac_word=$2
17830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17831$as_echo_n "checking for $ac_word... " >&6; }
17832if ${ac_cv_prog_PKGHANDLER+:} false; then :
17833  $as_echo_n "(cached) " >&6
17834else
17835  if test -n "$PKGHANDLER"; then
17836  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17837else
17838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17839for as_dir in $PATH
17840do
17841  IFS=$as_save_IFS
17842  test -z "$as_dir" && as_dir=.
17843    for ac_exec_ext in '' $ac_executable_extensions; do
17844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17845    ac_cv_prog_PKGHANDLER="$ac_prog"
17846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17847    break 2
17848  fi
17849done
17850  done
17851IFS=$as_save_IFS
17852
17853fi
17854fi
17855PKGHANDLER=$ac_cv_prog_PKGHANDLER
17856if test -n "$PKGHANDLER"; then
17857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17858$as_echo "$PKGHANDLER" >&6; }
17859else
17860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17861$as_echo "no" >&6; }
17862fi
17863
17864
17865  test -n "$PKGHANDLER" && break
17866done
17867
17868
17869
17870# Setup tools that requires more complex handling, or that is not needed by the configure script.
17871
17872
17873
17874  # Publish this variable in the help.
17875
17876
17877  if [ -z "${MAKE+x}" ]; then
17878    # The variable is not set by user, try to locate tool using the code snippet
17879
17880    # Try our hardest to locate a correct version of GNU make
17881    for ac_prog in gmake
17882do
17883  # Extract the first word of "$ac_prog", so it can be a program name with args.
17884set dummy $ac_prog; ac_word=$2
17885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17886$as_echo_n "checking for $ac_word... " >&6; }
17887if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17888  $as_echo_n "(cached) " >&6
17889else
17890  case $CHECK_GMAKE in
17891  [\\/]* | ?:[\\/]*)
17892  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17893  ;;
17894  *)
17895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17896for as_dir in $PATH
17897do
17898  IFS=$as_save_IFS
17899  test -z "$as_dir" && as_dir=.
17900    for ac_exec_ext in '' $ac_executable_extensions; do
17901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17902    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17904    break 2
17905  fi
17906done
17907  done
17908IFS=$as_save_IFS
17909
17910  ;;
17911esac
17912fi
17913CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17914if test -n "$CHECK_GMAKE"; then
17915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17916$as_echo "$CHECK_GMAKE" >&6; }
17917else
17918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17919$as_echo "no" >&6; }
17920fi
17921
17922
17923  test -n "$CHECK_GMAKE" && break
17924done
17925
17926
17927  MAKE_CANDIDATE=""$CHECK_GMAKE""
17928  DESCRIPTION="gmake in PATH"
17929
17930  # On Cygwin, we require a newer version of make than on other platforms
17931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932    MAKE_VERSION_EXPR="-e 4\."
17933    MAKE_REQUIRED_VERSION="4.0"
17934   else
17935    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17936    MAKE_REQUIRED_VERSION="3.81"
17937  fi
17938
17939  if test "x$MAKE_CANDIDATE" != x; then
17940    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17941$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17942    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17943    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17944    if test "x$IS_GNU_MAKE" = x; then
17945      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17946$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17947    else
17948      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17949      if test "x$IS_MODERN_MAKE" = x; then
17950        { $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
17951$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;}
17952      else
17953        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17954          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955            MAKE_EXPECTED_ENV='cygwin'
17956          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17957            MAKE_EXPECTED_ENV='msys'
17958          else
17959            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17960          fi
17961          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17962          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17963        else
17964          # Not relevant for non-Windows
17965          IS_MAKE_CORRECT_ENV=true
17966        fi
17967        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17968          { $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
17969$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;}
17970        else
17971          FOUND_MAKE=$MAKE_CANDIDATE
17972
17973  # Only process if variable expands to non-empty
17974
17975  if test "x$FOUND_MAKE" != x; then
17976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17977
17978  # First separate the path from the arguments. This will split at the first
17979  # space.
17980  complete="$FOUND_MAKE"
17981  path="${complete%% *}"
17982  tmp="$complete EOL"
17983  arguments="${tmp#* }"
17984
17985  # Input might be given as Windows format, start by converting to
17986  # unix format.
17987  new_path=`$CYGPATH -u "$path"`
17988
17989  # Now try to locate executable using which
17990  new_path=`$WHICH "$new_path" 2> /dev/null`
17991  # bat and cmd files are not always considered executable in cygwin causing which
17992  # to not find them
17993  if test "x$new_path" = x \
17994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17996    new_path=`$CYGPATH -u "$path"`
17997  fi
17998  if test "x$new_path" = x; then
17999    # Oops. Which didn't find the executable.
18000    # The splitting of arguments from the executable at a space might have been incorrect,
18001    # since paths with space are more likely in Windows. Give it another try with the whole
18002    # argument.
18003    path="$complete"
18004    arguments="EOL"
18005    new_path=`$CYGPATH -u "$path"`
18006    new_path=`$WHICH "$new_path" 2> /dev/null`
18007    # bat and cmd files are not always considered executable in cygwin causing which
18008    # to not find them
18009    if test "x$new_path" = x \
18010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18012      new_path=`$CYGPATH -u "$path"`
18013    fi
18014    if test "x$new_path" = x; then
18015      # It's still not found. Now this is an unrecoverable error.
18016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18017$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18018      has_space=`$ECHO "$complete" | $GREP " "`
18019      if test "x$has_space" != x; then
18020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18022      fi
18023      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18024    fi
18025  fi
18026
18027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18030  # "foo.exe" is OK but "foo" is an error.
18031  #
18032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18033  # It is also a way to make sure we got the proper file name for the real test later on.
18034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18035  if test "x$test_shortpath" = x; then
18036    # Short path failed, file does not exist as specified.
18037    # Try adding .exe or .cmd
18038    if test -f "${new_path}.exe"; then
18039      input_to_shortpath="${new_path}.exe"
18040    elif test -f "${new_path}.cmd"; then
18041      input_to_shortpath="${new_path}.cmd"
18042    else
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18047      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18048    fi
18049  else
18050    input_to_shortpath="$new_path"
18051  fi
18052
18053  # Call helper function which possibly converts this using DOS-style short mode.
18054  # If so, the updated path is stored in $new_path.
18055  new_path="$input_to_shortpath"
18056
18057  input_path="$input_to_shortpath"
18058  # Check if we need to convert this using DOS-style short mode. If the path
18059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18060  # take no chances and rewrite it.
18061  # Note: m4 eats our [], so we need to use [ and ] instead.
18062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18063  if test "x$has_forbidden_chars" != x; then
18064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18068      # Going to short mode and back again did indeed matter. Since short mode is
18069      # case insensitive, let's make it lowercase to improve readability.
18070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18071      # Now convert it back to Unix-style (cygpath)
18072      input_path=`$CYGPATH -u "$shortmode_path"`
18073      new_path="$input_path"
18074    fi
18075  fi
18076
18077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18078  if test "x$test_cygdrive_prefix" = x; then
18079    # As a simple fix, exclude /usr/bin since it's not a real path.
18080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18082      # a path prefixed by /cygdrive for fixpath to work.
18083      new_path="$CYGWIN_ROOT_PATH$input_path"
18084    fi
18085  fi
18086
18087  # remove trailing .exe if any
18088  new_path="${new_path/%.exe/}"
18089
18090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18091
18092  # First separate the path from the arguments. This will split at the first
18093  # space.
18094  complete="$FOUND_MAKE"
18095  path="${complete%% *}"
18096  tmp="$complete EOL"
18097  arguments="${tmp#* }"
18098
18099  # Input might be given as Windows format, start by converting to
18100  # unix format.
18101  new_path="$path"
18102
18103  windows_path="$new_path"
18104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105    unix_path=`$CYGPATH -u "$windows_path"`
18106    new_path="$unix_path"
18107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109    new_path="$unix_path"
18110  fi
18111
18112
18113  # Now try to locate executable using which
18114  new_path=`$WHICH "$new_path" 2> /dev/null`
18115
18116  if test "x$new_path" = x; then
18117    # Oops. Which didn't find the executable.
18118    # The splitting of arguments from the executable at a space might have been incorrect,
18119    # since paths with space are more likely in Windows. Give it another try with the whole
18120    # argument.
18121    path="$complete"
18122    arguments="EOL"
18123    new_path="$path"
18124
18125  windows_path="$new_path"
18126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18127    unix_path=`$CYGPATH -u "$windows_path"`
18128    new_path="$unix_path"
18129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18131    new_path="$unix_path"
18132  fi
18133
18134
18135    new_path=`$WHICH "$new_path" 2> /dev/null`
18136    # bat and cmd files are not always considered executable in MSYS causing which
18137    # to not find them
18138    if test "x$new_path" = x \
18139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18141      new_path="$path"
18142
18143  windows_path="$new_path"
18144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18145    unix_path=`$CYGPATH -u "$windows_path"`
18146    new_path="$unix_path"
18147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18149    new_path="$unix_path"
18150  fi
18151
18152    fi
18153
18154    if test "x$new_path" = x; then
18155      # It's still not found. Now this is an unrecoverable error.
18156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18158      has_space=`$ECHO "$complete" | $GREP " "`
18159      if test "x$has_space" != x; then
18160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18162      fi
18163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18164    fi
18165  fi
18166
18167  # Now new_path has a complete unix path to the binary
18168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18169    # Keep paths in /bin as-is, but remove trailing .exe if any
18170    new_path="${new_path/%.exe/}"
18171    # Do not save /bin paths to all_fixpath_prefixes!
18172  else
18173    # Not in mixed or Windows style, start by that.
18174    new_path=`cmd //c echo $new_path`
18175
18176  input_path="$new_path"
18177  # Check if we need to convert this using DOS-style short mode. If the path
18178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18179  # take no chances and rewrite it.
18180  # Note: m4 eats our [], so we need to use [ and ] instead.
18181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18182  if test "x$has_forbidden_chars" != x; then
18183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18185  fi
18186
18187    # Output is in $new_path
18188
18189  windows_path="$new_path"
18190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191    unix_path=`$CYGPATH -u "$windows_path"`
18192    new_path="$unix_path"
18193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195    new_path="$unix_path"
18196  fi
18197
18198    # remove trailing .exe if any
18199    new_path="${new_path/%.exe/}"
18200
18201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18203  fi
18204
18205    else
18206      # We're on a unix platform. Hooray! :)
18207      # First separate the path from the arguments. This will split at the first
18208      # space.
18209      complete="$FOUND_MAKE"
18210      path="${complete%% *}"
18211      tmp="$complete EOL"
18212      arguments="${tmp#* }"
18213
18214      # Cannot rely on the command "which" here since it doesn't always work.
18215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18216      if test -z "$is_absolute_path"; then
18217        # Path to executable is not absolute. Find it.
18218        IFS_save="$IFS"
18219        IFS=:
18220        for p in $PATH; do
18221          if test -f "$p/$path" && test -x "$p/$path"; then
18222            new_path="$p/$path"
18223            break
18224          fi
18225        done
18226        IFS="$IFS_save"
18227      else
18228        # This is an absolute path, we can use it without further modifications.
18229        new_path="$path"
18230      fi
18231
18232      if test "x$new_path" = x; then
18233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18235        has_space=`$ECHO "$complete" | $GREP " "`
18236        if test "x$has_space" != x; then
18237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18239        fi
18240        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18241      fi
18242    fi
18243
18244    # Now join together the path and the arguments once again
18245    if test "x$arguments" != xEOL; then
18246      new_complete="$new_path ${arguments% *}"
18247    else
18248      new_complete="$new_path"
18249    fi
18250
18251    if test "x$complete" != "x$new_complete"; then
18252      FOUND_MAKE="$new_complete"
18253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18254$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18255    fi
18256  fi
18257
18258        fi
18259      fi
18260    fi
18261  fi
18262
18263
18264    if test "x$FOUND_MAKE" = x; then
18265      for ac_prog in make
18266do
18267  # Extract the first word of "$ac_prog", so it can be a program name with args.
18268set dummy $ac_prog; ac_word=$2
18269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18270$as_echo_n "checking for $ac_word... " >&6; }
18271if ${ac_cv_path_CHECK_MAKE+:} false; then :
18272  $as_echo_n "(cached) " >&6
18273else
18274  case $CHECK_MAKE in
18275  [\\/]* | ?:[\\/]*)
18276  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18277  ;;
18278  *)
18279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18280for as_dir in $PATH
18281do
18282  IFS=$as_save_IFS
18283  test -z "$as_dir" && as_dir=.
18284    for ac_exec_ext in '' $ac_executable_extensions; do
18285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18286    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18288    break 2
18289  fi
18290done
18291  done
18292IFS=$as_save_IFS
18293
18294  ;;
18295esac
18296fi
18297CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18298if test -n "$CHECK_MAKE"; then
18299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18300$as_echo "$CHECK_MAKE" >&6; }
18301else
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18303$as_echo "no" >&6; }
18304fi
18305
18306
18307  test -n "$CHECK_MAKE" && break
18308done
18309
18310
18311  MAKE_CANDIDATE=""$CHECK_MAKE""
18312  DESCRIPTION="make in PATH"
18313
18314  # On Cygwin, we require a newer version of make than on other platforms
18315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18316    MAKE_VERSION_EXPR="-e 4\."
18317    MAKE_REQUIRED_VERSION="4.0"
18318   else
18319    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18320    MAKE_REQUIRED_VERSION="3.81"
18321  fi
18322
18323  if test "x$MAKE_CANDIDATE" != x; then
18324    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18325$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18326    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18327    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18328    if test "x$IS_GNU_MAKE" = x; then
18329      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18330$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18331    else
18332      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18333      if test "x$IS_MODERN_MAKE" = x; then
18334        { $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
18335$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;}
18336      else
18337        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18338          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18339            MAKE_EXPECTED_ENV='cygwin'
18340          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18341            MAKE_EXPECTED_ENV='msys'
18342          else
18343            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18344          fi
18345          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18346          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18347        else
18348          # Not relevant for non-Windows
18349          IS_MAKE_CORRECT_ENV=true
18350        fi
18351        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18352          { $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
18353$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;}
18354        else
18355          FOUND_MAKE=$MAKE_CANDIDATE
18356
18357  # Only process if variable expands to non-empty
18358
18359  if test "x$FOUND_MAKE" != x; then
18360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18361
18362  # First separate the path from the arguments. This will split at the first
18363  # space.
18364  complete="$FOUND_MAKE"
18365  path="${complete%% *}"
18366  tmp="$complete EOL"
18367  arguments="${tmp#* }"
18368
18369  # Input might be given as Windows format, start by converting to
18370  # unix format.
18371  new_path=`$CYGPATH -u "$path"`
18372
18373  # Now try to locate executable using which
18374  new_path=`$WHICH "$new_path" 2> /dev/null`
18375  # bat and cmd files are not always considered executable in cygwin causing which
18376  # to not find them
18377  if test "x$new_path" = x \
18378      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18379      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18380    new_path=`$CYGPATH -u "$path"`
18381  fi
18382  if test "x$new_path" = x; then
18383    # Oops. Which didn't find the executable.
18384    # The splitting of arguments from the executable at a space might have been incorrect,
18385    # since paths with space are more likely in Windows. Give it another try with the whole
18386    # argument.
18387    path="$complete"
18388    arguments="EOL"
18389    new_path=`$CYGPATH -u "$path"`
18390    new_path=`$WHICH "$new_path" 2> /dev/null`
18391    # bat and cmd files are not always considered executable in cygwin causing which
18392    # to not find them
18393    if test "x$new_path" = x \
18394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18396      new_path=`$CYGPATH -u "$path"`
18397    fi
18398    if test "x$new_path" = x; then
18399      # It's still not found. Now this is an unrecoverable error.
18400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18402      has_space=`$ECHO "$complete" | $GREP " "`
18403      if test "x$has_space" != x; then
18404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18406      fi
18407      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18408    fi
18409  fi
18410
18411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18414  # "foo.exe" is OK but "foo" is an error.
18415  #
18416  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18417  # It is also a way to make sure we got the proper file name for the real test later on.
18418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18419  if test "x$test_shortpath" = x; then
18420    # Short path failed, file does not exist as specified.
18421    # Try adding .exe or .cmd
18422    if test -f "${new_path}.exe"; then
18423      input_to_shortpath="${new_path}.exe"
18424    elif test -f "${new_path}.cmd"; then
18425      input_to_shortpath="${new_path}.cmd"
18426    else
18427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18428$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18429      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18430$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18431      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18432    fi
18433  else
18434    input_to_shortpath="$new_path"
18435  fi
18436
18437  # Call helper function which possibly converts this using DOS-style short mode.
18438  # If so, the updated path is stored in $new_path.
18439  new_path="$input_to_shortpath"
18440
18441  input_path="$input_to_shortpath"
18442  # Check if we need to convert this using DOS-style short mode. If the path
18443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18444  # take no chances and rewrite it.
18445  # Note: m4 eats our [], so we need to use [ and ] instead.
18446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18447  if test "x$has_forbidden_chars" != x; then
18448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18452      # Going to short mode and back again did indeed matter. Since short mode is
18453      # case insensitive, let's make it lowercase to improve readability.
18454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18455      # Now convert it back to Unix-style (cygpath)
18456      input_path=`$CYGPATH -u "$shortmode_path"`
18457      new_path="$input_path"
18458    fi
18459  fi
18460
18461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18462  if test "x$test_cygdrive_prefix" = x; then
18463    # As a simple fix, exclude /usr/bin since it's not a real path.
18464    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18466      # a path prefixed by /cygdrive for fixpath to work.
18467      new_path="$CYGWIN_ROOT_PATH$input_path"
18468    fi
18469  fi
18470
18471  # remove trailing .exe if any
18472  new_path="${new_path/%.exe/}"
18473
18474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18475
18476  # First separate the path from the arguments. This will split at the first
18477  # space.
18478  complete="$FOUND_MAKE"
18479  path="${complete%% *}"
18480  tmp="$complete EOL"
18481  arguments="${tmp#* }"
18482
18483  # Input might be given as Windows format, start by converting to
18484  # unix format.
18485  new_path="$path"
18486
18487  windows_path="$new_path"
18488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18489    unix_path=`$CYGPATH -u "$windows_path"`
18490    new_path="$unix_path"
18491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18493    new_path="$unix_path"
18494  fi
18495
18496
18497  # Now try to locate executable using which
18498  new_path=`$WHICH "$new_path" 2> /dev/null`
18499
18500  if test "x$new_path" = x; then
18501    # Oops. Which didn't find the executable.
18502    # The splitting of arguments from the executable at a space might have been incorrect,
18503    # since paths with space are more likely in Windows. Give it another try with the whole
18504    # argument.
18505    path="$complete"
18506    arguments="EOL"
18507    new_path="$path"
18508
18509  windows_path="$new_path"
18510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18511    unix_path=`$CYGPATH -u "$windows_path"`
18512    new_path="$unix_path"
18513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18515    new_path="$unix_path"
18516  fi
18517
18518
18519    new_path=`$WHICH "$new_path" 2> /dev/null`
18520    # bat and cmd files are not always considered executable in MSYS causing which
18521    # to not find them
18522    if test "x$new_path" = x \
18523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18525      new_path="$path"
18526
18527  windows_path="$new_path"
18528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18529    unix_path=`$CYGPATH -u "$windows_path"`
18530    new_path="$unix_path"
18531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18533    new_path="$unix_path"
18534  fi
18535
18536    fi
18537
18538    if test "x$new_path" = x; then
18539      # It's still not found. Now this is an unrecoverable error.
18540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18542      has_space=`$ECHO "$complete" | $GREP " "`
18543      if test "x$has_space" != x; then
18544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18546      fi
18547      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18548    fi
18549  fi
18550
18551  # Now new_path has a complete unix path to the binary
18552  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18553    # Keep paths in /bin as-is, but remove trailing .exe if any
18554    new_path="${new_path/%.exe/}"
18555    # Do not save /bin paths to all_fixpath_prefixes!
18556  else
18557    # Not in mixed or Windows style, start by that.
18558    new_path=`cmd //c echo $new_path`
18559
18560  input_path="$new_path"
18561  # Check if we need to convert this using DOS-style short mode. If the path
18562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18563  # take no chances and rewrite it.
18564  # Note: m4 eats our [], so we need to use [ and ] instead.
18565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18566  if test "x$has_forbidden_chars" != x; then
18567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18569  fi
18570
18571    # Output is in $new_path
18572
18573  windows_path="$new_path"
18574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18575    unix_path=`$CYGPATH -u "$windows_path"`
18576    new_path="$unix_path"
18577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18579    new_path="$unix_path"
18580  fi
18581
18582    # remove trailing .exe if any
18583    new_path="${new_path/%.exe/}"
18584
18585    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18586    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18587  fi
18588
18589    else
18590      # We're on a unix platform. Hooray! :)
18591      # First separate the path from the arguments. This will split at the first
18592      # space.
18593      complete="$FOUND_MAKE"
18594      path="${complete%% *}"
18595      tmp="$complete EOL"
18596      arguments="${tmp#* }"
18597
18598      # Cannot rely on the command "which" here since it doesn't always work.
18599      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18600      if test -z "$is_absolute_path"; then
18601        # Path to executable is not absolute. Find it.
18602        IFS_save="$IFS"
18603        IFS=:
18604        for p in $PATH; do
18605          if test -f "$p/$path" && test -x "$p/$path"; then
18606            new_path="$p/$path"
18607            break
18608          fi
18609        done
18610        IFS="$IFS_save"
18611      else
18612        # This is an absolute path, we can use it without further modifications.
18613        new_path="$path"
18614      fi
18615
18616      if test "x$new_path" = x; then
18617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18619        has_space=`$ECHO "$complete" | $GREP " "`
18620        if test "x$has_space" != x; then
18621          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18623        fi
18624        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18625      fi
18626    fi
18627
18628    # Now join together the path and the arguments once again
18629    if test "x$arguments" != xEOL; then
18630      new_complete="$new_path ${arguments% *}"
18631    else
18632      new_complete="$new_path"
18633    fi
18634
18635    if test "x$complete" != "x$new_complete"; then
18636      FOUND_MAKE="$new_complete"
18637      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18638$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18639    fi
18640  fi
18641
18642        fi
18643      fi
18644    fi
18645  fi
18646
18647    fi
18648
18649    if test "x$FOUND_MAKE" = x; then
18650      if test "x$TOOLCHAIN_PATH" != x; then
18651        # We have a toolchain path, check that as well before giving up.
18652        OLD_PATH=$PATH
18653        PATH=$TOOLCHAIN_PATH:$PATH
18654        for ac_prog in gmake
18655do
18656  # Extract the first word of "$ac_prog", so it can be a program name with args.
18657set dummy $ac_prog; ac_word=$2
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18659$as_echo_n "checking for $ac_word... " >&6; }
18660if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18661  $as_echo_n "(cached) " >&6
18662else
18663  case $CHECK_TOOLSDIR_GMAKE in
18664  [\\/]* | ?:[\\/]*)
18665  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18666  ;;
18667  *)
18668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18669for as_dir in $PATH
18670do
18671  IFS=$as_save_IFS
18672  test -z "$as_dir" && as_dir=.
18673    for ac_exec_ext in '' $ac_executable_extensions; do
18674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18675    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18677    break 2
18678  fi
18679done
18680  done
18681IFS=$as_save_IFS
18682
18683  ;;
18684esac
18685fi
18686CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18687if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18689$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18690else
18691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18692$as_echo "no" >&6; }
18693fi
18694
18695
18696  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18697done
18698
18699
18700  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18701  DESCRIPTION="gmake in tools-dir"
18702
18703  # On Cygwin, we require a newer version of make than on other platforms
18704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18705    MAKE_VERSION_EXPR="-e 4\."
18706    MAKE_REQUIRED_VERSION="4.0"
18707   else
18708    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18709    MAKE_REQUIRED_VERSION="3.81"
18710  fi
18711
18712  if test "x$MAKE_CANDIDATE" != x; then
18713    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18714$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18715    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18716    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18717    if test "x$IS_GNU_MAKE" = x; then
18718      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18719$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18720    else
18721      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18722      if test "x$IS_MODERN_MAKE" = x; then
18723        { $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
18724$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;}
18725      else
18726        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18727          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18728            MAKE_EXPECTED_ENV='cygwin'
18729          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18730            MAKE_EXPECTED_ENV='msys'
18731          else
18732            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18733          fi
18734          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18735          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18736        else
18737          # Not relevant for non-Windows
18738          IS_MAKE_CORRECT_ENV=true
18739        fi
18740        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18741          { $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
18742$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;}
18743        else
18744          FOUND_MAKE=$MAKE_CANDIDATE
18745
18746  # Only process if variable expands to non-empty
18747
18748  if test "x$FOUND_MAKE" != x; then
18749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18750
18751  # First separate the path from the arguments. This will split at the first
18752  # space.
18753  complete="$FOUND_MAKE"
18754  path="${complete%% *}"
18755  tmp="$complete EOL"
18756  arguments="${tmp#* }"
18757
18758  # Input might be given as Windows format, start by converting to
18759  # unix format.
18760  new_path=`$CYGPATH -u "$path"`
18761
18762  # Now try to locate executable using which
18763  new_path=`$WHICH "$new_path" 2> /dev/null`
18764  # bat and cmd files are not always considered executable in cygwin causing which
18765  # to not find them
18766  if test "x$new_path" = x \
18767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18769    new_path=`$CYGPATH -u "$path"`
18770  fi
18771  if test "x$new_path" = x; then
18772    # Oops. Which didn't find the executable.
18773    # The splitting of arguments from the executable at a space might have been incorrect,
18774    # since paths with space are more likely in Windows. Give it another try with the whole
18775    # argument.
18776    path="$complete"
18777    arguments="EOL"
18778    new_path=`$CYGPATH -u "$path"`
18779    new_path=`$WHICH "$new_path" 2> /dev/null`
18780    # bat and cmd files are not always considered executable in cygwin causing which
18781    # to not find them
18782    if test "x$new_path" = x \
18783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18785      new_path=`$CYGPATH -u "$path"`
18786    fi
18787    if test "x$new_path" = x; then
18788      # It's still not found. Now this is an unrecoverable error.
18789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18791      has_space=`$ECHO "$complete" | $GREP " "`
18792      if test "x$has_space" != x; then
18793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18795      fi
18796      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18797    fi
18798  fi
18799
18800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18803  # "foo.exe" is OK but "foo" is an error.
18804  #
18805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18806  # It is also a way to make sure we got the proper file name for the real test later on.
18807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18808  if test "x$test_shortpath" = x; then
18809    # Short path failed, file does not exist as specified.
18810    # Try adding .exe or .cmd
18811    if test -f "${new_path}.exe"; then
18812      input_to_shortpath="${new_path}.exe"
18813    elif test -f "${new_path}.cmd"; then
18814      input_to_shortpath="${new_path}.cmd"
18815    else
18816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18817$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18821    fi
18822  else
18823    input_to_shortpath="$new_path"
18824  fi
18825
18826  # Call helper function which possibly converts this using DOS-style short mode.
18827  # If so, the updated path is stored in $new_path.
18828  new_path="$input_to_shortpath"
18829
18830  input_path="$input_to_shortpath"
18831  # Check if we need to convert this using DOS-style short mode. If the path
18832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18833  # take no chances and rewrite it.
18834  # Note: m4 eats our [], so we need to use [ and ] instead.
18835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18836  if test "x$has_forbidden_chars" != x; then
18837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18841      # Going to short mode and back again did indeed matter. Since short mode is
18842      # case insensitive, let's make it lowercase to improve readability.
18843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18844      # Now convert it back to Unix-style (cygpath)
18845      input_path=`$CYGPATH -u "$shortmode_path"`
18846      new_path="$input_path"
18847    fi
18848  fi
18849
18850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18851  if test "x$test_cygdrive_prefix" = x; then
18852    # As a simple fix, exclude /usr/bin since it's not a real path.
18853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18855      # a path prefixed by /cygdrive for fixpath to work.
18856      new_path="$CYGWIN_ROOT_PATH$input_path"
18857    fi
18858  fi
18859
18860  # remove trailing .exe if any
18861  new_path="${new_path/%.exe/}"
18862
18863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18864
18865  # First separate the path from the arguments. This will split at the first
18866  # space.
18867  complete="$FOUND_MAKE"
18868  path="${complete%% *}"
18869  tmp="$complete EOL"
18870  arguments="${tmp#* }"
18871
18872  # Input might be given as Windows format, start by converting to
18873  # unix format.
18874  new_path="$path"
18875
18876  windows_path="$new_path"
18877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18878    unix_path=`$CYGPATH -u "$windows_path"`
18879    new_path="$unix_path"
18880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18882    new_path="$unix_path"
18883  fi
18884
18885
18886  # Now try to locate executable using which
18887  new_path=`$WHICH "$new_path" 2> /dev/null`
18888
18889  if test "x$new_path" = x; then
18890    # Oops. Which didn't find the executable.
18891    # The splitting of arguments from the executable at a space might have been incorrect,
18892    # since paths with space are more likely in Windows. Give it another try with the whole
18893    # argument.
18894    path="$complete"
18895    arguments="EOL"
18896    new_path="$path"
18897
18898  windows_path="$new_path"
18899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18900    unix_path=`$CYGPATH -u "$windows_path"`
18901    new_path="$unix_path"
18902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18904    new_path="$unix_path"
18905  fi
18906
18907
18908    new_path=`$WHICH "$new_path" 2> /dev/null`
18909    # bat and cmd files are not always considered executable in MSYS causing which
18910    # to not find them
18911    if test "x$new_path" = x \
18912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18914      new_path="$path"
18915
18916  windows_path="$new_path"
18917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18918    unix_path=`$CYGPATH -u "$windows_path"`
18919    new_path="$unix_path"
18920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18922    new_path="$unix_path"
18923  fi
18924
18925    fi
18926
18927    if test "x$new_path" = x; then
18928      # It's still not found. Now this is an unrecoverable error.
18929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18930$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18931      has_space=`$ECHO "$complete" | $GREP " "`
18932      if test "x$has_space" != x; then
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18935      fi
18936      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18937    fi
18938  fi
18939
18940  # Now new_path has a complete unix path to the binary
18941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18942    # Keep paths in /bin as-is, but remove trailing .exe if any
18943    new_path="${new_path/%.exe/}"
18944    # Do not save /bin paths to all_fixpath_prefixes!
18945  else
18946    # Not in mixed or Windows style, start by that.
18947    new_path=`cmd //c echo $new_path`
18948
18949  input_path="$new_path"
18950  # Check if we need to convert this using DOS-style short mode. If the path
18951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18952  # take no chances and rewrite it.
18953  # Note: m4 eats our [], so we need to use [ and ] instead.
18954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18955  if test "x$has_forbidden_chars" != x; then
18956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18958  fi
18959
18960    # Output is in $new_path
18961
18962  windows_path="$new_path"
18963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964    unix_path=`$CYGPATH -u "$windows_path"`
18965    new_path="$unix_path"
18966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18968    new_path="$unix_path"
18969  fi
18970
18971    # remove trailing .exe if any
18972    new_path="${new_path/%.exe/}"
18973
18974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18976  fi
18977
18978    else
18979      # We're on a unix platform. Hooray! :)
18980      # First separate the path from the arguments. This will split at the first
18981      # space.
18982      complete="$FOUND_MAKE"
18983      path="${complete%% *}"
18984      tmp="$complete EOL"
18985      arguments="${tmp#* }"
18986
18987      # Cannot rely on the command "which" here since it doesn't always work.
18988      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18989      if test -z "$is_absolute_path"; then
18990        # Path to executable is not absolute. Find it.
18991        IFS_save="$IFS"
18992        IFS=:
18993        for p in $PATH; do
18994          if test -f "$p/$path" && test -x "$p/$path"; then
18995            new_path="$p/$path"
18996            break
18997          fi
18998        done
18999        IFS="$IFS_save"
19000      else
19001        # This is an absolute path, we can use it without further modifications.
19002        new_path="$path"
19003      fi
19004
19005      if test "x$new_path" = x; then
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19007$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19008        has_space=`$ECHO "$complete" | $GREP " "`
19009        if test "x$has_space" != x; then
19010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19012        fi
19013        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19014      fi
19015    fi
19016
19017    # Now join together the path and the arguments once again
19018    if test "x$arguments" != xEOL; then
19019      new_complete="$new_path ${arguments% *}"
19020    else
19021      new_complete="$new_path"
19022    fi
19023
19024    if test "x$complete" != "x$new_complete"; then
19025      FOUND_MAKE="$new_complete"
19026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19027$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19028    fi
19029  fi
19030
19031        fi
19032      fi
19033    fi
19034  fi
19035
19036        if test "x$FOUND_MAKE" = x; then
19037          for ac_prog in make
19038do
19039  # Extract the first word of "$ac_prog", so it can be a program name with args.
19040set dummy $ac_prog; ac_word=$2
19041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19042$as_echo_n "checking for $ac_word... " >&6; }
19043if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19044  $as_echo_n "(cached) " >&6
19045else
19046  case $CHECK_TOOLSDIR_MAKE in
19047  [\\/]* | ?:[\\/]*)
19048  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19049  ;;
19050  *)
19051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19052for as_dir in $PATH
19053do
19054  IFS=$as_save_IFS
19055  test -z "$as_dir" && as_dir=.
19056    for ac_exec_ext in '' $ac_executable_extensions; do
19057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19058    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19060    break 2
19061  fi
19062done
19063  done
19064IFS=$as_save_IFS
19065
19066  ;;
19067esac
19068fi
19069CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19070if test -n "$CHECK_TOOLSDIR_MAKE"; then
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19072$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19073else
19074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19075$as_echo "no" >&6; }
19076fi
19077
19078
19079  test -n "$CHECK_TOOLSDIR_MAKE" && break
19080done
19081
19082
19083  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19084  DESCRIPTION="make in tools-dir"
19085
19086  # On Cygwin, we require a newer version of make than on other platforms
19087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19088    MAKE_VERSION_EXPR="-e 4\."
19089    MAKE_REQUIRED_VERSION="4.0"
19090   else
19091    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19092    MAKE_REQUIRED_VERSION="3.81"
19093  fi
19094
19095  if test "x$MAKE_CANDIDATE" != x; then
19096    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19097$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19098    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19099    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19100    if test "x$IS_GNU_MAKE" = x; then
19101      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19102$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19103    else
19104      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19105      if test "x$IS_MODERN_MAKE" = x; then
19106        { $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
19107$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;}
19108      else
19109        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19110          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19111            MAKE_EXPECTED_ENV='cygwin'
19112          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19113            MAKE_EXPECTED_ENV='msys'
19114          else
19115            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19116          fi
19117          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19118          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19119        else
19120          # Not relevant for non-Windows
19121          IS_MAKE_CORRECT_ENV=true
19122        fi
19123        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19124          { $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
19125$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;}
19126        else
19127          FOUND_MAKE=$MAKE_CANDIDATE
19128
19129  # Only process if variable expands to non-empty
19130
19131  if test "x$FOUND_MAKE" != x; then
19132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133
19134  # First separate the path from the arguments. This will split at the first
19135  # space.
19136  complete="$FOUND_MAKE"
19137  path="${complete%% *}"
19138  tmp="$complete EOL"
19139  arguments="${tmp#* }"
19140
19141  # Input might be given as Windows format, start by converting to
19142  # unix format.
19143  new_path=`$CYGPATH -u "$path"`
19144
19145  # Now try to locate executable using which
19146  new_path=`$WHICH "$new_path" 2> /dev/null`
19147  # bat and cmd files are not always considered executable in cygwin causing which
19148  # to not find them
19149  if test "x$new_path" = x \
19150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19152    new_path=`$CYGPATH -u "$path"`
19153  fi
19154  if test "x$new_path" = x; then
19155    # Oops. Which didn't find the executable.
19156    # The splitting of arguments from the executable at a space might have been incorrect,
19157    # since paths with space are more likely in Windows. Give it another try with the whole
19158    # argument.
19159    path="$complete"
19160    arguments="EOL"
19161    new_path=`$CYGPATH -u "$path"`
19162    new_path=`$WHICH "$new_path" 2> /dev/null`
19163    # bat and cmd files are not always considered executable in cygwin causing which
19164    # to not find them
19165    if test "x$new_path" = x \
19166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19168      new_path=`$CYGPATH -u "$path"`
19169    fi
19170    if test "x$new_path" = x; then
19171      # It's still not found. Now this is an unrecoverable error.
19172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19173$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19174      has_space=`$ECHO "$complete" | $GREP " "`
19175      if test "x$has_space" != x; then
19176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19178      fi
19179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19180    fi
19181  fi
19182
19183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19186  # "foo.exe" is OK but "foo" is an error.
19187  #
19188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19189  # It is also a way to make sure we got the proper file name for the real test later on.
19190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19191  if test "x$test_shortpath" = x; then
19192    # Short path failed, file does not exist as specified.
19193    # Try adding .exe or .cmd
19194    if test -f "${new_path}.exe"; then
19195      input_to_shortpath="${new_path}.exe"
19196    elif test -f "${new_path}.cmd"; then
19197      input_to_shortpath="${new_path}.cmd"
19198    else
19199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19204    fi
19205  else
19206    input_to_shortpath="$new_path"
19207  fi
19208
19209  # Call helper function which possibly converts this using DOS-style short mode.
19210  # If so, the updated path is stored in $new_path.
19211  new_path="$input_to_shortpath"
19212
19213  input_path="$input_to_shortpath"
19214  # Check if we need to convert this using DOS-style short mode. If the path
19215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19216  # take no chances and rewrite it.
19217  # Note: m4 eats our [], so we need to use [ and ] instead.
19218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19219  if test "x$has_forbidden_chars" != x; then
19220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19224      # Going to short mode and back again did indeed matter. Since short mode is
19225      # case insensitive, let's make it lowercase to improve readability.
19226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19227      # Now convert it back to Unix-style (cygpath)
19228      input_path=`$CYGPATH -u "$shortmode_path"`
19229      new_path="$input_path"
19230    fi
19231  fi
19232
19233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19234  if test "x$test_cygdrive_prefix" = x; then
19235    # As a simple fix, exclude /usr/bin since it's not a real path.
19236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19238      # a path prefixed by /cygdrive for fixpath to work.
19239      new_path="$CYGWIN_ROOT_PATH$input_path"
19240    fi
19241  fi
19242
19243  # remove trailing .exe if any
19244  new_path="${new_path/%.exe/}"
19245
19246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19247
19248  # First separate the path from the arguments. This will split at the first
19249  # space.
19250  complete="$FOUND_MAKE"
19251  path="${complete%% *}"
19252  tmp="$complete EOL"
19253  arguments="${tmp#* }"
19254
19255  # Input might be given as Windows format, start by converting to
19256  # unix format.
19257  new_path="$path"
19258
19259  windows_path="$new_path"
19260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19261    unix_path=`$CYGPATH -u "$windows_path"`
19262    new_path="$unix_path"
19263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19265    new_path="$unix_path"
19266  fi
19267
19268
19269  # Now try to locate executable using which
19270  new_path=`$WHICH "$new_path" 2> /dev/null`
19271
19272  if test "x$new_path" = x; then
19273    # Oops. Which didn't find the executable.
19274    # The splitting of arguments from the executable at a space might have been incorrect,
19275    # since paths with space are more likely in Windows. Give it another try with the whole
19276    # argument.
19277    path="$complete"
19278    arguments="EOL"
19279    new_path="$path"
19280
19281  windows_path="$new_path"
19282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19283    unix_path=`$CYGPATH -u "$windows_path"`
19284    new_path="$unix_path"
19285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19287    new_path="$unix_path"
19288  fi
19289
19290
19291    new_path=`$WHICH "$new_path" 2> /dev/null`
19292    # bat and cmd files are not always considered executable in MSYS causing which
19293    # to not find them
19294    if test "x$new_path" = x \
19295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19297      new_path="$path"
19298
19299  windows_path="$new_path"
19300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19301    unix_path=`$CYGPATH -u "$windows_path"`
19302    new_path="$unix_path"
19303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19305    new_path="$unix_path"
19306  fi
19307
19308    fi
19309
19310    if test "x$new_path" = x; then
19311      # It's still not found. Now this is an unrecoverable error.
19312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19314      has_space=`$ECHO "$complete" | $GREP " "`
19315      if test "x$has_space" != x; then
19316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19318      fi
19319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19320    fi
19321  fi
19322
19323  # Now new_path has a complete unix path to the binary
19324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19325    # Keep paths in /bin as-is, but remove trailing .exe if any
19326    new_path="${new_path/%.exe/}"
19327    # Do not save /bin paths to all_fixpath_prefixes!
19328  else
19329    # Not in mixed or Windows style, start by that.
19330    new_path=`cmd //c echo $new_path`
19331
19332  input_path="$new_path"
19333  # Check if we need to convert this using DOS-style short mode. If the path
19334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19335  # take no chances and rewrite it.
19336  # Note: m4 eats our [], so we need to use [ and ] instead.
19337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19338  if test "x$has_forbidden_chars" != x; then
19339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19341  fi
19342
19343    # Output is in $new_path
19344
19345  windows_path="$new_path"
19346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19347    unix_path=`$CYGPATH -u "$windows_path"`
19348    new_path="$unix_path"
19349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19351    new_path="$unix_path"
19352  fi
19353
19354    # remove trailing .exe if any
19355    new_path="${new_path/%.exe/}"
19356
19357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19359  fi
19360
19361    else
19362      # We're on a unix platform. Hooray! :)
19363      # First separate the path from the arguments. This will split at the first
19364      # space.
19365      complete="$FOUND_MAKE"
19366      path="${complete%% *}"
19367      tmp="$complete EOL"
19368      arguments="${tmp#* }"
19369
19370      # Cannot rely on the command "which" here since it doesn't always work.
19371      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19372      if test -z "$is_absolute_path"; then
19373        # Path to executable is not absolute. Find it.
19374        IFS_save="$IFS"
19375        IFS=:
19376        for p in $PATH; do
19377          if test -f "$p/$path" && test -x "$p/$path"; then
19378            new_path="$p/$path"
19379            break
19380          fi
19381        done
19382        IFS="$IFS_save"
19383      else
19384        # This is an absolute path, we can use it without further modifications.
19385        new_path="$path"
19386      fi
19387
19388      if test "x$new_path" = x; then
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19390$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19391        has_space=`$ECHO "$complete" | $GREP " "`
19392        if test "x$has_space" != x; then
19393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19395        fi
19396        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19397      fi
19398    fi
19399
19400    # Now join together the path and the arguments once again
19401    if test "x$arguments" != xEOL; then
19402      new_complete="$new_path ${arguments% *}"
19403    else
19404      new_complete="$new_path"
19405    fi
19406
19407    if test "x$complete" != "x$new_complete"; then
19408      FOUND_MAKE="$new_complete"
19409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19410$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19411    fi
19412  fi
19413
19414        fi
19415      fi
19416    fi
19417  fi
19418
19419        fi
19420        PATH=$OLD_PATH
19421      fi
19422    fi
19423
19424    if test "x$FOUND_MAKE" = x; then
19425      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
19426    fi
19427
19428  else
19429    # The variable is set, but is it from the command line or the environment?
19430
19431    # Try to remove the string !MAKE! from our list.
19432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19434      # If it failed, the variable was not from the command line. Ignore it,
19435      # but warn the user (except for BASH, which is always set by the calling BASH).
19436      if test "xMAKE" != xBASH; then
19437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19438$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19439      fi
19440      # Try to locate tool using the code snippet
19441
19442    # Try our hardest to locate a correct version of GNU make
19443    for ac_prog in gmake
19444do
19445  # Extract the first word of "$ac_prog", so it can be a program name with args.
19446set dummy $ac_prog; ac_word=$2
19447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19448$as_echo_n "checking for $ac_word... " >&6; }
19449if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19450  $as_echo_n "(cached) " >&6
19451else
19452  case $CHECK_GMAKE in
19453  [\\/]* | ?:[\\/]*)
19454  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19455  ;;
19456  *)
19457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19458for as_dir in $PATH
19459do
19460  IFS=$as_save_IFS
19461  test -z "$as_dir" && as_dir=.
19462    for ac_exec_ext in '' $ac_executable_extensions; do
19463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19464    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19466    break 2
19467  fi
19468done
19469  done
19470IFS=$as_save_IFS
19471
19472  ;;
19473esac
19474fi
19475CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19476if test -n "$CHECK_GMAKE"; then
19477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19478$as_echo "$CHECK_GMAKE" >&6; }
19479else
19480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19481$as_echo "no" >&6; }
19482fi
19483
19484
19485  test -n "$CHECK_GMAKE" && break
19486done
19487
19488
19489  MAKE_CANDIDATE=""$CHECK_GMAKE""
19490  DESCRIPTION="gmake in PATH"
19491
19492  # On Cygwin, we require a newer version of make than on other platforms
19493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19494    MAKE_VERSION_EXPR="-e 4\."
19495    MAKE_REQUIRED_VERSION="4.0"
19496   else
19497    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19498    MAKE_REQUIRED_VERSION="3.81"
19499  fi
19500
19501  if test "x$MAKE_CANDIDATE" != x; then
19502    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19503$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19504    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19505    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19506    if test "x$IS_GNU_MAKE" = x; then
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19508$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19509    else
19510      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19511      if test "x$IS_MODERN_MAKE" = x; then
19512        { $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
19513$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;}
19514      else
19515        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19516          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19517            MAKE_EXPECTED_ENV='cygwin'
19518          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19519            MAKE_EXPECTED_ENV='msys'
19520          else
19521            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19522          fi
19523          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19524          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19525        else
19526          # Not relevant for non-Windows
19527          IS_MAKE_CORRECT_ENV=true
19528        fi
19529        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19530          { $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
19531$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;}
19532        else
19533          FOUND_MAKE=$MAKE_CANDIDATE
19534
19535  # Only process if variable expands to non-empty
19536
19537  if test "x$FOUND_MAKE" != x; then
19538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19539
19540  # First separate the path from the arguments. This will split at the first
19541  # space.
19542  complete="$FOUND_MAKE"
19543  path="${complete%% *}"
19544  tmp="$complete EOL"
19545  arguments="${tmp#* }"
19546
19547  # Input might be given as Windows format, start by converting to
19548  # unix format.
19549  new_path=`$CYGPATH -u "$path"`
19550
19551  # Now try to locate executable using which
19552  new_path=`$WHICH "$new_path" 2> /dev/null`
19553  # bat and cmd files are not always considered executable in cygwin causing which
19554  # to not find them
19555  if test "x$new_path" = x \
19556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19558    new_path=`$CYGPATH -u "$path"`
19559  fi
19560  if test "x$new_path" = x; then
19561    # Oops. Which didn't find the executable.
19562    # The splitting of arguments from the executable at a space might have been incorrect,
19563    # since paths with space are more likely in Windows. Give it another try with the whole
19564    # argument.
19565    path="$complete"
19566    arguments="EOL"
19567    new_path=`$CYGPATH -u "$path"`
19568    new_path=`$WHICH "$new_path" 2> /dev/null`
19569    # bat and cmd files are not always considered executable in cygwin causing which
19570    # to not find them
19571    if test "x$new_path" = x \
19572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19574      new_path=`$CYGPATH -u "$path"`
19575    fi
19576    if test "x$new_path" = x; then
19577      # It's still not found. Now this is an unrecoverable error.
19578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19580      has_space=`$ECHO "$complete" | $GREP " "`
19581      if test "x$has_space" != x; then
19582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19584      fi
19585      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19586    fi
19587  fi
19588
19589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19592  # "foo.exe" is OK but "foo" is an error.
19593  #
19594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19595  # It is also a way to make sure we got the proper file name for the real test later on.
19596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19597  if test "x$test_shortpath" = x; then
19598    # Short path failed, file does not exist as specified.
19599    # Try adding .exe or .cmd
19600    if test -f "${new_path}.exe"; then
19601      input_to_shortpath="${new_path}.exe"
19602    elif test -f "${new_path}.cmd"; then
19603      input_to_shortpath="${new_path}.cmd"
19604    else
19605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19609      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19610    fi
19611  else
19612    input_to_shortpath="$new_path"
19613  fi
19614
19615  # Call helper function which possibly converts this using DOS-style short mode.
19616  # If so, the updated path is stored in $new_path.
19617  new_path="$input_to_shortpath"
19618
19619  input_path="$input_to_shortpath"
19620  # Check if we need to convert this using DOS-style short mode. If the path
19621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19622  # take no chances and rewrite it.
19623  # Note: m4 eats our [], so we need to use [ and ] instead.
19624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19625  if test "x$has_forbidden_chars" != x; then
19626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19630      # Going to short mode and back again did indeed matter. Since short mode is
19631      # case insensitive, let's make it lowercase to improve readability.
19632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19633      # Now convert it back to Unix-style (cygpath)
19634      input_path=`$CYGPATH -u "$shortmode_path"`
19635      new_path="$input_path"
19636    fi
19637  fi
19638
19639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19640  if test "x$test_cygdrive_prefix" = x; then
19641    # As a simple fix, exclude /usr/bin since it's not a real path.
19642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19644      # a path prefixed by /cygdrive for fixpath to work.
19645      new_path="$CYGWIN_ROOT_PATH$input_path"
19646    fi
19647  fi
19648
19649  # remove trailing .exe if any
19650  new_path="${new_path/%.exe/}"
19651
19652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19653
19654  # First separate the path from the arguments. This will split at the first
19655  # space.
19656  complete="$FOUND_MAKE"
19657  path="${complete%% *}"
19658  tmp="$complete EOL"
19659  arguments="${tmp#* }"
19660
19661  # Input might be given as Windows format, start by converting to
19662  # unix format.
19663  new_path="$path"
19664
19665  windows_path="$new_path"
19666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19667    unix_path=`$CYGPATH -u "$windows_path"`
19668    new_path="$unix_path"
19669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19671    new_path="$unix_path"
19672  fi
19673
19674
19675  # Now try to locate executable using which
19676  new_path=`$WHICH "$new_path" 2> /dev/null`
19677
19678  if test "x$new_path" = x; then
19679    # Oops. Which didn't find the executable.
19680    # The splitting of arguments from the executable at a space might have been incorrect,
19681    # since paths with space are more likely in Windows. Give it another try with the whole
19682    # argument.
19683    path="$complete"
19684    arguments="EOL"
19685    new_path="$path"
19686
19687  windows_path="$new_path"
19688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19689    unix_path=`$CYGPATH -u "$windows_path"`
19690    new_path="$unix_path"
19691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19693    new_path="$unix_path"
19694  fi
19695
19696
19697    new_path=`$WHICH "$new_path" 2> /dev/null`
19698    # bat and cmd files are not always considered executable in MSYS causing which
19699    # to not find them
19700    if test "x$new_path" = x \
19701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19703      new_path="$path"
19704
19705  windows_path="$new_path"
19706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19707    unix_path=`$CYGPATH -u "$windows_path"`
19708    new_path="$unix_path"
19709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19711    new_path="$unix_path"
19712  fi
19713
19714    fi
19715
19716    if test "x$new_path" = x; then
19717      # It's still not found. Now this is an unrecoverable error.
19718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19720      has_space=`$ECHO "$complete" | $GREP " "`
19721      if test "x$has_space" != x; then
19722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19724      fi
19725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19726    fi
19727  fi
19728
19729  # Now new_path has a complete unix path to the binary
19730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19731    # Keep paths in /bin as-is, but remove trailing .exe if any
19732    new_path="${new_path/%.exe/}"
19733    # Do not save /bin paths to all_fixpath_prefixes!
19734  else
19735    # Not in mixed or Windows style, start by that.
19736    new_path=`cmd //c echo $new_path`
19737
19738  input_path="$new_path"
19739  # Check if we need to convert this using DOS-style short mode. If the path
19740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19741  # take no chances and rewrite it.
19742  # Note: m4 eats our [], so we need to use [ and ] instead.
19743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19744  if test "x$has_forbidden_chars" != x; then
19745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19747  fi
19748
19749    # Output is in $new_path
19750
19751  windows_path="$new_path"
19752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19753    unix_path=`$CYGPATH -u "$windows_path"`
19754    new_path="$unix_path"
19755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19757    new_path="$unix_path"
19758  fi
19759
19760    # remove trailing .exe if any
19761    new_path="${new_path/%.exe/}"
19762
19763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19765  fi
19766
19767    else
19768      # We're on a unix platform. Hooray! :)
19769      # First separate the path from the arguments. This will split at the first
19770      # space.
19771      complete="$FOUND_MAKE"
19772      path="${complete%% *}"
19773      tmp="$complete EOL"
19774      arguments="${tmp#* }"
19775
19776      # Cannot rely on the command "which" here since it doesn't always work.
19777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19778      if test -z "$is_absolute_path"; then
19779        # Path to executable is not absolute. Find it.
19780        IFS_save="$IFS"
19781        IFS=:
19782        for p in $PATH; do
19783          if test -f "$p/$path" && test -x "$p/$path"; then
19784            new_path="$p/$path"
19785            break
19786          fi
19787        done
19788        IFS="$IFS_save"
19789      else
19790        # This is an absolute path, we can use it without further modifications.
19791        new_path="$path"
19792      fi
19793
19794      if test "x$new_path" = x; then
19795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19797        has_space=`$ECHO "$complete" | $GREP " "`
19798        if test "x$has_space" != x; then
19799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19801        fi
19802        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19803      fi
19804    fi
19805
19806    # Now join together the path and the arguments once again
19807    if test "x$arguments" != xEOL; then
19808      new_complete="$new_path ${arguments% *}"
19809    else
19810      new_complete="$new_path"
19811    fi
19812
19813    if test "x$complete" != "x$new_complete"; then
19814      FOUND_MAKE="$new_complete"
19815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19816$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19817    fi
19818  fi
19819
19820        fi
19821      fi
19822    fi
19823  fi
19824
19825
19826    if test "x$FOUND_MAKE" = x; then
19827      for ac_prog in make
19828do
19829  # Extract the first word of "$ac_prog", so it can be a program name with args.
19830set dummy $ac_prog; ac_word=$2
19831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19832$as_echo_n "checking for $ac_word... " >&6; }
19833if ${ac_cv_path_CHECK_MAKE+:} false; then :
19834  $as_echo_n "(cached) " >&6
19835else
19836  case $CHECK_MAKE in
19837  [\\/]* | ?:[\\/]*)
19838  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19839  ;;
19840  *)
19841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19842for as_dir in $PATH
19843do
19844  IFS=$as_save_IFS
19845  test -z "$as_dir" && as_dir=.
19846    for ac_exec_ext in '' $ac_executable_extensions; do
19847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19848    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19850    break 2
19851  fi
19852done
19853  done
19854IFS=$as_save_IFS
19855
19856  ;;
19857esac
19858fi
19859CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19860if test -n "$CHECK_MAKE"; then
19861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19862$as_echo "$CHECK_MAKE" >&6; }
19863else
19864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19865$as_echo "no" >&6; }
19866fi
19867
19868
19869  test -n "$CHECK_MAKE" && break
19870done
19871
19872
19873  MAKE_CANDIDATE=""$CHECK_MAKE""
19874  DESCRIPTION="make in PATH"
19875
19876  # On Cygwin, we require a newer version of make than on other platforms
19877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19878    MAKE_VERSION_EXPR="-e 4\."
19879    MAKE_REQUIRED_VERSION="4.0"
19880   else
19881    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19882    MAKE_REQUIRED_VERSION="3.81"
19883  fi
19884
19885  if test "x$MAKE_CANDIDATE" != x; then
19886    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19887$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19888    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19889    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19890    if test "x$IS_GNU_MAKE" = x; then
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19892$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19893    else
19894      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19895      if test "x$IS_MODERN_MAKE" = x; then
19896        { $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
19897$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;}
19898      else
19899        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19900          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19901            MAKE_EXPECTED_ENV='cygwin'
19902          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19903            MAKE_EXPECTED_ENV='msys'
19904          else
19905            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19906          fi
19907          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19908          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19909        else
19910          # Not relevant for non-Windows
19911          IS_MAKE_CORRECT_ENV=true
19912        fi
19913        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19914          { $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
19915$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;}
19916        else
19917          FOUND_MAKE=$MAKE_CANDIDATE
19918
19919  # Only process if variable expands to non-empty
19920
19921  if test "x$FOUND_MAKE" != x; then
19922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19923
19924  # First separate the path from the arguments. This will split at the first
19925  # space.
19926  complete="$FOUND_MAKE"
19927  path="${complete%% *}"
19928  tmp="$complete EOL"
19929  arguments="${tmp#* }"
19930
19931  # Input might be given as Windows format, start by converting to
19932  # unix format.
19933  new_path=`$CYGPATH -u "$path"`
19934
19935  # Now try to locate executable using which
19936  new_path=`$WHICH "$new_path" 2> /dev/null`
19937  # bat and cmd files are not always considered executable in cygwin causing which
19938  # to not find them
19939  if test "x$new_path" = x \
19940      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19941      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19942    new_path=`$CYGPATH -u "$path"`
19943  fi
19944  if test "x$new_path" = x; then
19945    # Oops. Which didn't find the executable.
19946    # The splitting of arguments from the executable at a space might have been incorrect,
19947    # since paths with space are more likely in Windows. Give it another try with the whole
19948    # argument.
19949    path="$complete"
19950    arguments="EOL"
19951    new_path=`$CYGPATH -u "$path"`
19952    new_path=`$WHICH "$new_path" 2> /dev/null`
19953    # bat and cmd files are not always considered executable in cygwin causing which
19954    # to not find them
19955    if test "x$new_path" = x \
19956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19958      new_path=`$CYGPATH -u "$path"`
19959    fi
19960    if test "x$new_path" = x; then
19961      # It's still not found. Now this is an unrecoverable error.
19962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19964      has_space=`$ECHO "$complete" | $GREP " "`
19965      if test "x$has_space" != x; then
19966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19968      fi
19969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19970    fi
19971  fi
19972
19973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19976  # "foo.exe" is OK but "foo" is an error.
19977  #
19978  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19979  # It is also a way to make sure we got the proper file name for the real test later on.
19980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19981  if test "x$test_shortpath" = x; then
19982    # Short path failed, file does not exist as specified.
19983    # Try adding .exe or .cmd
19984    if test -f "${new_path}.exe"; then
19985      input_to_shortpath="${new_path}.exe"
19986    elif test -f "${new_path}.cmd"; then
19987      input_to_shortpath="${new_path}.cmd"
19988    else
19989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19993      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19994    fi
19995  else
19996    input_to_shortpath="$new_path"
19997  fi
19998
19999  # Call helper function which possibly converts this using DOS-style short mode.
20000  # If so, the updated path is stored in $new_path.
20001  new_path="$input_to_shortpath"
20002
20003  input_path="$input_to_shortpath"
20004  # Check if we need to convert this using DOS-style short mode. If the path
20005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20006  # take no chances and rewrite it.
20007  # Note: m4 eats our [], so we need to use [ and ] instead.
20008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20009  if test "x$has_forbidden_chars" != x; then
20010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20014      # Going to short mode and back again did indeed matter. Since short mode is
20015      # case insensitive, let's make it lowercase to improve readability.
20016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20017      # Now convert it back to Unix-style (cygpath)
20018      input_path=`$CYGPATH -u "$shortmode_path"`
20019      new_path="$input_path"
20020    fi
20021  fi
20022
20023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20024  if test "x$test_cygdrive_prefix" = x; then
20025    # As a simple fix, exclude /usr/bin since it's not a real path.
20026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20028      # a path prefixed by /cygdrive for fixpath to work.
20029      new_path="$CYGWIN_ROOT_PATH$input_path"
20030    fi
20031  fi
20032
20033  # remove trailing .exe if any
20034  new_path="${new_path/%.exe/}"
20035
20036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20037
20038  # First separate the path from the arguments. This will split at the first
20039  # space.
20040  complete="$FOUND_MAKE"
20041  path="${complete%% *}"
20042  tmp="$complete EOL"
20043  arguments="${tmp#* }"
20044
20045  # Input might be given as Windows format, start by converting to
20046  # unix format.
20047  new_path="$path"
20048
20049  windows_path="$new_path"
20050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20051    unix_path=`$CYGPATH -u "$windows_path"`
20052    new_path="$unix_path"
20053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20055    new_path="$unix_path"
20056  fi
20057
20058
20059  # Now try to locate executable using which
20060  new_path=`$WHICH "$new_path" 2> /dev/null`
20061
20062  if test "x$new_path" = x; then
20063    # Oops. Which didn't find the executable.
20064    # The splitting of arguments from the executable at a space might have been incorrect,
20065    # since paths with space are more likely in Windows. Give it another try with the whole
20066    # argument.
20067    path="$complete"
20068    arguments="EOL"
20069    new_path="$path"
20070
20071  windows_path="$new_path"
20072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20073    unix_path=`$CYGPATH -u "$windows_path"`
20074    new_path="$unix_path"
20075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20077    new_path="$unix_path"
20078  fi
20079
20080
20081    new_path=`$WHICH "$new_path" 2> /dev/null`
20082    # bat and cmd files are not always considered executable in MSYS causing which
20083    # to not find them
20084    if test "x$new_path" = x \
20085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20087      new_path="$path"
20088
20089  windows_path="$new_path"
20090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20091    unix_path=`$CYGPATH -u "$windows_path"`
20092    new_path="$unix_path"
20093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20095    new_path="$unix_path"
20096  fi
20097
20098    fi
20099
20100    if test "x$new_path" = x; then
20101      # It's still not found. Now this is an unrecoverable error.
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20104      has_space=`$ECHO "$complete" | $GREP " "`
20105      if test "x$has_space" != x; then
20106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20108      fi
20109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20110    fi
20111  fi
20112
20113  # Now new_path has a complete unix path to the binary
20114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20115    # Keep paths in /bin as-is, but remove trailing .exe if any
20116    new_path="${new_path/%.exe/}"
20117    # Do not save /bin paths to all_fixpath_prefixes!
20118  else
20119    # Not in mixed or Windows style, start by that.
20120    new_path=`cmd //c echo $new_path`
20121
20122  input_path="$new_path"
20123  # Check if we need to convert this using DOS-style short mode. If the path
20124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20125  # take no chances and rewrite it.
20126  # Note: m4 eats our [], so we need to use [ and ] instead.
20127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20128  if test "x$has_forbidden_chars" != x; then
20129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20131  fi
20132
20133    # Output is in $new_path
20134
20135  windows_path="$new_path"
20136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20137    unix_path=`$CYGPATH -u "$windows_path"`
20138    new_path="$unix_path"
20139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20141    new_path="$unix_path"
20142  fi
20143
20144    # remove trailing .exe if any
20145    new_path="${new_path/%.exe/}"
20146
20147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20149  fi
20150
20151    else
20152      # We're on a unix platform. Hooray! :)
20153      # First separate the path from the arguments. This will split at the first
20154      # space.
20155      complete="$FOUND_MAKE"
20156      path="${complete%% *}"
20157      tmp="$complete EOL"
20158      arguments="${tmp#* }"
20159
20160      # Cannot rely on the command "which" here since it doesn't always work.
20161      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20162      if test -z "$is_absolute_path"; then
20163        # Path to executable is not absolute. Find it.
20164        IFS_save="$IFS"
20165        IFS=:
20166        for p in $PATH; do
20167          if test -f "$p/$path" && test -x "$p/$path"; then
20168            new_path="$p/$path"
20169            break
20170          fi
20171        done
20172        IFS="$IFS_save"
20173      else
20174        # This is an absolute path, we can use it without further modifications.
20175        new_path="$path"
20176      fi
20177
20178      if test "x$new_path" = x; then
20179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20181        has_space=`$ECHO "$complete" | $GREP " "`
20182        if test "x$has_space" != x; then
20183          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20185        fi
20186        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20187      fi
20188    fi
20189
20190    # Now join together the path and the arguments once again
20191    if test "x$arguments" != xEOL; then
20192      new_complete="$new_path ${arguments% *}"
20193    else
20194      new_complete="$new_path"
20195    fi
20196
20197    if test "x$complete" != "x$new_complete"; then
20198      FOUND_MAKE="$new_complete"
20199      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20200$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20201    fi
20202  fi
20203
20204        fi
20205      fi
20206    fi
20207  fi
20208
20209    fi
20210
20211    if test "x$FOUND_MAKE" = x; then
20212      if test "x$TOOLCHAIN_PATH" != x; then
20213        # We have a toolchain path, check that as well before giving up.
20214        OLD_PATH=$PATH
20215        PATH=$TOOLCHAIN_PATH:$PATH
20216        for ac_prog in gmake
20217do
20218  # Extract the first word of "$ac_prog", so it can be a program name with args.
20219set dummy $ac_prog; ac_word=$2
20220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20221$as_echo_n "checking for $ac_word... " >&6; }
20222if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20223  $as_echo_n "(cached) " >&6
20224else
20225  case $CHECK_TOOLSDIR_GMAKE in
20226  [\\/]* | ?:[\\/]*)
20227  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20228  ;;
20229  *)
20230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20231for as_dir in $PATH
20232do
20233  IFS=$as_save_IFS
20234  test -z "$as_dir" && as_dir=.
20235    for ac_exec_ext in '' $ac_executable_extensions; do
20236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20237    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20239    break 2
20240  fi
20241done
20242  done
20243IFS=$as_save_IFS
20244
20245  ;;
20246esac
20247fi
20248CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20249if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20251$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20252else
20253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20254$as_echo "no" >&6; }
20255fi
20256
20257
20258  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20259done
20260
20261
20262  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20263  DESCRIPTION="gmake in tools-dir"
20264
20265  # On Cygwin, we require a newer version of make than on other platforms
20266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20267    MAKE_VERSION_EXPR="-e 4\."
20268    MAKE_REQUIRED_VERSION="4.0"
20269   else
20270    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20271    MAKE_REQUIRED_VERSION="3.81"
20272  fi
20273
20274  if test "x$MAKE_CANDIDATE" != x; then
20275    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20276$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20277    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20278    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20279    if test "x$IS_GNU_MAKE" = x; then
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20281$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20282    else
20283      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20284      if test "x$IS_MODERN_MAKE" = x; then
20285        { $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
20286$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;}
20287      else
20288        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20289          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20290            MAKE_EXPECTED_ENV='cygwin'
20291          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20292            MAKE_EXPECTED_ENV='msys'
20293          else
20294            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20295          fi
20296          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20297          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20298        else
20299          # Not relevant for non-Windows
20300          IS_MAKE_CORRECT_ENV=true
20301        fi
20302        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20303          { $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
20304$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;}
20305        else
20306          FOUND_MAKE=$MAKE_CANDIDATE
20307
20308  # Only process if variable expands to non-empty
20309
20310  if test "x$FOUND_MAKE" != x; then
20311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312
20313  # First separate the path from the arguments. This will split at the first
20314  # space.
20315  complete="$FOUND_MAKE"
20316  path="${complete%% *}"
20317  tmp="$complete EOL"
20318  arguments="${tmp#* }"
20319
20320  # Input might be given as Windows format, start by converting to
20321  # unix format.
20322  new_path=`$CYGPATH -u "$path"`
20323
20324  # Now try to locate executable using which
20325  new_path=`$WHICH "$new_path" 2> /dev/null`
20326  # bat and cmd files are not always considered executable in cygwin causing which
20327  # to not find them
20328  if test "x$new_path" = x \
20329      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20330      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20331    new_path=`$CYGPATH -u "$path"`
20332  fi
20333  if test "x$new_path" = x; then
20334    # Oops. Which didn't find the executable.
20335    # The splitting of arguments from the executable at a space might have been incorrect,
20336    # since paths with space are more likely in Windows. Give it another try with the whole
20337    # argument.
20338    path="$complete"
20339    arguments="EOL"
20340    new_path=`$CYGPATH -u "$path"`
20341    new_path=`$WHICH "$new_path" 2> /dev/null`
20342    # bat and cmd files are not always considered executable in cygwin causing which
20343    # to not find them
20344    if test "x$new_path" = x \
20345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20347      new_path=`$CYGPATH -u "$path"`
20348    fi
20349    if test "x$new_path" = x; then
20350      # It's still not found. Now this is an unrecoverable error.
20351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20353      has_space=`$ECHO "$complete" | $GREP " "`
20354      if test "x$has_space" != x; then
20355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20357      fi
20358      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20359    fi
20360  fi
20361
20362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20365  # "foo.exe" is OK but "foo" is an error.
20366  #
20367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20368  # It is also a way to make sure we got the proper file name for the real test later on.
20369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20370  if test "x$test_shortpath" = x; then
20371    # Short path failed, file does not exist as specified.
20372    # Try adding .exe or .cmd
20373    if test -f "${new_path}.exe"; then
20374      input_to_shortpath="${new_path}.exe"
20375    elif test -f "${new_path}.cmd"; then
20376      input_to_shortpath="${new_path}.cmd"
20377    else
20378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20379$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20383    fi
20384  else
20385    input_to_shortpath="$new_path"
20386  fi
20387
20388  # Call helper function which possibly converts this using DOS-style short mode.
20389  # If so, the updated path is stored in $new_path.
20390  new_path="$input_to_shortpath"
20391
20392  input_path="$input_to_shortpath"
20393  # Check if we need to convert this using DOS-style short mode. If the path
20394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20395  # take no chances and rewrite it.
20396  # Note: m4 eats our [], so we need to use [ and ] instead.
20397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20398  if test "x$has_forbidden_chars" != x; then
20399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20403      # Going to short mode and back again did indeed matter. Since short mode is
20404      # case insensitive, let's make it lowercase to improve readability.
20405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20406      # Now convert it back to Unix-style (cygpath)
20407      input_path=`$CYGPATH -u "$shortmode_path"`
20408      new_path="$input_path"
20409    fi
20410  fi
20411
20412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20413  if test "x$test_cygdrive_prefix" = x; then
20414    # As a simple fix, exclude /usr/bin since it's not a real path.
20415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20417      # a path prefixed by /cygdrive for fixpath to work.
20418      new_path="$CYGWIN_ROOT_PATH$input_path"
20419    fi
20420  fi
20421
20422  # remove trailing .exe if any
20423  new_path="${new_path/%.exe/}"
20424
20425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20426
20427  # First separate the path from the arguments. This will split at the first
20428  # space.
20429  complete="$FOUND_MAKE"
20430  path="${complete%% *}"
20431  tmp="$complete EOL"
20432  arguments="${tmp#* }"
20433
20434  # Input might be given as Windows format, start by converting to
20435  # unix format.
20436  new_path="$path"
20437
20438  windows_path="$new_path"
20439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20440    unix_path=`$CYGPATH -u "$windows_path"`
20441    new_path="$unix_path"
20442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20444    new_path="$unix_path"
20445  fi
20446
20447
20448  # Now try to locate executable using which
20449  new_path=`$WHICH "$new_path" 2> /dev/null`
20450
20451  if test "x$new_path" = x; then
20452    # Oops. Which didn't find the executable.
20453    # The splitting of arguments from the executable at a space might have been incorrect,
20454    # since paths with space are more likely in Windows. Give it another try with the whole
20455    # argument.
20456    path="$complete"
20457    arguments="EOL"
20458    new_path="$path"
20459
20460  windows_path="$new_path"
20461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20462    unix_path=`$CYGPATH -u "$windows_path"`
20463    new_path="$unix_path"
20464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20466    new_path="$unix_path"
20467  fi
20468
20469
20470    new_path=`$WHICH "$new_path" 2> /dev/null`
20471    # bat and cmd files are not always considered executable in MSYS causing which
20472    # to not find them
20473    if test "x$new_path" = x \
20474        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20475        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20476      new_path="$path"
20477
20478  windows_path="$new_path"
20479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20480    unix_path=`$CYGPATH -u "$windows_path"`
20481    new_path="$unix_path"
20482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20484    new_path="$unix_path"
20485  fi
20486
20487    fi
20488
20489    if test "x$new_path" = x; then
20490      # It's still not found. Now this is an unrecoverable error.
20491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20493      has_space=`$ECHO "$complete" | $GREP " "`
20494      if test "x$has_space" != x; then
20495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20497      fi
20498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20499    fi
20500  fi
20501
20502  # Now new_path has a complete unix path to the binary
20503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20504    # Keep paths in /bin as-is, but remove trailing .exe if any
20505    new_path="${new_path/%.exe/}"
20506    # Do not save /bin paths to all_fixpath_prefixes!
20507  else
20508    # Not in mixed or Windows style, start by that.
20509    new_path=`cmd //c echo $new_path`
20510
20511  input_path="$new_path"
20512  # Check if we need to convert this using DOS-style short mode. If the path
20513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20514  # take no chances and rewrite it.
20515  # Note: m4 eats our [], so we need to use [ and ] instead.
20516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20517  if test "x$has_forbidden_chars" != x; then
20518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20520  fi
20521
20522    # Output is in $new_path
20523
20524  windows_path="$new_path"
20525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20526    unix_path=`$CYGPATH -u "$windows_path"`
20527    new_path="$unix_path"
20528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20530    new_path="$unix_path"
20531  fi
20532
20533    # remove trailing .exe if any
20534    new_path="${new_path/%.exe/}"
20535
20536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20538  fi
20539
20540    else
20541      # We're on a unix platform. Hooray! :)
20542      # First separate the path from the arguments. This will split at the first
20543      # space.
20544      complete="$FOUND_MAKE"
20545      path="${complete%% *}"
20546      tmp="$complete EOL"
20547      arguments="${tmp#* }"
20548
20549      # Cannot rely on the command "which" here since it doesn't always work.
20550      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20551      if test -z "$is_absolute_path"; then
20552        # Path to executable is not absolute. Find it.
20553        IFS_save="$IFS"
20554        IFS=:
20555        for p in $PATH; do
20556          if test -f "$p/$path" && test -x "$p/$path"; then
20557            new_path="$p/$path"
20558            break
20559          fi
20560        done
20561        IFS="$IFS_save"
20562      else
20563        # This is an absolute path, we can use it without further modifications.
20564        new_path="$path"
20565      fi
20566
20567      if test "x$new_path" = x; then
20568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20570        has_space=`$ECHO "$complete" | $GREP " "`
20571        if test "x$has_space" != x; then
20572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20574        fi
20575        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20576      fi
20577    fi
20578
20579    # Now join together the path and the arguments once again
20580    if test "x$arguments" != xEOL; then
20581      new_complete="$new_path ${arguments% *}"
20582    else
20583      new_complete="$new_path"
20584    fi
20585
20586    if test "x$complete" != "x$new_complete"; then
20587      FOUND_MAKE="$new_complete"
20588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20589$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20590    fi
20591  fi
20592
20593        fi
20594      fi
20595    fi
20596  fi
20597
20598        if test "x$FOUND_MAKE" = x; then
20599          for ac_prog in make
20600do
20601  # Extract the first word of "$ac_prog", so it can be a program name with args.
20602set dummy $ac_prog; ac_word=$2
20603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20604$as_echo_n "checking for $ac_word... " >&6; }
20605if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20606  $as_echo_n "(cached) " >&6
20607else
20608  case $CHECK_TOOLSDIR_MAKE in
20609  [\\/]* | ?:[\\/]*)
20610  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20611  ;;
20612  *)
20613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20614for as_dir in $PATH
20615do
20616  IFS=$as_save_IFS
20617  test -z "$as_dir" && as_dir=.
20618    for ac_exec_ext in '' $ac_executable_extensions; do
20619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20620    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20622    break 2
20623  fi
20624done
20625  done
20626IFS=$as_save_IFS
20627
20628  ;;
20629esac
20630fi
20631CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20632if test -n "$CHECK_TOOLSDIR_MAKE"; then
20633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20634$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20635else
20636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20637$as_echo "no" >&6; }
20638fi
20639
20640
20641  test -n "$CHECK_TOOLSDIR_MAKE" && break
20642done
20643
20644
20645  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20646  DESCRIPTION="make in tools-dir"
20647
20648  # On Cygwin, we require a newer version of make than on other platforms
20649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20650    MAKE_VERSION_EXPR="-e 4\."
20651    MAKE_REQUIRED_VERSION="4.0"
20652   else
20653    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20654    MAKE_REQUIRED_VERSION="3.81"
20655  fi
20656
20657  if test "x$MAKE_CANDIDATE" != x; then
20658    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20659$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20660    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20661    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20662    if test "x$IS_GNU_MAKE" = x; then
20663      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20664$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20665    else
20666      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20667      if test "x$IS_MODERN_MAKE" = x; then
20668        { $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
20669$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;}
20670      else
20671        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20672          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20673            MAKE_EXPECTED_ENV='cygwin'
20674          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20675            MAKE_EXPECTED_ENV='msys'
20676          else
20677            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20678          fi
20679          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20680          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20681        else
20682          # Not relevant for non-Windows
20683          IS_MAKE_CORRECT_ENV=true
20684        fi
20685        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20686          { $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
20687$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;}
20688        else
20689          FOUND_MAKE=$MAKE_CANDIDATE
20690
20691  # Only process if variable expands to non-empty
20692
20693  if test "x$FOUND_MAKE" != x; then
20694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20695
20696  # First separate the path from the arguments. This will split at the first
20697  # space.
20698  complete="$FOUND_MAKE"
20699  path="${complete%% *}"
20700  tmp="$complete EOL"
20701  arguments="${tmp#* }"
20702
20703  # Input might be given as Windows format, start by converting to
20704  # unix format.
20705  new_path=`$CYGPATH -u "$path"`
20706
20707  # Now try to locate executable using which
20708  new_path=`$WHICH "$new_path" 2> /dev/null`
20709  # bat and cmd files are not always considered executable in cygwin causing which
20710  # to not find them
20711  if test "x$new_path" = x \
20712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20714    new_path=`$CYGPATH -u "$path"`
20715  fi
20716  if test "x$new_path" = x; then
20717    # Oops. Which didn't find the executable.
20718    # The splitting of arguments from the executable at a space might have been incorrect,
20719    # since paths with space are more likely in Windows. Give it another try with the whole
20720    # argument.
20721    path="$complete"
20722    arguments="EOL"
20723    new_path=`$CYGPATH -u "$path"`
20724    new_path=`$WHICH "$new_path" 2> /dev/null`
20725    # bat and cmd files are not always considered executable in cygwin causing which
20726    # to not find them
20727    if test "x$new_path" = x \
20728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20730      new_path=`$CYGPATH -u "$path"`
20731    fi
20732    if test "x$new_path" = x; then
20733      # It's still not found. Now this is an unrecoverable error.
20734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20736      has_space=`$ECHO "$complete" | $GREP " "`
20737      if test "x$has_space" != x; then
20738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20740      fi
20741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20742    fi
20743  fi
20744
20745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20748  # "foo.exe" is OK but "foo" is an error.
20749  #
20750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20751  # It is also a way to make sure we got the proper file name for the real test later on.
20752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20753  if test "x$test_shortpath" = x; then
20754    # Short path failed, file does not exist as specified.
20755    # Try adding .exe or .cmd
20756    if test -f "${new_path}.exe"; then
20757      input_to_shortpath="${new_path}.exe"
20758    elif test -f "${new_path}.cmd"; then
20759      input_to_shortpath="${new_path}.cmd"
20760    else
20761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20765      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20766    fi
20767  else
20768    input_to_shortpath="$new_path"
20769  fi
20770
20771  # Call helper function which possibly converts this using DOS-style short mode.
20772  # If so, the updated path is stored in $new_path.
20773  new_path="$input_to_shortpath"
20774
20775  input_path="$input_to_shortpath"
20776  # Check if we need to convert this using DOS-style short mode. If the path
20777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20778  # take no chances and rewrite it.
20779  # Note: m4 eats our [], so we need to use [ and ] instead.
20780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20781  if test "x$has_forbidden_chars" != x; then
20782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20786      # Going to short mode and back again did indeed matter. Since short mode is
20787      # case insensitive, let's make it lowercase to improve readability.
20788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20789      # Now convert it back to Unix-style (cygpath)
20790      input_path=`$CYGPATH -u "$shortmode_path"`
20791      new_path="$input_path"
20792    fi
20793  fi
20794
20795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20796  if test "x$test_cygdrive_prefix" = x; then
20797    # As a simple fix, exclude /usr/bin since it's not a real path.
20798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20800      # a path prefixed by /cygdrive for fixpath to work.
20801      new_path="$CYGWIN_ROOT_PATH$input_path"
20802    fi
20803  fi
20804
20805  # remove trailing .exe if any
20806  new_path="${new_path/%.exe/}"
20807
20808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20809
20810  # First separate the path from the arguments. This will split at the first
20811  # space.
20812  complete="$FOUND_MAKE"
20813  path="${complete%% *}"
20814  tmp="$complete EOL"
20815  arguments="${tmp#* }"
20816
20817  # Input might be given as Windows format, start by converting to
20818  # unix format.
20819  new_path="$path"
20820
20821  windows_path="$new_path"
20822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20823    unix_path=`$CYGPATH -u "$windows_path"`
20824    new_path="$unix_path"
20825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20827    new_path="$unix_path"
20828  fi
20829
20830
20831  # Now try to locate executable using which
20832  new_path=`$WHICH "$new_path" 2> /dev/null`
20833
20834  if test "x$new_path" = x; then
20835    # Oops. Which didn't find the executable.
20836    # The splitting of arguments from the executable at a space might have been incorrect,
20837    # since paths with space are more likely in Windows. Give it another try with the whole
20838    # argument.
20839    path="$complete"
20840    arguments="EOL"
20841    new_path="$path"
20842
20843  windows_path="$new_path"
20844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20845    unix_path=`$CYGPATH -u "$windows_path"`
20846    new_path="$unix_path"
20847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20849    new_path="$unix_path"
20850  fi
20851
20852
20853    new_path=`$WHICH "$new_path" 2> /dev/null`
20854    # bat and cmd files are not always considered executable in MSYS causing which
20855    # to not find them
20856    if test "x$new_path" = x \
20857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20859      new_path="$path"
20860
20861  windows_path="$new_path"
20862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20863    unix_path=`$CYGPATH -u "$windows_path"`
20864    new_path="$unix_path"
20865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20867    new_path="$unix_path"
20868  fi
20869
20870    fi
20871
20872    if test "x$new_path" = x; then
20873      # It's still not found. Now this is an unrecoverable error.
20874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20875$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20876      has_space=`$ECHO "$complete" | $GREP " "`
20877      if test "x$has_space" != x; then
20878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20880      fi
20881      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20882    fi
20883  fi
20884
20885  # Now new_path has a complete unix path to the binary
20886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20887    # Keep paths in /bin as-is, but remove trailing .exe if any
20888    new_path="${new_path/%.exe/}"
20889    # Do not save /bin paths to all_fixpath_prefixes!
20890  else
20891    # Not in mixed or Windows style, start by that.
20892    new_path=`cmd //c echo $new_path`
20893
20894  input_path="$new_path"
20895  # Check if we need to convert this using DOS-style short mode. If the path
20896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20897  # take no chances and rewrite it.
20898  # Note: m4 eats our [], so we need to use [ and ] instead.
20899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20900  if test "x$has_forbidden_chars" != x; then
20901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20903  fi
20904
20905    # Output is in $new_path
20906
20907  windows_path="$new_path"
20908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20909    unix_path=`$CYGPATH -u "$windows_path"`
20910    new_path="$unix_path"
20911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20913    new_path="$unix_path"
20914  fi
20915
20916    # remove trailing .exe if any
20917    new_path="${new_path/%.exe/}"
20918
20919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20921  fi
20922
20923    else
20924      # We're on a unix platform. Hooray! :)
20925      # First separate the path from the arguments. This will split at the first
20926      # space.
20927      complete="$FOUND_MAKE"
20928      path="${complete%% *}"
20929      tmp="$complete EOL"
20930      arguments="${tmp#* }"
20931
20932      # Cannot rely on the command "which" here since it doesn't always work.
20933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20934      if test -z "$is_absolute_path"; then
20935        # Path to executable is not absolute. Find it.
20936        IFS_save="$IFS"
20937        IFS=:
20938        for p in $PATH; do
20939          if test -f "$p/$path" && test -x "$p/$path"; then
20940            new_path="$p/$path"
20941            break
20942          fi
20943        done
20944        IFS="$IFS_save"
20945      else
20946        # This is an absolute path, we can use it without further modifications.
20947        new_path="$path"
20948      fi
20949
20950      if test "x$new_path" = x; then
20951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20953        has_space=`$ECHO "$complete" | $GREP " "`
20954        if test "x$has_space" != x; then
20955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20957        fi
20958        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20959      fi
20960    fi
20961
20962    # Now join together the path and the arguments once again
20963    if test "x$arguments" != xEOL; then
20964      new_complete="$new_path ${arguments% *}"
20965    else
20966      new_complete="$new_path"
20967    fi
20968
20969    if test "x$complete" != "x$new_complete"; then
20970      FOUND_MAKE="$new_complete"
20971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20972$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20973    fi
20974  fi
20975
20976        fi
20977      fi
20978    fi
20979  fi
20980
20981        fi
20982        PATH=$OLD_PATH
20983      fi
20984    fi
20985
20986    if test "x$FOUND_MAKE" = x; then
20987      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
20988    fi
20989
20990    else
20991      # If it succeeded, then it was overridden by the user. We will use it
20992      # for the tool.
20993
20994      # First remove it from the list of overridden variables, so we can test
20995      # for unknown variables in the end.
20996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20997
20998      # Check if we try to supply an empty value
20999      if test "x$MAKE" = x; then
21000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
21001$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
21002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21003$as_echo_n "checking for MAKE... " >&6; }
21004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21005$as_echo "disabled" >&6; }
21006      else
21007        # Check if the provided tool contains a complete path.
21008        tool_specified="$MAKE"
21009        tool_basename="${tool_specified##*/}"
21010        if test "x$tool_basename" = "x$tool_specified"; then
21011          # A command without a complete path is provided, search $PATH.
21012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
21013$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
21014          # Extract the first word of "$tool_basename", so it can be a program name with args.
21015set dummy $tool_basename; ac_word=$2
21016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21017$as_echo_n "checking for $ac_word... " >&6; }
21018if ${ac_cv_path_MAKE+:} false; then :
21019  $as_echo_n "(cached) " >&6
21020else
21021  case $MAKE in
21022  [\\/]* | ?:[\\/]*)
21023  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21024  ;;
21025  *)
21026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21027for as_dir in $PATH
21028do
21029  IFS=$as_save_IFS
21030  test -z "$as_dir" && as_dir=.
21031    for ac_exec_ext in '' $ac_executable_extensions; do
21032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21033    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21035    break 2
21036  fi
21037done
21038  done
21039IFS=$as_save_IFS
21040
21041  ;;
21042esac
21043fi
21044MAKE=$ac_cv_path_MAKE
21045if test -n "$MAKE"; then
21046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21047$as_echo "$MAKE" >&6; }
21048else
21049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21050$as_echo "no" >&6; }
21051fi
21052
21053
21054          if test "x$MAKE" = x; then
21055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21056          fi
21057        else
21058          # Otherwise we believe it is a complete path. Use it as it is.
21059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21060$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21062$as_echo_n "checking for MAKE... " >&6; }
21063          if test ! -x "$tool_specified"; then
21064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21065$as_echo "not found" >&6; }
21066            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21067          fi
21068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21069$as_echo "$tool_specified" >&6; }
21070        fi
21071      fi
21072    fi
21073
21074    # If MAKE was set by user, verify the version
21075
21076  MAKE_CANDIDATE=""$MAKE""
21077  DESCRIPTION="user supplied MAKE=$MAKE"
21078
21079  # On Cygwin, we require a newer version of make than on other platforms
21080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21081    MAKE_VERSION_EXPR="-e 4\."
21082    MAKE_REQUIRED_VERSION="4.0"
21083   else
21084    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21085    MAKE_REQUIRED_VERSION="3.81"
21086  fi
21087
21088  if test "x$MAKE_CANDIDATE" != x; then
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21090$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21091    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21092    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21093    if test "x$IS_GNU_MAKE" = x; then
21094      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21095$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21096    else
21097      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21098      if test "x$IS_MODERN_MAKE" = x; then
21099        { $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
21100$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;}
21101      else
21102        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21103          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21104            MAKE_EXPECTED_ENV='cygwin'
21105          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21106            MAKE_EXPECTED_ENV='msys'
21107          else
21108            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21109          fi
21110          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21111          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21112        else
21113          # Not relevant for non-Windows
21114          IS_MAKE_CORRECT_ENV=true
21115        fi
21116        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21117          { $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
21118$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;}
21119        else
21120          FOUND_MAKE=$MAKE_CANDIDATE
21121
21122  # Only process if variable expands to non-empty
21123
21124  if test "x$FOUND_MAKE" != x; then
21125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21126
21127  # First separate the path from the arguments. This will split at the first
21128  # space.
21129  complete="$FOUND_MAKE"
21130  path="${complete%% *}"
21131  tmp="$complete EOL"
21132  arguments="${tmp#* }"
21133
21134  # Input might be given as Windows format, start by converting to
21135  # unix format.
21136  new_path=`$CYGPATH -u "$path"`
21137
21138  # Now try to locate executable using which
21139  new_path=`$WHICH "$new_path" 2> /dev/null`
21140  # bat and cmd files are not always considered executable in cygwin causing which
21141  # to not find them
21142  if test "x$new_path" = x \
21143      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21144      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21145    new_path=`$CYGPATH -u "$path"`
21146  fi
21147  if test "x$new_path" = x; then
21148    # Oops. Which didn't find the executable.
21149    # The splitting of arguments from the executable at a space might have been incorrect,
21150    # since paths with space are more likely in Windows. Give it another try with the whole
21151    # argument.
21152    path="$complete"
21153    arguments="EOL"
21154    new_path=`$CYGPATH -u "$path"`
21155    new_path=`$WHICH "$new_path" 2> /dev/null`
21156    # bat and cmd files are not always considered executable in cygwin causing which
21157    # to not find them
21158    if test "x$new_path" = x \
21159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21161      new_path=`$CYGPATH -u "$path"`
21162    fi
21163    if test "x$new_path" = x; then
21164      # It's still not found. Now this is an unrecoverable error.
21165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21166$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21167      has_space=`$ECHO "$complete" | $GREP " "`
21168      if test "x$has_space" != x; then
21169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21171      fi
21172      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21173    fi
21174  fi
21175
21176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21179  # "foo.exe" is OK but "foo" is an error.
21180  #
21181  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21182  # It is also a way to make sure we got the proper file name for the real test later on.
21183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21184  if test "x$test_shortpath" = x; then
21185    # Short path failed, file does not exist as specified.
21186    # Try adding .exe or .cmd
21187    if test -f "${new_path}.exe"; then
21188      input_to_shortpath="${new_path}.exe"
21189    elif test -f "${new_path}.cmd"; then
21190      input_to_shortpath="${new_path}.cmd"
21191    else
21192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21196      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21197    fi
21198  else
21199    input_to_shortpath="$new_path"
21200  fi
21201
21202  # Call helper function which possibly converts this using DOS-style short mode.
21203  # If so, the updated path is stored in $new_path.
21204  new_path="$input_to_shortpath"
21205
21206  input_path="$input_to_shortpath"
21207  # Check if we need to convert this using DOS-style short mode. If the path
21208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21209  # take no chances and rewrite it.
21210  # Note: m4 eats our [], so we need to use [ and ] instead.
21211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21212  if test "x$has_forbidden_chars" != x; then
21213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21217      # Going to short mode and back again did indeed matter. Since short mode is
21218      # case insensitive, let's make it lowercase to improve readability.
21219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21220      # Now convert it back to Unix-style (cygpath)
21221      input_path=`$CYGPATH -u "$shortmode_path"`
21222      new_path="$input_path"
21223    fi
21224  fi
21225
21226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21227  if test "x$test_cygdrive_prefix" = x; then
21228    # As a simple fix, exclude /usr/bin since it's not a real path.
21229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21231      # a path prefixed by /cygdrive for fixpath to work.
21232      new_path="$CYGWIN_ROOT_PATH$input_path"
21233    fi
21234  fi
21235
21236  # remove trailing .exe if any
21237  new_path="${new_path/%.exe/}"
21238
21239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21240
21241  # First separate the path from the arguments. This will split at the first
21242  # space.
21243  complete="$FOUND_MAKE"
21244  path="${complete%% *}"
21245  tmp="$complete EOL"
21246  arguments="${tmp#* }"
21247
21248  # Input might be given as Windows format, start by converting to
21249  # unix format.
21250  new_path="$path"
21251
21252  windows_path="$new_path"
21253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21254    unix_path=`$CYGPATH -u "$windows_path"`
21255    new_path="$unix_path"
21256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21258    new_path="$unix_path"
21259  fi
21260
21261
21262  # Now try to locate executable using which
21263  new_path=`$WHICH "$new_path" 2> /dev/null`
21264
21265  if test "x$new_path" = x; then
21266    # Oops. Which didn't find the executable.
21267    # The splitting of arguments from the executable at a space might have been incorrect,
21268    # since paths with space are more likely in Windows. Give it another try with the whole
21269    # argument.
21270    path="$complete"
21271    arguments="EOL"
21272    new_path="$path"
21273
21274  windows_path="$new_path"
21275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21276    unix_path=`$CYGPATH -u "$windows_path"`
21277    new_path="$unix_path"
21278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21280    new_path="$unix_path"
21281  fi
21282
21283
21284    new_path=`$WHICH "$new_path" 2> /dev/null`
21285    # bat and cmd files are not always considered executable in MSYS causing which
21286    # to not find them
21287    if test "x$new_path" = x \
21288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21290      new_path="$path"
21291
21292  windows_path="$new_path"
21293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21294    unix_path=`$CYGPATH -u "$windows_path"`
21295    new_path="$unix_path"
21296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21298    new_path="$unix_path"
21299  fi
21300
21301    fi
21302
21303    if test "x$new_path" = x; then
21304      # It's still not found. Now this is an unrecoverable error.
21305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21306$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21307      has_space=`$ECHO "$complete" | $GREP " "`
21308      if test "x$has_space" != x; then
21309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21311      fi
21312      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21313    fi
21314  fi
21315
21316  # Now new_path has a complete unix path to the binary
21317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21318    # Keep paths in /bin as-is, but remove trailing .exe if any
21319    new_path="${new_path/%.exe/}"
21320    # Do not save /bin paths to all_fixpath_prefixes!
21321  else
21322    # Not in mixed or Windows style, start by that.
21323    new_path=`cmd //c echo $new_path`
21324
21325  input_path="$new_path"
21326  # Check if we need to convert this using DOS-style short mode. If the path
21327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21328  # take no chances and rewrite it.
21329  # Note: m4 eats our [], so we need to use [ and ] instead.
21330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21331  if test "x$has_forbidden_chars" != x; then
21332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21334  fi
21335
21336    # Output is in $new_path
21337
21338  windows_path="$new_path"
21339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21340    unix_path=`$CYGPATH -u "$windows_path"`
21341    new_path="$unix_path"
21342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21344    new_path="$unix_path"
21345  fi
21346
21347    # remove trailing .exe if any
21348    new_path="${new_path/%.exe/}"
21349
21350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21352  fi
21353
21354    else
21355      # We're on a unix platform. Hooray! :)
21356      # First separate the path from the arguments. This will split at the first
21357      # space.
21358      complete="$FOUND_MAKE"
21359      path="${complete%% *}"
21360      tmp="$complete EOL"
21361      arguments="${tmp#* }"
21362
21363      # Cannot rely on the command "which" here since it doesn't always work.
21364      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21365      if test -z "$is_absolute_path"; then
21366        # Path to executable is not absolute. Find it.
21367        IFS_save="$IFS"
21368        IFS=:
21369        for p in $PATH; do
21370          if test -f "$p/$path" && test -x "$p/$path"; then
21371            new_path="$p/$path"
21372            break
21373          fi
21374        done
21375        IFS="$IFS_save"
21376      else
21377        # This is an absolute path, we can use it without further modifications.
21378        new_path="$path"
21379      fi
21380
21381      if test "x$new_path" = x; then
21382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21384        has_space=`$ECHO "$complete" | $GREP " "`
21385        if test "x$has_space" != x; then
21386          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21388        fi
21389        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21390      fi
21391    fi
21392
21393    # Now join together the path and the arguments once again
21394    if test "x$arguments" != xEOL; then
21395      new_complete="$new_path ${arguments% *}"
21396    else
21397      new_complete="$new_path"
21398    fi
21399
21400    if test "x$complete" != "x$new_complete"; then
21401      FOUND_MAKE="$new_complete"
21402      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21403$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21404    fi
21405  fi
21406
21407        fi
21408      fi
21409    fi
21410  fi
21411
21412    if test "x$FOUND_MAKE" = x; then
21413      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21414    fi
21415
21416  fi
21417
21418
21419  MAKE=$FOUND_MAKE
21420
21421  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21422$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21423
21424
21425  # Check if make supports the output sync option and if so, setup using it.
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21427$as_echo_n "checking if make --output-sync is supported... " >&6; }
21428  if $MAKE --version -O > /dev/null 2>&1; then
21429    OUTPUT_SYNC_SUPPORTED=true
21430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21431$as_echo "yes" >&6; }
21432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21433$as_echo_n "checking for output-sync value... " >&6; }
21434
21435# Check whether --with-output-sync was given.
21436if test "${with_output_sync+set}" = set; then :
21437  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21438fi
21439
21440    if test "x$OUTPUT_SYNC" = "x"; then
21441      OUTPUT_SYNC=none
21442    fi
21443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21444$as_echo "$OUTPUT_SYNC" >&6; }
21445    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21446      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21447    fi
21448  else
21449    OUTPUT_SYNC_SUPPORTED=false
21450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21451$as_echo "no" >&6; }
21452  fi
21453
21454
21455
21456
21457
21458
21459  # Test if find supports -delete
21460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21461$as_echo_n "checking if find supports -delete... " >&6; }
21462  FIND_DELETE="-delete"
21463
21464  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21465
21466  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21467
21468  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21469  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21470    # No, it does not.
21471    $RM $DELETEDIR/TestIfFindSupportsDelete
21472    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21473      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21474      FIND_DELETE="-print | $XARGS $RM"
21475    else
21476      FIND_DELETE="-exec $RM \{\} \+"
21477    fi
21478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21479$as_echo "no" >&6; }
21480  else
21481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21482$as_echo "yes" >&6; }
21483  fi
21484  $RMDIR $DELETEDIR
21485
21486
21487
21488  # Test which kind of tar was found
21489  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21490    TAR_TYPE="gnu"
21491  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21492    TAR_TYPE="bsd"
21493  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21494    TAR_TYPE="bsd"
21495  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21496    TAR_TYPE="solaris"
21497  fi
21498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21499$as_echo_n "checking what type of tar was found... " >&6; }
21500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21501$as_echo "$TAR_TYPE" >&6; }
21502
21503  TAR_CREATE_FILE_PARAM=""
21504
21505  if test "x$TAR_TYPE" = "xgnu"; then
21506    TAR_INCLUDE_PARAM="T"
21507    TAR_SUPPORTS_TRANSFORM="true"
21508    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21509      # When using gnu tar for Solaris targets, need to use compatibility mode
21510      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21511    fi
21512  else
21513    TAR_INCLUDE_PARAM="I"
21514    TAR_SUPPORTS_TRANSFORM="false"
21515  fi
21516
21517
21518
21519
21520
21521
21522  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21523  # This is a problem for the grep resident on AIX.
21524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21525$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21526  # Multiple subsequent spaces..
21527  STACK_SPACES='aaa   bbb   ccc'
21528  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21529  # patterns in it.
21530  STACK_LIST=${STACK_SPACES// /$'\n'}
21531  NEEDLE_SPACES='ccc bbb aaa'
21532  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21533  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21534  if test "x$RESULT" == "x"; then
21535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21536$as_echo "yes" >&6; }
21537  else
21538    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21539      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21540    fi
21541    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21542  fi
21543
21544
21545  # These tools might not be installed by default,
21546  # need hint on how to install them.
21547
21548
21549
21550  # Publish this variable in the help.
21551
21552
21553  if [ -z "${UNZIP+x}" ]; then
21554    # The variable is not set by user, try to locate tool using the code snippet
21555    for ac_prog in unzip
21556do
21557  # Extract the first word of "$ac_prog", so it can be a program name with args.
21558set dummy $ac_prog; ac_word=$2
21559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21560$as_echo_n "checking for $ac_word... " >&6; }
21561if ${ac_cv_path_UNZIP+:} false; then :
21562  $as_echo_n "(cached) " >&6
21563else
21564  case $UNZIP in
21565  [\\/]* | ?:[\\/]*)
21566  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21567  ;;
21568  *)
21569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21570for as_dir in $PATH
21571do
21572  IFS=$as_save_IFS
21573  test -z "$as_dir" && as_dir=.
21574    for ac_exec_ext in '' $ac_executable_extensions; do
21575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21576    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21578    break 2
21579  fi
21580done
21581  done
21582IFS=$as_save_IFS
21583
21584  ;;
21585esac
21586fi
21587UNZIP=$ac_cv_path_UNZIP
21588if test -n "$UNZIP"; then
21589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21590$as_echo "$UNZIP" >&6; }
21591else
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21593$as_echo "no" >&6; }
21594fi
21595
21596
21597  test -n "$UNZIP" && break
21598done
21599
21600  else
21601    # The variable is set, but is it from the command line or the environment?
21602
21603    # Try to remove the string !UNZIP! from our list.
21604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21606      # If it failed, the variable was not from the command line. Ignore it,
21607      # but warn the user (except for BASH, which is always set by the calling BASH).
21608      if test "xUNZIP" != xBASH; then
21609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21610$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21611      fi
21612      # Try to locate tool using the code snippet
21613      for ac_prog in unzip
21614do
21615  # Extract the first word of "$ac_prog", so it can be a program name with args.
21616set dummy $ac_prog; ac_word=$2
21617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21618$as_echo_n "checking for $ac_word... " >&6; }
21619if ${ac_cv_path_UNZIP+:} false; then :
21620  $as_echo_n "(cached) " >&6
21621else
21622  case $UNZIP in
21623  [\\/]* | ?:[\\/]*)
21624  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21625  ;;
21626  *)
21627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21628for as_dir in $PATH
21629do
21630  IFS=$as_save_IFS
21631  test -z "$as_dir" && as_dir=.
21632    for ac_exec_ext in '' $ac_executable_extensions; do
21633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21634    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21636    break 2
21637  fi
21638done
21639  done
21640IFS=$as_save_IFS
21641
21642  ;;
21643esac
21644fi
21645UNZIP=$ac_cv_path_UNZIP
21646if test -n "$UNZIP"; then
21647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21648$as_echo "$UNZIP" >&6; }
21649else
21650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21651$as_echo "no" >&6; }
21652fi
21653
21654
21655  test -n "$UNZIP" && break
21656done
21657
21658    else
21659      # If it succeeded, then it was overridden by the user. We will use it
21660      # for the tool.
21661
21662      # First remove it from the list of overridden variables, so we can test
21663      # for unknown variables in the end.
21664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21665
21666      # Check if we try to supply an empty value
21667      if test "x$UNZIP" = x; then
21668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21669$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21671$as_echo_n "checking for UNZIP... " >&6; }
21672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21673$as_echo "disabled" >&6; }
21674      else
21675        # Check if the provided tool contains a complete path.
21676        tool_specified="$UNZIP"
21677        tool_basename="${tool_specified##*/}"
21678        if test "x$tool_basename" = "x$tool_specified"; then
21679          # A command without a complete path is provided, search $PATH.
21680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21681$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21682          # Extract the first word of "$tool_basename", so it can be a program name with args.
21683set dummy $tool_basename; ac_word=$2
21684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21685$as_echo_n "checking for $ac_word... " >&6; }
21686if ${ac_cv_path_UNZIP+:} false; then :
21687  $as_echo_n "(cached) " >&6
21688else
21689  case $UNZIP in
21690  [\\/]* | ?:[\\/]*)
21691  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21692  ;;
21693  *)
21694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21695for as_dir in $PATH
21696do
21697  IFS=$as_save_IFS
21698  test -z "$as_dir" && as_dir=.
21699    for ac_exec_ext in '' $ac_executable_extensions; do
21700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21701    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21703    break 2
21704  fi
21705done
21706  done
21707IFS=$as_save_IFS
21708
21709  ;;
21710esac
21711fi
21712UNZIP=$ac_cv_path_UNZIP
21713if test -n "$UNZIP"; then
21714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21715$as_echo "$UNZIP" >&6; }
21716else
21717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21718$as_echo "no" >&6; }
21719fi
21720
21721
21722          if test "x$UNZIP" = x; then
21723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21724          fi
21725        else
21726          # Otherwise we believe it is a complete path. Use it as it is.
21727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21728$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21730$as_echo_n "checking for UNZIP... " >&6; }
21731          if test ! -x "$tool_specified"; then
21732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21733$as_echo "not found" >&6; }
21734            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21735          fi
21736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21737$as_echo "$tool_specified" >&6; }
21738        fi
21739      fi
21740    fi
21741
21742  fi
21743
21744
21745
21746  if test "x$UNZIP" = x; then
21747    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21748  fi
21749
21750
21751  # Since zip uses "ZIP" as a environment variable for passing options, we need
21752  # to name our variable differently, hence ZIPEXE.
21753
21754
21755
21756  # Publish this variable in the help.
21757
21758
21759  if [ -z "${ZIPEXE+x}" ]; then
21760    # The variable is not set by user, try to locate tool using the code snippet
21761    for ac_prog in zip
21762do
21763  # Extract the first word of "$ac_prog", so it can be a program name with args.
21764set dummy $ac_prog; ac_word=$2
21765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21766$as_echo_n "checking for $ac_word... " >&6; }
21767if ${ac_cv_path_ZIPEXE+:} false; then :
21768  $as_echo_n "(cached) " >&6
21769else
21770  case $ZIPEXE in
21771  [\\/]* | ?:[\\/]*)
21772  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21773  ;;
21774  *)
21775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21776for as_dir in $PATH
21777do
21778  IFS=$as_save_IFS
21779  test -z "$as_dir" && as_dir=.
21780    for ac_exec_ext in '' $ac_executable_extensions; do
21781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21782    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21784    break 2
21785  fi
21786done
21787  done
21788IFS=$as_save_IFS
21789
21790  ;;
21791esac
21792fi
21793ZIPEXE=$ac_cv_path_ZIPEXE
21794if test -n "$ZIPEXE"; then
21795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21796$as_echo "$ZIPEXE" >&6; }
21797else
21798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21799$as_echo "no" >&6; }
21800fi
21801
21802
21803  test -n "$ZIPEXE" && break
21804done
21805
21806  else
21807    # The variable is set, but is it from the command line or the environment?
21808
21809    # Try to remove the string !ZIPEXE! from our list.
21810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21812      # If it failed, the variable was not from the command line. Ignore it,
21813      # but warn the user (except for BASH, which is always set by the calling BASH).
21814      if test "xZIPEXE" != xBASH; then
21815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21816$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21817      fi
21818      # Try to locate tool using the code snippet
21819      for ac_prog in zip
21820do
21821  # Extract the first word of "$ac_prog", so it can be a program name with args.
21822set dummy $ac_prog; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if ${ac_cv_path_ZIPEXE+:} false; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  case $ZIPEXE in
21829  [\\/]* | ?:[\\/]*)
21830  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21831  ;;
21832  *)
21833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21834for as_dir in $PATH
21835do
21836  IFS=$as_save_IFS
21837  test -z "$as_dir" && as_dir=.
21838    for ac_exec_ext in '' $ac_executable_extensions; do
21839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21840    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21842    break 2
21843  fi
21844done
21845  done
21846IFS=$as_save_IFS
21847
21848  ;;
21849esac
21850fi
21851ZIPEXE=$ac_cv_path_ZIPEXE
21852if test -n "$ZIPEXE"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21854$as_echo "$ZIPEXE" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861  test -n "$ZIPEXE" && break
21862done
21863
21864    else
21865      # If it succeeded, then it was overridden by the user. We will use it
21866      # for the tool.
21867
21868      # First remove it from the list of overridden variables, so we can test
21869      # for unknown variables in the end.
21870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21871
21872      # Check if we try to supply an empty value
21873      if test "x$ZIPEXE" = x; then
21874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21875$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21877$as_echo_n "checking for ZIPEXE... " >&6; }
21878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21879$as_echo "disabled" >&6; }
21880      else
21881        # Check if the provided tool contains a complete path.
21882        tool_specified="$ZIPEXE"
21883        tool_basename="${tool_specified##*/}"
21884        if test "x$tool_basename" = "x$tool_specified"; then
21885          # A command without a complete path is provided, search $PATH.
21886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21887$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21888          # Extract the first word of "$tool_basename", so it can be a program name with args.
21889set dummy $tool_basename; ac_word=$2
21890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21891$as_echo_n "checking for $ac_word... " >&6; }
21892if ${ac_cv_path_ZIPEXE+:} false; then :
21893  $as_echo_n "(cached) " >&6
21894else
21895  case $ZIPEXE in
21896  [\\/]* | ?:[\\/]*)
21897  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21898  ;;
21899  *)
21900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21901for as_dir in $PATH
21902do
21903  IFS=$as_save_IFS
21904  test -z "$as_dir" && as_dir=.
21905    for ac_exec_ext in '' $ac_executable_extensions; do
21906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21907    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21909    break 2
21910  fi
21911done
21912  done
21913IFS=$as_save_IFS
21914
21915  ;;
21916esac
21917fi
21918ZIPEXE=$ac_cv_path_ZIPEXE
21919if test -n "$ZIPEXE"; then
21920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21921$as_echo "$ZIPEXE" >&6; }
21922else
21923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21924$as_echo "no" >&6; }
21925fi
21926
21927
21928          if test "x$ZIPEXE" = x; then
21929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21930          fi
21931        else
21932          # Otherwise we believe it is a complete path. Use it as it is.
21933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21934$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21936$as_echo_n "checking for ZIPEXE... " >&6; }
21937          if test ! -x "$tool_specified"; then
21938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21939$as_echo "not found" >&6; }
21940            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21941          fi
21942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21943$as_echo "$tool_specified" >&6; }
21944        fi
21945      fi
21946    fi
21947
21948  fi
21949
21950
21951
21952  if test "x$ZIPEXE" = x; then
21953    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21954  fi
21955
21956
21957
21958  # Non-required basic tools
21959
21960
21961
21962  # Publish this variable in the help.
21963
21964
21965  if [ -z "${LDD+x}" ]; then
21966    # The variable is not set by user, try to locate tool using the code snippet
21967    for ac_prog in ldd
21968do
21969  # Extract the first word of "$ac_prog", so it can be a program name with args.
21970set dummy $ac_prog; ac_word=$2
21971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21972$as_echo_n "checking for $ac_word... " >&6; }
21973if ${ac_cv_path_LDD+:} false; then :
21974  $as_echo_n "(cached) " >&6
21975else
21976  case $LDD in
21977  [\\/]* | ?:[\\/]*)
21978  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21979  ;;
21980  *)
21981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21982for as_dir in $PATH
21983do
21984  IFS=$as_save_IFS
21985  test -z "$as_dir" && as_dir=.
21986    for ac_exec_ext in '' $ac_executable_extensions; do
21987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21988    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21990    break 2
21991  fi
21992done
21993  done
21994IFS=$as_save_IFS
21995
21996  ;;
21997esac
21998fi
21999LDD=$ac_cv_path_LDD
22000if test -n "$LDD"; then
22001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22002$as_echo "$LDD" >&6; }
22003else
22004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22005$as_echo "no" >&6; }
22006fi
22007
22008
22009  test -n "$LDD" && break
22010done
22011
22012  else
22013    # The variable is set, but is it from the command line or the environment?
22014
22015    # Try to remove the string !LDD! from our list.
22016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22018      # If it failed, the variable was not from the command line. Ignore it,
22019      # but warn the user (except for BASH, which is always set by the calling BASH).
22020      if test "xLDD" != xBASH; then
22021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22022$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22023      fi
22024      # Try to locate tool using the code snippet
22025      for ac_prog in ldd
22026do
22027  # Extract the first word of "$ac_prog", so it can be a program name with args.
22028set dummy $ac_prog; ac_word=$2
22029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22030$as_echo_n "checking for $ac_word... " >&6; }
22031if ${ac_cv_path_LDD+:} false; then :
22032  $as_echo_n "(cached) " >&6
22033else
22034  case $LDD in
22035  [\\/]* | ?:[\\/]*)
22036  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22037  ;;
22038  *)
22039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22040for as_dir in $PATH
22041do
22042  IFS=$as_save_IFS
22043  test -z "$as_dir" && as_dir=.
22044    for ac_exec_ext in '' $ac_executable_extensions; do
22045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22046    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22048    break 2
22049  fi
22050done
22051  done
22052IFS=$as_save_IFS
22053
22054  ;;
22055esac
22056fi
22057LDD=$ac_cv_path_LDD
22058if test -n "$LDD"; then
22059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22060$as_echo "$LDD" >&6; }
22061else
22062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22063$as_echo "no" >&6; }
22064fi
22065
22066
22067  test -n "$LDD" && break
22068done
22069
22070    else
22071      # If it succeeded, then it was overridden by the user. We will use it
22072      # for the tool.
22073
22074      # First remove it from the list of overridden variables, so we can test
22075      # for unknown variables in the end.
22076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22077
22078      # Check if we try to supply an empty value
22079      if test "x$LDD" = x; then
22080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22081$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22083$as_echo_n "checking for LDD... " >&6; }
22084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22085$as_echo "disabled" >&6; }
22086      else
22087        # Check if the provided tool contains a complete path.
22088        tool_specified="$LDD"
22089        tool_basename="${tool_specified##*/}"
22090        if test "x$tool_basename" = "x$tool_specified"; then
22091          # A command without a complete path is provided, search $PATH.
22092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22093$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22094          # Extract the first word of "$tool_basename", so it can be a program name with args.
22095set dummy $tool_basename; ac_word=$2
22096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22097$as_echo_n "checking for $ac_word... " >&6; }
22098if ${ac_cv_path_LDD+:} false; then :
22099  $as_echo_n "(cached) " >&6
22100else
22101  case $LDD in
22102  [\\/]* | ?:[\\/]*)
22103  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22104  ;;
22105  *)
22106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22107for as_dir in $PATH
22108do
22109  IFS=$as_save_IFS
22110  test -z "$as_dir" && as_dir=.
22111    for ac_exec_ext in '' $ac_executable_extensions; do
22112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22113    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22115    break 2
22116  fi
22117done
22118  done
22119IFS=$as_save_IFS
22120
22121  ;;
22122esac
22123fi
22124LDD=$ac_cv_path_LDD
22125if test -n "$LDD"; then
22126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22127$as_echo "$LDD" >&6; }
22128else
22129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22130$as_echo "no" >&6; }
22131fi
22132
22133
22134          if test "x$LDD" = x; then
22135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22136          fi
22137        else
22138          # Otherwise we believe it is a complete path. Use it as it is.
22139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22140$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22142$as_echo_n "checking for LDD... " >&6; }
22143          if test ! -x "$tool_specified"; then
22144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22145$as_echo "not found" >&6; }
22146            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22147          fi
22148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22149$as_echo "$tool_specified" >&6; }
22150        fi
22151      fi
22152    fi
22153
22154  fi
22155
22156
22157  if test "x$LDD" = "x"; then
22158    # List shared lib dependencies is used for
22159    # debug output and checking for forbidden dependencies.
22160    # We can build without it.
22161    LDD="true"
22162  fi
22163
22164
22165  # Publish this variable in the help.
22166
22167
22168  if [ -z "${OTOOL+x}" ]; then
22169    # The variable is not set by user, try to locate tool using the code snippet
22170    for ac_prog in otool
22171do
22172  # Extract the first word of "$ac_prog", so it can be a program name with args.
22173set dummy $ac_prog; ac_word=$2
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22175$as_echo_n "checking for $ac_word... " >&6; }
22176if ${ac_cv_path_OTOOL+:} false; then :
22177  $as_echo_n "(cached) " >&6
22178else
22179  case $OTOOL in
22180  [\\/]* | ?:[\\/]*)
22181  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22182  ;;
22183  *)
22184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22185for as_dir in $PATH
22186do
22187  IFS=$as_save_IFS
22188  test -z "$as_dir" && as_dir=.
22189    for ac_exec_ext in '' $ac_executable_extensions; do
22190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22191    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22193    break 2
22194  fi
22195done
22196  done
22197IFS=$as_save_IFS
22198
22199  ;;
22200esac
22201fi
22202OTOOL=$ac_cv_path_OTOOL
22203if test -n "$OTOOL"; then
22204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22205$as_echo "$OTOOL" >&6; }
22206else
22207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22208$as_echo "no" >&6; }
22209fi
22210
22211
22212  test -n "$OTOOL" && break
22213done
22214
22215  else
22216    # The variable is set, but is it from the command line or the environment?
22217
22218    # Try to remove the string !OTOOL! from our list.
22219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22221      # If it failed, the variable was not from the command line. Ignore it,
22222      # but warn the user (except for BASH, which is always set by the calling BASH).
22223      if test "xOTOOL" != xBASH; then
22224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22225$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22226      fi
22227      # Try to locate tool using the code snippet
22228      for ac_prog in otool
22229do
22230  # Extract the first word of "$ac_prog", so it can be a program name with args.
22231set dummy $ac_prog; ac_word=$2
22232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22233$as_echo_n "checking for $ac_word... " >&6; }
22234if ${ac_cv_path_OTOOL+:} false; then :
22235  $as_echo_n "(cached) " >&6
22236else
22237  case $OTOOL in
22238  [\\/]* | ?:[\\/]*)
22239  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22240  ;;
22241  *)
22242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22243for as_dir in $PATH
22244do
22245  IFS=$as_save_IFS
22246  test -z "$as_dir" && as_dir=.
22247    for ac_exec_ext in '' $ac_executable_extensions; do
22248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22249    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22251    break 2
22252  fi
22253done
22254  done
22255IFS=$as_save_IFS
22256
22257  ;;
22258esac
22259fi
22260OTOOL=$ac_cv_path_OTOOL
22261if test -n "$OTOOL"; then
22262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22263$as_echo "$OTOOL" >&6; }
22264else
22265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22266$as_echo "no" >&6; }
22267fi
22268
22269
22270  test -n "$OTOOL" && break
22271done
22272
22273    else
22274      # If it succeeded, then it was overridden by the user. We will use it
22275      # for the tool.
22276
22277      # First remove it from the list of overridden variables, so we can test
22278      # for unknown variables in the end.
22279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22280
22281      # Check if we try to supply an empty value
22282      if test "x$OTOOL" = x; then
22283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22284$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22286$as_echo_n "checking for OTOOL... " >&6; }
22287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22288$as_echo "disabled" >&6; }
22289      else
22290        # Check if the provided tool contains a complete path.
22291        tool_specified="$OTOOL"
22292        tool_basename="${tool_specified##*/}"
22293        if test "x$tool_basename" = "x$tool_specified"; then
22294          # A command without a complete path is provided, search $PATH.
22295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22296$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22297          # Extract the first word of "$tool_basename", so it can be a program name with args.
22298set dummy $tool_basename; ac_word=$2
22299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22300$as_echo_n "checking for $ac_word... " >&6; }
22301if ${ac_cv_path_OTOOL+:} false; then :
22302  $as_echo_n "(cached) " >&6
22303else
22304  case $OTOOL in
22305  [\\/]* | ?:[\\/]*)
22306  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22307  ;;
22308  *)
22309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22310for as_dir in $PATH
22311do
22312  IFS=$as_save_IFS
22313  test -z "$as_dir" && as_dir=.
22314    for ac_exec_ext in '' $ac_executable_extensions; do
22315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22316    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22318    break 2
22319  fi
22320done
22321  done
22322IFS=$as_save_IFS
22323
22324  ;;
22325esac
22326fi
22327OTOOL=$ac_cv_path_OTOOL
22328if test -n "$OTOOL"; then
22329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22330$as_echo "$OTOOL" >&6; }
22331else
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22333$as_echo "no" >&6; }
22334fi
22335
22336
22337          if test "x$OTOOL" = x; then
22338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22339          fi
22340        else
22341          # Otherwise we believe it is a complete path. Use it as it is.
22342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22343$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22345$as_echo_n "checking for OTOOL... " >&6; }
22346          if test ! -x "$tool_specified"; then
22347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22348$as_echo "not found" >&6; }
22349            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22350          fi
22351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22352$as_echo "$tool_specified" >&6; }
22353        fi
22354      fi
22355    fi
22356
22357  fi
22358
22359
22360  if test "x$OTOOL" = "x"; then
22361    OTOOL="true"
22362  fi
22363
22364
22365  # Publish this variable in the help.
22366
22367
22368  if [ -z "${READELF+x}" ]; then
22369    # The variable is not set by user, try to locate tool using the code snippet
22370    for ac_prog in greadelf readelf
22371do
22372  # Extract the first word of "$ac_prog", so it can be a program name with args.
22373set dummy $ac_prog; ac_word=$2
22374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22375$as_echo_n "checking for $ac_word... " >&6; }
22376if ${ac_cv_path_READELF+:} false; then :
22377  $as_echo_n "(cached) " >&6
22378else
22379  case $READELF in
22380  [\\/]* | ?:[\\/]*)
22381  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22382  ;;
22383  *)
22384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22385for as_dir in $PATH
22386do
22387  IFS=$as_save_IFS
22388  test -z "$as_dir" && as_dir=.
22389    for ac_exec_ext in '' $ac_executable_extensions; do
22390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22391    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22393    break 2
22394  fi
22395done
22396  done
22397IFS=$as_save_IFS
22398
22399  ;;
22400esac
22401fi
22402READELF=$ac_cv_path_READELF
22403if test -n "$READELF"; then
22404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22405$as_echo "$READELF" >&6; }
22406else
22407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22408$as_echo "no" >&6; }
22409fi
22410
22411
22412  test -n "$READELF" && break
22413done
22414
22415  else
22416    # The variable is set, but is it from the command line or the environment?
22417
22418    # Try to remove the string !READELF! from our list.
22419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22421      # If it failed, the variable was not from the command line. Ignore it,
22422      # but warn the user (except for BASH, which is always set by the calling BASH).
22423      if test "xREADELF" != xBASH; then
22424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22425$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22426      fi
22427      # Try to locate tool using the code snippet
22428      for ac_prog in greadelf readelf
22429do
22430  # Extract the first word of "$ac_prog", so it can be a program name with args.
22431set dummy $ac_prog; ac_word=$2
22432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22433$as_echo_n "checking for $ac_word... " >&6; }
22434if ${ac_cv_path_READELF+:} false; then :
22435  $as_echo_n "(cached) " >&6
22436else
22437  case $READELF in
22438  [\\/]* | ?:[\\/]*)
22439  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22440  ;;
22441  *)
22442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22443for as_dir in $PATH
22444do
22445  IFS=$as_save_IFS
22446  test -z "$as_dir" && as_dir=.
22447    for ac_exec_ext in '' $ac_executable_extensions; do
22448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22449    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22451    break 2
22452  fi
22453done
22454  done
22455IFS=$as_save_IFS
22456
22457  ;;
22458esac
22459fi
22460READELF=$ac_cv_path_READELF
22461if test -n "$READELF"; then
22462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22463$as_echo "$READELF" >&6; }
22464else
22465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22466$as_echo "no" >&6; }
22467fi
22468
22469
22470  test -n "$READELF" && break
22471done
22472
22473    else
22474      # If it succeeded, then it was overridden by the user. We will use it
22475      # for the tool.
22476
22477      # First remove it from the list of overridden variables, so we can test
22478      # for unknown variables in the end.
22479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22480
22481      # Check if we try to supply an empty value
22482      if test "x$READELF" = x; then
22483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22484$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22486$as_echo_n "checking for READELF... " >&6; }
22487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22488$as_echo "disabled" >&6; }
22489      else
22490        # Check if the provided tool contains a complete path.
22491        tool_specified="$READELF"
22492        tool_basename="${tool_specified##*/}"
22493        if test "x$tool_basename" = "x$tool_specified"; then
22494          # A command without a complete path is provided, search $PATH.
22495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22496$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22497          # Extract the first word of "$tool_basename", so it can be a program name with args.
22498set dummy $tool_basename; ac_word=$2
22499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22500$as_echo_n "checking for $ac_word... " >&6; }
22501if ${ac_cv_path_READELF+:} false; then :
22502  $as_echo_n "(cached) " >&6
22503else
22504  case $READELF in
22505  [\\/]* | ?:[\\/]*)
22506  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22507  ;;
22508  *)
22509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22510for as_dir in $PATH
22511do
22512  IFS=$as_save_IFS
22513  test -z "$as_dir" && as_dir=.
22514    for ac_exec_ext in '' $ac_executable_extensions; do
22515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22516    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22518    break 2
22519  fi
22520done
22521  done
22522IFS=$as_save_IFS
22523
22524  ;;
22525esac
22526fi
22527READELF=$ac_cv_path_READELF
22528if test -n "$READELF"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22530$as_echo "$READELF" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536
22537          if test "x$READELF" = x; then
22538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22539          fi
22540        else
22541          # Otherwise we believe it is a complete path. Use it as it is.
22542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22543$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22545$as_echo_n "checking for READELF... " >&6; }
22546          if test ! -x "$tool_specified"; then
22547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22548$as_echo "not found" >&6; }
22549            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22550          fi
22551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22552$as_echo "$tool_specified" >&6; }
22553        fi
22554      fi
22555    fi
22556
22557  fi
22558
22559
22560
22561
22562  # Publish this variable in the help.
22563
22564
22565  if [ -z "${DOT+x}" ]; then
22566    # The variable is not set by user, try to locate tool using the code snippet
22567    for ac_prog in dot
22568do
22569  # Extract the first word of "$ac_prog", so it can be a program name with args.
22570set dummy $ac_prog; ac_word=$2
22571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22572$as_echo_n "checking for $ac_word... " >&6; }
22573if ${ac_cv_path_DOT+:} false; then :
22574  $as_echo_n "(cached) " >&6
22575else
22576  case $DOT in
22577  [\\/]* | ?:[\\/]*)
22578  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22579  ;;
22580  *)
22581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22582for as_dir in $PATH
22583do
22584  IFS=$as_save_IFS
22585  test -z "$as_dir" && as_dir=.
22586    for ac_exec_ext in '' $ac_executable_extensions; do
22587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22588    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22590    break 2
22591  fi
22592done
22593  done
22594IFS=$as_save_IFS
22595
22596  ;;
22597esac
22598fi
22599DOT=$ac_cv_path_DOT
22600if test -n "$DOT"; then
22601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22602$as_echo "$DOT" >&6; }
22603else
22604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22605$as_echo "no" >&6; }
22606fi
22607
22608
22609  test -n "$DOT" && break
22610done
22611
22612  else
22613    # The variable is set, but is it from the command line or the environment?
22614
22615    # Try to remove the string !DOT! from our list.
22616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22618      # If it failed, the variable was not from the command line. Ignore it,
22619      # but warn the user (except for BASH, which is always set by the calling BASH).
22620      if test "xDOT" != xBASH; then
22621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22622$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22623      fi
22624      # Try to locate tool using the code snippet
22625      for ac_prog in dot
22626do
22627  # Extract the first word of "$ac_prog", so it can be a program name with args.
22628set dummy $ac_prog; ac_word=$2
22629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22630$as_echo_n "checking for $ac_word... " >&6; }
22631if ${ac_cv_path_DOT+:} false; then :
22632  $as_echo_n "(cached) " >&6
22633else
22634  case $DOT in
22635  [\\/]* | ?:[\\/]*)
22636  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22637  ;;
22638  *)
22639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22640for as_dir in $PATH
22641do
22642  IFS=$as_save_IFS
22643  test -z "$as_dir" && as_dir=.
22644    for ac_exec_ext in '' $ac_executable_extensions; do
22645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22646    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22648    break 2
22649  fi
22650done
22651  done
22652IFS=$as_save_IFS
22653
22654  ;;
22655esac
22656fi
22657DOT=$ac_cv_path_DOT
22658if test -n "$DOT"; then
22659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22660$as_echo "$DOT" >&6; }
22661else
22662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22663$as_echo "no" >&6; }
22664fi
22665
22666
22667  test -n "$DOT" && break
22668done
22669
22670    else
22671      # If it succeeded, then it was overridden by the user. We will use it
22672      # for the tool.
22673
22674      # First remove it from the list of overridden variables, so we can test
22675      # for unknown variables in the end.
22676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22677
22678      # Check if we try to supply an empty value
22679      if test "x$DOT" = x; then
22680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22681$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22683$as_echo_n "checking for DOT... " >&6; }
22684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22685$as_echo "disabled" >&6; }
22686      else
22687        # Check if the provided tool contains a complete path.
22688        tool_specified="$DOT"
22689        tool_basename="${tool_specified##*/}"
22690        if test "x$tool_basename" = "x$tool_specified"; then
22691          # A command without a complete path is provided, search $PATH.
22692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22693$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22694          # Extract the first word of "$tool_basename", so it can be a program name with args.
22695set dummy $tool_basename; ac_word=$2
22696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22697$as_echo_n "checking for $ac_word... " >&6; }
22698if ${ac_cv_path_DOT+:} false; then :
22699  $as_echo_n "(cached) " >&6
22700else
22701  case $DOT in
22702  [\\/]* | ?:[\\/]*)
22703  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22704  ;;
22705  *)
22706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22707for as_dir in $PATH
22708do
22709  IFS=$as_save_IFS
22710  test -z "$as_dir" && as_dir=.
22711    for ac_exec_ext in '' $ac_executable_extensions; do
22712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22713    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22715    break 2
22716  fi
22717done
22718  done
22719IFS=$as_save_IFS
22720
22721  ;;
22722esac
22723fi
22724DOT=$ac_cv_path_DOT
22725if test -n "$DOT"; then
22726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22727$as_echo "$DOT" >&6; }
22728else
22729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22730$as_echo "no" >&6; }
22731fi
22732
22733
22734          if test "x$DOT" = x; then
22735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22736          fi
22737        else
22738          # Otherwise we believe it is a complete path. Use it as it is.
22739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22740$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22742$as_echo_n "checking for DOT... " >&6; }
22743          if test ! -x "$tool_specified"; then
22744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22745$as_echo "not found" >&6; }
22746            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22747          fi
22748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22749$as_echo "$tool_specified" >&6; }
22750        fi
22751      fi
22752    fi
22753
22754  fi
22755
22756
22757
22758
22759  # Publish this variable in the help.
22760
22761
22762  if [ -z "${HG+x}" ]; then
22763    # The variable is not set by user, try to locate tool using the code snippet
22764    for ac_prog in hg
22765do
22766  # Extract the first word of "$ac_prog", so it can be a program name with args.
22767set dummy $ac_prog; ac_word=$2
22768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22769$as_echo_n "checking for $ac_word... " >&6; }
22770if ${ac_cv_path_HG+:} false; then :
22771  $as_echo_n "(cached) " >&6
22772else
22773  case $HG in
22774  [\\/]* | ?:[\\/]*)
22775  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22776  ;;
22777  *)
22778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22779for as_dir in $PATH
22780do
22781  IFS=$as_save_IFS
22782  test -z "$as_dir" && as_dir=.
22783    for ac_exec_ext in '' $ac_executable_extensions; do
22784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22785    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22787    break 2
22788  fi
22789done
22790  done
22791IFS=$as_save_IFS
22792
22793  ;;
22794esac
22795fi
22796HG=$ac_cv_path_HG
22797if test -n "$HG"; then
22798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22799$as_echo "$HG" >&6; }
22800else
22801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22802$as_echo "no" >&6; }
22803fi
22804
22805
22806  test -n "$HG" && break
22807done
22808
22809  else
22810    # The variable is set, but is it from the command line or the environment?
22811
22812    # Try to remove the string !HG! from our list.
22813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22815      # If it failed, the variable was not from the command line. Ignore it,
22816      # but warn the user (except for BASH, which is always set by the calling BASH).
22817      if test "xHG" != xBASH; then
22818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22819$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22820      fi
22821      # Try to locate tool using the code snippet
22822      for ac_prog in hg
22823do
22824  # Extract the first word of "$ac_prog", so it can be a program name with args.
22825set dummy $ac_prog; ac_word=$2
22826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22827$as_echo_n "checking for $ac_word... " >&6; }
22828if ${ac_cv_path_HG+:} false; then :
22829  $as_echo_n "(cached) " >&6
22830else
22831  case $HG in
22832  [\\/]* | ?:[\\/]*)
22833  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22834  ;;
22835  *)
22836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22837for as_dir in $PATH
22838do
22839  IFS=$as_save_IFS
22840  test -z "$as_dir" && as_dir=.
22841    for ac_exec_ext in '' $ac_executable_extensions; do
22842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22843    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22845    break 2
22846  fi
22847done
22848  done
22849IFS=$as_save_IFS
22850
22851  ;;
22852esac
22853fi
22854HG=$ac_cv_path_HG
22855if test -n "$HG"; then
22856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22857$as_echo "$HG" >&6; }
22858else
22859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22860$as_echo "no" >&6; }
22861fi
22862
22863
22864  test -n "$HG" && break
22865done
22866
22867    else
22868      # If it succeeded, then it was overridden by the user. We will use it
22869      # for the tool.
22870
22871      # First remove it from the list of overridden variables, so we can test
22872      # for unknown variables in the end.
22873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22874
22875      # Check if we try to supply an empty value
22876      if test "x$HG" = x; then
22877        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22878$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22880$as_echo_n "checking for HG... " >&6; }
22881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22882$as_echo "disabled" >&6; }
22883      else
22884        # Check if the provided tool contains a complete path.
22885        tool_specified="$HG"
22886        tool_basename="${tool_specified##*/}"
22887        if test "x$tool_basename" = "x$tool_specified"; then
22888          # A command without a complete path is provided, search $PATH.
22889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22890$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22891          # Extract the first word of "$tool_basename", so it can be a program name with args.
22892set dummy $tool_basename; ac_word=$2
22893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22894$as_echo_n "checking for $ac_word... " >&6; }
22895if ${ac_cv_path_HG+:} false; then :
22896  $as_echo_n "(cached) " >&6
22897else
22898  case $HG in
22899  [\\/]* | ?:[\\/]*)
22900  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22901  ;;
22902  *)
22903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22904for as_dir in $PATH
22905do
22906  IFS=$as_save_IFS
22907  test -z "$as_dir" && as_dir=.
22908    for ac_exec_ext in '' $ac_executable_extensions; do
22909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22910    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22912    break 2
22913  fi
22914done
22915  done
22916IFS=$as_save_IFS
22917
22918  ;;
22919esac
22920fi
22921HG=$ac_cv_path_HG
22922if test -n "$HG"; then
22923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22924$as_echo "$HG" >&6; }
22925else
22926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22927$as_echo "no" >&6; }
22928fi
22929
22930
22931          if test "x$HG" = x; then
22932            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22933          fi
22934        else
22935          # Otherwise we believe it is a complete path. Use it as it is.
22936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22937$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22938          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22939$as_echo_n "checking for HG... " >&6; }
22940          if test ! -x "$tool_specified"; then
22941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22942$as_echo "not found" >&6; }
22943            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22944          fi
22945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22946$as_echo "$tool_specified" >&6; }
22947        fi
22948      fi
22949    fi
22950
22951  fi
22952
22953
22954
22955
22956  # Publish this variable in the help.
22957
22958
22959  if [ -z "${STAT+x}" ]; then
22960    # The variable is not set by user, try to locate tool using the code snippet
22961    for ac_prog in stat
22962do
22963  # Extract the first word of "$ac_prog", so it can be a program name with args.
22964set dummy $ac_prog; ac_word=$2
22965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22966$as_echo_n "checking for $ac_word... " >&6; }
22967if ${ac_cv_path_STAT+:} false; then :
22968  $as_echo_n "(cached) " >&6
22969else
22970  case $STAT in
22971  [\\/]* | ?:[\\/]*)
22972  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22973  ;;
22974  *)
22975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22976for as_dir in $PATH
22977do
22978  IFS=$as_save_IFS
22979  test -z "$as_dir" && as_dir=.
22980    for ac_exec_ext in '' $ac_executable_extensions; do
22981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22982    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22984    break 2
22985  fi
22986done
22987  done
22988IFS=$as_save_IFS
22989
22990  ;;
22991esac
22992fi
22993STAT=$ac_cv_path_STAT
22994if test -n "$STAT"; then
22995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22996$as_echo "$STAT" >&6; }
22997else
22998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22999$as_echo "no" >&6; }
23000fi
23001
23002
23003  test -n "$STAT" && break
23004done
23005
23006  else
23007    # The variable is set, but is it from the command line or the environment?
23008
23009    # Try to remove the string !STAT! from our list.
23010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
23011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23012      # If it failed, the variable was not from the command line. Ignore it,
23013      # but warn the user (except for BASH, which is always set by the calling BASH).
23014      if test "xSTAT" != xBASH; then
23015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
23016$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
23017      fi
23018      # Try to locate tool using the code snippet
23019      for ac_prog in stat
23020do
23021  # Extract the first word of "$ac_prog", so it can be a program name with args.
23022set dummy $ac_prog; ac_word=$2
23023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23024$as_echo_n "checking for $ac_word... " >&6; }
23025if ${ac_cv_path_STAT+:} false; then :
23026  $as_echo_n "(cached) " >&6
23027else
23028  case $STAT in
23029  [\\/]* | ?:[\\/]*)
23030  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23031  ;;
23032  *)
23033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23034for as_dir in $PATH
23035do
23036  IFS=$as_save_IFS
23037  test -z "$as_dir" && as_dir=.
23038    for ac_exec_ext in '' $ac_executable_extensions; do
23039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23040    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23042    break 2
23043  fi
23044done
23045  done
23046IFS=$as_save_IFS
23047
23048  ;;
23049esac
23050fi
23051STAT=$ac_cv_path_STAT
23052if test -n "$STAT"; then
23053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23054$as_echo "$STAT" >&6; }
23055else
23056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23057$as_echo "no" >&6; }
23058fi
23059
23060
23061  test -n "$STAT" && break
23062done
23063
23064    else
23065      # If it succeeded, then it was overridden by the user. We will use it
23066      # for the tool.
23067
23068      # First remove it from the list of overridden variables, so we can test
23069      # for unknown variables in the end.
23070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23071
23072      # Check if we try to supply an empty value
23073      if test "x$STAT" = x; then
23074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23075$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23077$as_echo_n "checking for STAT... " >&6; }
23078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23079$as_echo "disabled" >&6; }
23080      else
23081        # Check if the provided tool contains a complete path.
23082        tool_specified="$STAT"
23083        tool_basename="${tool_specified##*/}"
23084        if test "x$tool_basename" = "x$tool_specified"; then
23085          # A command without a complete path is provided, search $PATH.
23086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23087$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23088          # Extract the first word of "$tool_basename", so it can be a program name with args.
23089set dummy $tool_basename; ac_word=$2
23090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23091$as_echo_n "checking for $ac_word... " >&6; }
23092if ${ac_cv_path_STAT+:} false; then :
23093  $as_echo_n "(cached) " >&6
23094else
23095  case $STAT in
23096  [\\/]* | ?:[\\/]*)
23097  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23098  ;;
23099  *)
23100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23101for as_dir in $PATH
23102do
23103  IFS=$as_save_IFS
23104  test -z "$as_dir" && as_dir=.
23105    for ac_exec_ext in '' $ac_executable_extensions; do
23106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23107    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23109    break 2
23110  fi
23111done
23112  done
23113IFS=$as_save_IFS
23114
23115  ;;
23116esac
23117fi
23118STAT=$ac_cv_path_STAT
23119if test -n "$STAT"; then
23120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23121$as_echo "$STAT" >&6; }
23122else
23123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23124$as_echo "no" >&6; }
23125fi
23126
23127
23128          if test "x$STAT" = x; then
23129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23130          fi
23131        else
23132          # Otherwise we believe it is a complete path. Use it as it is.
23133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23134$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23136$as_echo_n "checking for STAT... " >&6; }
23137          if test ! -x "$tool_specified"; then
23138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23139$as_echo "not found" >&6; }
23140            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23141          fi
23142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23143$as_echo "$tool_specified" >&6; }
23144        fi
23145      fi
23146    fi
23147
23148  fi
23149
23150
23151
23152
23153  # Publish this variable in the help.
23154
23155
23156  if [ -z "${TIME+x}" ]; then
23157    # The variable is not set by user, try to locate tool using the code snippet
23158    for ac_prog in time
23159do
23160  # Extract the first word of "$ac_prog", so it can be a program name with args.
23161set dummy $ac_prog; ac_word=$2
23162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23163$as_echo_n "checking for $ac_word... " >&6; }
23164if ${ac_cv_path_TIME+:} false; then :
23165  $as_echo_n "(cached) " >&6
23166else
23167  case $TIME in
23168  [\\/]* | ?:[\\/]*)
23169  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23170  ;;
23171  *)
23172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23173for as_dir in $PATH
23174do
23175  IFS=$as_save_IFS
23176  test -z "$as_dir" && as_dir=.
23177    for ac_exec_ext in '' $ac_executable_extensions; do
23178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23179    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23181    break 2
23182  fi
23183done
23184  done
23185IFS=$as_save_IFS
23186
23187  ;;
23188esac
23189fi
23190TIME=$ac_cv_path_TIME
23191if test -n "$TIME"; then
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23193$as_echo "$TIME" >&6; }
23194else
23195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23196$as_echo "no" >&6; }
23197fi
23198
23199
23200  test -n "$TIME" && break
23201done
23202
23203  else
23204    # The variable is set, but is it from the command line or the environment?
23205
23206    # Try to remove the string !TIME! from our list.
23207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23209      # If it failed, the variable was not from the command line. Ignore it,
23210      # but warn the user (except for BASH, which is always set by the calling BASH).
23211      if test "xTIME" != xBASH; then
23212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23213$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23214      fi
23215      # Try to locate tool using the code snippet
23216      for ac_prog in time
23217do
23218  # Extract the first word of "$ac_prog", so it can be a program name with args.
23219set dummy $ac_prog; ac_word=$2
23220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23221$as_echo_n "checking for $ac_word... " >&6; }
23222if ${ac_cv_path_TIME+:} false; then :
23223  $as_echo_n "(cached) " >&6
23224else
23225  case $TIME in
23226  [\\/]* | ?:[\\/]*)
23227  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23228  ;;
23229  *)
23230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23231for as_dir in $PATH
23232do
23233  IFS=$as_save_IFS
23234  test -z "$as_dir" && as_dir=.
23235    for ac_exec_ext in '' $ac_executable_extensions; do
23236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23237    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23239    break 2
23240  fi
23241done
23242  done
23243IFS=$as_save_IFS
23244
23245  ;;
23246esac
23247fi
23248TIME=$ac_cv_path_TIME
23249if test -n "$TIME"; then
23250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23251$as_echo "$TIME" >&6; }
23252else
23253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23254$as_echo "no" >&6; }
23255fi
23256
23257
23258  test -n "$TIME" && break
23259done
23260
23261    else
23262      # If it succeeded, then it was overridden by the user. We will use it
23263      # for the tool.
23264
23265      # First remove it from the list of overridden variables, so we can test
23266      # for unknown variables in the end.
23267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23268
23269      # Check if we try to supply an empty value
23270      if test "x$TIME" = x; then
23271        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23272$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23274$as_echo_n "checking for TIME... " >&6; }
23275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23276$as_echo "disabled" >&6; }
23277      else
23278        # Check if the provided tool contains a complete path.
23279        tool_specified="$TIME"
23280        tool_basename="${tool_specified##*/}"
23281        if test "x$tool_basename" = "x$tool_specified"; then
23282          # A command without a complete path is provided, search $PATH.
23283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23284$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23285          # Extract the first word of "$tool_basename", so it can be a program name with args.
23286set dummy $tool_basename; ac_word=$2
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23288$as_echo_n "checking for $ac_word... " >&6; }
23289if ${ac_cv_path_TIME+:} false; then :
23290  $as_echo_n "(cached) " >&6
23291else
23292  case $TIME in
23293  [\\/]* | ?:[\\/]*)
23294  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23295  ;;
23296  *)
23297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23298for as_dir in $PATH
23299do
23300  IFS=$as_save_IFS
23301  test -z "$as_dir" && as_dir=.
23302    for ac_exec_ext in '' $ac_executable_extensions; do
23303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23304    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23306    break 2
23307  fi
23308done
23309  done
23310IFS=$as_save_IFS
23311
23312  ;;
23313esac
23314fi
23315TIME=$ac_cv_path_TIME
23316if test -n "$TIME"; then
23317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23318$as_echo "$TIME" >&6; }
23319else
23320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23321$as_echo "no" >&6; }
23322fi
23323
23324
23325          if test "x$TIME" = x; then
23326            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23327          fi
23328        else
23329          # Otherwise we believe it is a complete path. Use it as it is.
23330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23331$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23333$as_echo_n "checking for TIME... " >&6; }
23334          if test ! -x "$tool_specified"; then
23335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23336$as_echo "not found" >&6; }
23337            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23338          fi
23339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23340$as_echo "$tool_specified" >&6; }
23341        fi
23342      fi
23343    fi
23344
23345  fi
23346
23347
23348
23349
23350  # Publish this variable in the help.
23351
23352
23353  if [ -z "${FLOCK+x}" ]; then
23354    # The variable is not set by user, try to locate tool using the code snippet
23355    for ac_prog in flock
23356do
23357  # Extract the first word of "$ac_prog", so it can be a program name with args.
23358set dummy $ac_prog; ac_word=$2
23359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23360$as_echo_n "checking for $ac_word... " >&6; }
23361if ${ac_cv_path_FLOCK+:} false; then :
23362  $as_echo_n "(cached) " >&6
23363else
23364  case $FLOCK in
23365  [\\/]* | ?:[\\/]*)
23366  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23367  ;;
23368  *)
23369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23370for as_dir in $PATH
23371do
23372  IFS=$as_save_IFS
23373  test -z "$as_dir" && as_dir=.
23374    for ac_exec_ext in '' $ac_executable_extensions; do
23375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23376    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23378    break 2
23379  fi
23380done
23381  done
23382IFS=$as_save_IFS
23383
23384  ;;
23385esac
23386fi
23387FLOCK=$ac_cv_path_FLOCK
23388if test -n "$FLOCK"; then
23389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23390$as_echo "$FLOCK" >&6; }
23391else
23392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23393$as_echo "no" >&6; }
23394fi
23395
23396
23397  test -n "$FLOCK" && break
23398done
23399
23400  else
23401    # The variable is set, but is it from the command line or the environment?
23402
23403    # Try to remove the string !FLOCK! from our list.
23404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23406      # If it failed, the variable was not from the command line. Ignore it,
23407      # but warn the user (except for BASH, which is always set by the calling BASH).
23408      if test "xFLOCK" != xBASH; then
23409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23410$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23411      fi
23412      # Try to locate tool using the code snippet
23413      for ac_prog in flock
23414do
23415  # Extract the first word of "$ac_prog", so it can be a program name with args.
23416set dummy $ac_prog; ac_word=$2
23417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23418$as_echo_n "checking for $ac_word... " >&6; }
23419if ${ac_cv_path_FLOCK+:} false; then :
23420  $as_echo_n "(cached) " >&6
23421else
23422  case $FLOCK in
23423  [\\/]* | ?:[\\/]*)
23424  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23425  ;;
23426  *)
23427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23428for as_dir in $PATH
23429do
23430  IFS=$as_save_IFS
23431  test -z "$as_dir" && as_dir=.
23432    for ac_exec_ext in '' $ac_executable_extensions; do
23433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23434    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23436    break 2
23437  fi
23438done
23439  done
23440IFS=$as_save_IFS
23441
23442  ;;
23443esac
23444fi
23445FLOCK=$ac_cv_path_FLOCK
23446if test -n "$FLOCK"; then
23447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23448$as_echo "$FLOCK" >&6; }
23449else
23450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23451$as_echo "no" >&6; }
23452fi
23453
23454
23455  test -n "$FLOCK" && break
23456done
23457
23458    else
23459      # If it succeeded, then it was overridden by the user. We will use it
23460      # for the tool.
23461
23462      # First remove it from the list of overridden variables, so we can test
23463      # for unknown variables in the end.
23464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23465
23466      # Check if we try to supply an empty value
23467      if test "x$FLOCK" = x; then
23468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23469$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23471$as_echo_n "checking for FLOCK... " >&6; }
23472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23473$as_echo "disabled" >&6; }
23474      else
23475        # Check if the provided tool contains a complete path.
23476        tool_specified="$FLOCK"
23477        tool_basename="${tool_specified##*/}"
23478        if test "x$tool_basename" = "x$tool_specified"; then
23479          # A command without a complete path is provided, search $PATH.
23480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23481$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23482          # Extract the first word of "$tool_basename", so it can be a program name with args.
23483set dummy $tool_basename; ac_word=$2
23484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23485$as_echo_n "checking for $ac_word... " >&6; }
23486if ${ac_cv_path_FLOCK+:} false; then :
23487  $as_echo_n "(cached) " >&6
23488else
23489  case $FLOCK in
23490  [\\/]* | ?:[\\/]*)
23491  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23492  ;;
23493  *)
23494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23495for as_dir in $PATH
23496do
23497  IFS=$as_save_IFS
23498  test -z "$as_dir" && as_dir=.
23499    for ac_exec_ext in '' $ac_executable_extensions; do
23500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23501    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23503    break 2
23504  fi
23505done
23506  done
23507IFS=$as_save_IFS
23508
23509  ;;
23510esac
23511fi
23512FLOCK=$ac_cv_path_FLOCK
23513if test -n "$FLOCK"; then
23514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23515$as_echo "$FLOCK" >&6; }
23516else
23517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23518$as_echo "no" >&6; }
23519fi
23520
23521
23522          if test "x$FLOCK" = x; then
23523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23524          fi
23525        else
23526          # Otherwise we believe it is a complete path. Use it as it is.
23527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23528$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23530$as_echo_n "checking for FLOCK... " >&6; }
23531          if test ! -x "$tool_specified"; then
23532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23533$as_echo "not found" >&6; }
23534            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23535          fi
23536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23537$as_echo "$tool_specified" >&6; }
23538        fi
23539      fi
23540    fi
23541
23542  fi
23543
23544
23545  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23546  # be in the user path.
23547
23548
23549  # Publish this variable in the help.
23550
23551
23552  if [ -z "${DTRACE+x}" ]; then
23553    # The variable is not set by user, try to locate tool using the code snippet
23554    for ac_prog in dtrace
23555do
23556  # Extract the first word of "$ac_prog", so it can be a program name with args.
23557set dummy $ac_prog; ac_word=$2
23558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23559$as_echo_n "checking for $ac_word... " >&6; }
23560if ${ac_cv_path_DTRACE+:} false; then :
23561  $as_echo_n "(cached) " >&6
23562else
23563  case $DTRACE in
23564  [\\/]* | ?:[\\/]*)
23565  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23566  ;;
23567  *)
23568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23569as_dummy="$PATH:/usr/sbin"
23570for as_dir in $as_dummy
23571do
23572  IFS=$as_save_IFS
23573  test -z "$as_dir" && as_dir=.
23574    for ac_exec_ext in '' $ac_executable_extensions; do
23575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23576    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23578    break 2
23579  fi
23580done
23581  done
23582IFS=$as_save_IFS
23583
23584  ;;
23585esac
23586fi
23587DTRACE=$ac_cv_path_DTRACE
23588if test -n "$DTRACE"; then
23589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23590$as_echo "$DTRACE" >&6; }
23591else
23592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23593$as_echo "no" >&6; }
23594fi
23595
23596
23597  test -n "$DTRACE" && break
23598done
23599
23600  else
23601    # The variable is set, but is it from the command line or the environment?
23602
23603    # Try to remove the string !DTRACE! from our list.
23604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23606      # If it failed, the variable was not from the command line. Ignore it,
23607      # but warn the user (except for BASH, which is always set by the calling BASH).
23608      if test "xDTRACE" != xBASH; then
23609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23610$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23611      fi
23612      # Try to locate tool using the code snippet
23613      for ac_prog in dtrace
23614do
23615  # Extract the first word of "$ac_prog", so it can be a program name with args.
23616set dummy $ac_prog; ac_word=$2
23617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23618$as_echo_n "checking for $ac_word... " >&6; }
23619if ${ac_cv_path_DTRACE+:} false; then :
23620  $as_echo_n "(cached) " >&6
23621else
23622  case $DTRACE in
23623  [\\/]* | ?:[\\/]*)
23624  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23625  ;;
23626  *)
23627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23628as_dummy="$PATH:/usr/sbin"
23629for as_dir in $as_dummy
23630do
23631  IFS=$as_save_IFS
23632  test -z "$as_dir" && as_dir=.
23633    for ac_exec_ext in '' $ac_executable_extensions; do
23634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23635    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23637    break 2
23638  fi
23639done
23640  done
23641IFS=$as_save_IFS
23642
23643  ;;
23644esac
23645fi
23646DTRACE=$ac_cv_path_DTRACE
23647if test -n "$DTRACE"; then
23648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23649$as_echo "$DTRACE" >&6; }
23650else
23651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23652$as_echo "no" >&6; }
23653fi
23654
23655
23656  test -n "$DTRACE" && break
23657done
23658
23659    else
23660      # If it succeeded, then it was overridden by the user. We will use it
23661      # for the tool.
23662
23663      # First remove it from the list of overridden variables, so we can test
23664      # for unknown variables in the end.
23665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23666
23667      # Check if we try to supply an empty value
23668      if test "x$DTRACE" = x; then
23669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23670$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23672$as_echo_n "checking for DTRACE... " >&6; }
23673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23674$as_echo "disabled" >&6; }
23675      else
23676        # Check if the provided tool contains a complete path.
23677        tool_specified="$DTRACE"
23678        tool_basename="${tool_specified##*/}"
23679        if test "x$tool_basename" = "x$tool_specified"; then
23680          # A command without a complete path is provided, search $PATH.
23681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23682$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23683          # Extract the first word of "$tool_basename", so it can be a program name with args.
23684set dummy $tool_basename; ac_word=$2
23685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23686$as_echo_n "checking for $ac_word... " >&6; }
23687if ${ac_cv_path_DTRACE+:} false; then :
23688  $as_echo_n "(cached) " >&6
23689else
23690  case $DTRACE in
23691  [\\/]* | ?:[\\/]*)
23692  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23693  ;;
23694  *)
23695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23696for as_dir in $PATH
23697do
23698  IFS=$as_save_IFS
23699  test -z "$as_dir" && as_dir=.
23700    for ac_exec_ext in '' $ac_executable_extensions; do
23701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23702    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23704    break 2
23705  fi
23706done
23707  done
23708IFS=$as_save_IFS
23709
23710  ;;
23711esac
23712fi
23713DTRACE=$ac_cv_path_DTRACE
23714if test -n "$DTRACE"; then
23715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23716$as_echo "$DTRACE" >&6; }
23717else
23718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23719$as_echo "no" >&6; }
23720fi
23721
23722
23723          if test "x$DTRACE" = x; then
23724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23725          fi
23726        else
23727          # Otherwise we believe it is a complete path. Use it as it is.
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23729$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23731$as_echo_n "checking for DTRACE... " >&6; }
23732          if test ! -x "$tool_specified"; then
23733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23734$as_echo "not found" >&6; }
23735            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23736          fi
23737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23738$as_echo "$tool_specified" >&6; }
23739        fi
23740      fi
23741    fi
23742
23743  fi
23744
23745
23746
23747
23748  # Publish this variable in the help.
23749
23750
23751  if [ -z "${PATCH+x}" ]; then
23752    # The variable is not set by user, try to locate tool using the code snippet
23753    for ac_prog in gpatch patch
23754do
23755  # Extract the first word of "$ac_prog", so it can be a program name with args.
23756set dummy $ac_prog; ac_word=$2
23757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23758$as_echo_n "checking for $ac_word... " >&6; }
23759if ${ac_cv_path_PATCH+:} false; then :
23760  $as_echo_n "(cached) " >&6
23761else
23762  case $PATCH in
23763  [\\/]* | ?:[\\/]*)
23764  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23765  ;;
23766  *)
23767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23768for as_dir in $PATH
23769do
23770  IFS=$as_save_IFS
23771  test -z "$as_dir" && as_dir=.
23772    for ac_exec_ext in '' $ac_executable_extensions; do
23773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23774    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23776    break 2
23777  fi
23778done
23779  done
23780IFS=$as_save_IFS
23781
23782  ;;
23783esac
23784fi
23785PATCH=$ac_cv_path_PATCH
23786if test -n "$PATCH"; then
23787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23788$as_echo "$PATCH" >&6; }
23789else
23790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23791$as_echo "no" >&6; }
23792fi
23793
23794
23795  test -n "$PATCH" && break
23796done
23797
23798  else
23799    # The variable is set, but is it from the command line or the environment?
23800
23801    # Try to remove the string !PATCH! from our list.
23802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23804      # If it failed, the variable was not from the command line. Ignore it,
23805      # but warn the user (except for BASH, which is always set by the calling BASH).
23806      if test "xPATCH" != xBASH; then
23807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23808$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23809      fi
23810      # Try to locate tool using the code snippet
23811      for ac_prog in gpatch patch
23812do
23813  # Extract the first word of "$ac_prog", so it can be a program name with args.
23814set dummy $ac_prog; ac_word=$2
23815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23816$as_echo_n "checking for $ac_word... " >&6; }
23817if ${ac_cv_path_PATCH+:} false; then :
23818  $as_echo_n "(cached) " >&6
23819else
23820  case $PATCH in
23821  [\\/]* | ?:[\\/]*)
23822  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23823  ;;
23824  *)
23825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23826for as_dir in $PATH
23827do
23828  IFS=$as_save_IFS
23829  test -z "$as_dir" && as_dir=.
23830    for ac_exec_ext in '' $ac_executable_extensions; do
23831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23832    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23834    break 2
23835  fi
23836done
23837  done
23838IFS=$as_save_IFS
23839
23840  ;;
23841esac
23842fi
23843PATCH=$ac_cv_path_PATCH
23844if test -n "$PATCH"; then
23845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23846$as_echo "$PATCH" >&6; }
23847else
23848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23849$as_echo "no" >&6; }
23850fi
23851
23852
23853  test -n "$PATCH" && break
23854done
23855
23856    else
23857      # If it succeeded, then it was overridden by the user. We will use it
23858      # for the tool.
23859
23860      # First remove it from the list of overridden variables, so we can test
23861      # for unknown variables in the end.
23862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23863
23864      # Check if we try to supply an empty value
23865      if test "x$PATCH" = x; then
23866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23867$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23869$as_echo_n "checking for PATCH... " >&6; }
23870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23871$as_echo "disabled" >&6; }
23872      else
23873        # Check if the provided tool contains a complete path.
23874        tool_specified="$PATCH"
23875        tool_basename="${tool_specified##*/}"
23876        if test "x$tool_basename" = "x$tool_specified"; then
23877          # A command without a complete path is provided, search $PATH.
23878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23879$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23880          # Extract the first word of "$tool_basename", so it can be a program name with args.
23881set dummy $tool_basename; ac_word=$2
23882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23883$as_echo_n "checking for $ac_word... " >&6; }
23884if ${ac_cv_path_PATCH+:} false; then :
23885  $as_echo_n "(cached) " >&6
23886else
23887  case $PATCH in
23888  [\\/]* | ?:[\\/]*)
23889  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23890  ;;
23891  *)
23892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23893for as_dir in $PATH
23894do
23895  IFS=$as_save_IFS
23896  test -z "$as_dir" && as_dir=.
23897    for ac_exec_ext in '' $ac_executable_extensions; do
23898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23899    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23901    break 2
23902  fi
23903done
23904  done
23905IFS=$as_save_IFS
23906
23907  ;;
23908esac
23909fi
23910PATCH=$ac_cv_path_PATCH
23911if test -n "$PATCH"; then
23912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23913$as_echo "$PATCH" >&6; }
23914else
23915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23916$as_echo "no" >&6; }
23917fi
23918
23919
23920          if test "x$PATCH" = x; then
23921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23922          fi
23923        else
23924          # Otherwise we believe it is a complete path. Use it as it is.
23925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23926$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23928$as_echo_n "checking for PATCH... " >&6; }
23929          if test ! -x "$tool_specified"; then
23930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23931$as_echo "not found" >&6; }
23932            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23933          fi
23934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23935$as_echo "$tool_specified" >&6; }
23936        fi
23937      fi
23938    fi
23939
23940  fi
23941
23942
23943  # Check if it's GNU time
23944  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23945  if test "x$IS_GNU_TIME" != x; then
23946    IS_GNU_TIME=yes
23947  else
23948    IS_GNU_TIME=no
23949  fi
23950
23951
23952  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23953
23954
23955
23956  # Publish this variable in the help.
23957
23958
23959  if [ -z "${DSYMUTIL+x}" ]; then
23960    # The variable is not set by user, try to locate tool using the code snippet
23961    for ac_prog in dsymutil
23962do
23963  # Extract the first word of "$ac_prog", so it can be a program name with args.
23964set dummy $ac_prog; ac_word=$2
23965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23966$as_echo_n "checking for $ac_word... " >&6; }
23967if ${ac_cv_path_DSYMUTIL+:} false; then :
23968  $as_echo_n "(cached) " >&6
23969else
23970  case $DSYMUTIL in
23971  [\\/]* | ?:[\\/]*)
23972  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23973  ;;
23974  *)
23975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23976for as_dir in $PATH
23977do
23978  IFS=$as_save_IFS
23979  test -z "$as_dir" && as_dir=.
23980    for ac_exec_ext in '' $ac_executable_extensions; do
23981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23982    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23984    break 2
23985  fi
23986done
23987  done
23988IFS=$as_save_IFS
23989
23990  ;;
23991esac
23992fi
23993DSYMUTIL=$ac_cv_path_DSYMUTIL
23994if test -n "$DSYMUTIL"; then
23995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23996$as_echo "$DSYMUTIL" >&6; }
23997else
23998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23999$as_echo "no" >&6; }
24000fi
24001
24002
24003  test -n "$DSYMUTIL" && break
24004done
24005
24006  else
24007    # The variable is set, but is it from the command line or the environment?
24008
24009    # Try to remove the string !DSYMUTIL! from our list.
24010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
24011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24012      # If it failed, the variable was not from the command line. Ignore it,
24013      # but warn the user (except for BASH, which is always set by the calling BASH).
24014      if test "xDSYMUTIL" != xBASH; then
24015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
24016$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
24017      fi
24018      # Try to locate tool using the code snippet
24019      for ac_prog in dsymutil
24020do
24021  # Extract the first word of "$ac_prog", so it can be a program name with args.
24022set dummy $ac_prog; ac_word=$2
24023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24024$as_echo_n "checking for $ac_word... " >&6; }
24025if ${ac_cv_path_DSYMUTIL+:} false; then :
24026  $as_echo_n "(cached) " >&6
24027else
24028  case $DSYMUTIL in
24029  [\\/]* | ?:[\\/]*)
24030  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24031  ;;
24032  *)
24033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24034for as_dir in $PATH
24035do
24036  IFS=$as_save_IFS
24037  test -z "$as_dir" && as_dir=.
24038    for ac_exec_ext in '' $ac_executable_extensions; do
24039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24040    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24042    break 2
24043  fi
24044done
24045  done
24046IFS=$as_save_IFS
24047
24048  ;;
24049esac
24050fi
24051DSYMUTIL=$ac_cv_path_DSYMUTIL
24052if test -n "$DSYMUTIL"; then
24053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24054$as_echo "$DSYMUTIL" >&6; }
24055else
24056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24057$as_echo "no" >&6; }
24058fi
24059
24060
24061  test -n "$DSYMUTIL" && break
24062done
24063
24064    else
24065      # If it succeeded, then it was overridden by the user. We will use it
24066      # for the tool.
24067
24068      # First remove it from the list of overridden variables, so we can test
24069      # for unknown variables in the end.
24070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24071
24072      # Check if we try to supply an empty value
24073      if test "x$DSYMUTIL" = x; then
24074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24075$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24077$as_echo_n "checking for DSYMUTIL... " >&6; }
24078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24079$as_echo "disabled" >&6; }
24080      else
24081        # Check if the provided tool contains a complete path.
24082        tool_specified="$DSYMUTIL"
24083        tool_basename="${tool_specified##*/}"
24084        if test "x$tool_basename" = "x$tool_specified"; then
24085          # A command without a complete path is provided, search $PATH.
24086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24087$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24088          # Extract the first word of "$tool_basename", so it can be a program name with args.
24089set dummy $tool_basename; ac_word=$2
24090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24091$as_echo_n "checking for $ac_word... " >&6; }
24092if ${ac_cv_path_DSYMUTIL+:} false; then :
24093  $as_echo_n "(cached) " >&6
24094else
24095  case $DSYMUTIL in
24096  [\\/]* | ?:[\\/]*)
24097  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24098  ;;
24099  *)
24100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24101for as_dir in $PATH
24102do
24103  IFS=$as_save_IFS
24104  test -z "$as_dir" && as_dir=.
24105    for ac_exec_ext in '' $ac_executable_extensions; do
24106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24107    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24109    break 2
24110  fi
24111done
24112  done
24113IFS=$as_save_IFS
24114
24115  ;;
24116esac
24117fi
24118DSYMUTIL=$ac_cv_path_DSYMUTIL
24119if test -n "$DSYMUTIL"; then
24120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24121$as_echo "$DSYMUTIL" >&6; }
24122else
24123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24124$as_echo "no" >&6; }
24125fi
24126
24127
24128          if test "x$DSYMUTIL" = x; then
24129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24130          fi
24131        else
24132          # Otherwise we believe it is a complete path. Use it as it is.
24133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24134$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24136$as_echo_n "checking for DSYMUTIL... " >&6; }
24137          if test ! -x "$tool_specified"; then
24138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24139$as_echo "not found" >&6; }
24140            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24141          fi
24142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24143$as_echo "$tool_specified" >&6; }
24144        fi
24145      fi
24146    fi
24147
24148  fi
24149
24150
24151
24152  if test "x$DSYMUTIL" = x; then
24153    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24154  fi
24155
24156
24157
24158
24159
24160  # Publish this variable in the help.
24161
24162
24163  if [ -z "${XATTR+x}" ]; then
24164    # The variable is not set by user, try to locate tool using the code snippet
24165    for ac_prog in xattr
24166do
24167  # Extract the first word of "$ac_prog", so it can be a program name with args.
24168set dummy $ac_prog; ac_word=$2
24169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24170$as_echo_n "checking for $ac_word... " >&6; }
24171if ${ac_cv_path_XATTR+:} false; then :
24172  $as_echo_n "(cached) " >&6
24173else
24174  case $XATTR in
24175  [\\/]* | ?:[\\/]*)
24176  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24177  ;;
24178  *)
24179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24180for as_dir in $PATH
24181do
24182  IFS=$as_save_IFS
24183  test -z "$as_dir" && as_dir=.
24184    for ac_exec_ext in '' $ac_executable_extensions; do
24185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24186    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24188    break 2
24189  fi
24190done
24191  done
24192IFS=$as_save_IFS
24193
24194  ;;
24195esac
24196fi
24197XATTR=$ac_cv_path_XATTR
24198if test -n "$XATTR"; then
24199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24200$as_echo "$XATTR" >&6; }
24201else
24202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24203$as_echo "no" >&6; }
24204fi
24205
24206
24207  test -n "$XATTR" && break
24208done
24209
24210  else
24211    # The variable is set, but is it from the command line or the environment?
24212
24213    # Try to remove the string !XATTR! from our list.
24214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24216      # If it failed, the variable was not from the command line. Ignore it,
24217      # but warn the user (except for BASH, which is always set by the calling BASH).
24218      if test "xXATTR" != xBASH; then
24219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24220$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24221      fi
24222      # Try to locate tool using the code snippet
24223      for ac_prog in xattr
24224do
24225  # Extract the first word of "$ac_prog", so it can be a program name with args.
24226set dummy $ac_prog; ac_word=$2
24227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24228$as_echo_n "checking for $ac_word... " >&6; }
24229if ${ac_cv_path_XATTR+:} false; then :
24230  $as_echo_n "(cached) " >&6
24231else
24232  case $XATTR in
24233  [\\/]* | ?:[\\/]*)
24234  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24235  ;;
24236  *)
24237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24238for as_dir in $PATH
24239do
24240  IFS=$as_save_IFS
24241  test -z "$as_dir" && as_dir=.
24242    for ac_exec_ext in '' $ac_executable_extensions; do
24243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24244    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24246    break 2
24247  fi
24248done
24249  done
24250IFS=$as_save_IFS
24251
24252  ;;
24253esac
24254fi
24255XATTR=$ac_cv_path_XATTR
24256if test -n "$XATTR"; then
24257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24258$as_echo "$XATTR" >&6; }
24259else
24260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24261$as_echo "no" >&6; }
24262fi
24263
24264
24265  test -n "$XATTR" && break
24266done
24267
24268    else
24269      # If it succeeded, then it was overridden by the user. We will use it
24270      # for the tool.
24271
24272      # First remove it from the list of overridden variables, so we can test
24273      # for unknown variables in the end.
24274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24275
24276      # Check if we try to supply an empty value
24277      if test "x$XATTR" = x; then
24278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24279$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24281$as_echo_n "checking for XATTR... " >&6; }
24282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24283$as_echo "disabled" >&6; }
24284      else
24285        # Check if the provided tool contains a complete path.
24286        tool_specified="$XATTR"
24287        tool_basename="${tool_specified##*/}"
24288        if test "x$tool_basename" = "x$tool_specified"; then
24289          # A command without a complete path is provided, search $PATH.
24290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24291$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24292          # Extract the first word of "$tool_basename", so it can be a program name with args.
24293set dummy $tool_basename; ac_word=$2
24294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24295$as_echo_n "checking for $ac_word... " >&6; }
24296if ${ac_cv_path_XATTR+:} false; then :
24297  $as_echo_n "(cached) " >&6
24298else
24299  case $XATTR in
24300  [\\/]* | ?:[\\/]*)
24301  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24302  ;;
24303  *)
24304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24305for as_dir in $PATH
24306do
24307  IFS=$as_save_IFS
24308  test -z "$as_dir" && as_dir=.
24309    for ac_exec_ext in '' $ac_executable_extensions; do
24310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24311    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24313    break 2
24314  fi
24315done
24316  done
24317IFS=$as_save_IFS
24318
24319  ;;
24320esac
24321fi
24322XATTR=$ac_cv_path_XATTR
24323if test -n "$XATTR"; then
24324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24325$as_echo "$XATTR" >&6; }
24326else
24327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24328$as_echo "no" >&6; }
24329fi
24330
24331
24332          if test "x$XATTR" = x; then
24333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24334          fi
24335        else
24336          # Otherwise we believe it is a complete path. Use it as it is.
24337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24338$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24340$as_echo_n "checking for XATTR... " >&6; }
24341          if test ! -x "$tool_specified"; then
24342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24343$as_echo "not found" >&6; }
24344            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24345          fi
24346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24347$as_echo "$tool_specified" >&6; }
24348        fi
24349      fi
24350    fi
24351
24352  fi
24353
24354
24355
24356  if test "x$XATTR" = x; then
24357    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24358  fi
24359
24360
24361
24362
24363  # Publish this variable in the help.
24364
24365
24366  if [ -z "${CODESIGN+x}" ]; then
24367    # The variable is not set by user, try to locate tool using the code snippet
24368    for ac_prog in codesign
24369do
24370  # Extract the first word of "$ac_prog", so it can be a program name with args.
24371set dummy $ac_prog; ac_word=$2
24372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24373$as_echo_n "checking for $ac_word... " >&6; }
24374if ${ac_cv_path_CODESIGN+:} false; then :
24375  $as_echo_n "(cached) " >&6
24376else
24377  case $CODESIGN in
24378  [\\/]* | ?:[\\/]*)
24379  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24380  ;;
24381  *)
24382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24383for as_dir in $PATH
24384do
24385  IFS=$as_save_IFS
24386  test -z "$as_dir" && as_dir=.
24387    for ac_exec_ext in '' $ac_executable_extensions; do
24388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24389    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24391    break 2
24392  fi
24393done
24394  done
24395IFS=$as_save_IFS
24396
24397  ;;
24398esac
24399fi
24400CODESIGN=$ac_cv_path_CODESIGN
24401if test -n "$CODESIGN"; then
24402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24403$as_echo "$CODESIGN" >&6; }
24404else
24405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24406$as_echo "no" >&6; }
24407fi
24408
24409
24410  test -n "$CODESIGN" && break
24411done
24412
24413  else
24414    # The variable is set, but is it from the command line or the environment?
24415
24416    # Try to remove the string !CODESIGN! from our list.
24417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24419      # If it failed, the variable was not from the command line. Ignore it,
24420      # but warn the user (except for BASH, which is always set by the calling BASH).
24421      if test "xCODESIGN" != xBASH; then
24422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24423$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24424      fi
24425      # Try to locate tool using the code snippet
24426      for ac_prog in codesign
24427do
24428  # Extract the first word of "$ac_prog", so it can be a program name with args.
24429set dummy $ac_prog; ac_word=$2
24430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24431$as_echo_n "checking for $ac_word... " >&6; }
24432if ${ac_cv_path_CODESIGN+:} false; then :
24433  $as_echo_n "(cached) " >&6
24434else
24435  case $CODESIGN in
24436  [\\/]* | ?:[\\/]*)
24437  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24438  ;;
24439  *)
24440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24441for as_dir in $PATH
24442do
24443  IFS=$as_save_IFS
24444  test -z "$as_dir" && as_dir=.
24445    for ac_exec_ext in '' $ac_executable_extensions; do
24446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24447    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24449    break 2
24450  fi
24451done
24452  done
24453IFS=$as_save_IFS
24454
24455  ;;
24456esac
24457fi
24458CODESIGN=$ac_cv_path_CODESIGN
24459if test -n "$CODESIGN"; then
24460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24461$as_echo "$CODESIGN" >&6; }
24462else
24463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24464$as_echo "no" >&6; }
24465fi
24466
24467
24468  test -n "$CODESIGN" && break
24469done
24470
24471    else
24472      # If it succeeded, then it was overridden by the user. We will use it
24473      # for the tool.
24474
24475      # First remove it from the list of overridden variables, so we can test
24476      # for unknown variables in the end.
24477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24478
24479      # Check if we try to supply an empty value
24480      if test "x$CODESIGN" = x; then
24481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24482$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24484$as_echo_n "checking for CODESIGN... " >&6; }
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24486$as_echo "disabled" >&6; }
24487      else
24488        # Check if the provided tool contains a complete path.
24489        tool_specified="$CODESIGN"
24490        tool_basename="${tool_specified##*/}"
24491        if test "x$tool_basename" = "x$tool_specified"; then
24492          # A command without a complete path is provided, search $PATH.
24493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24494$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24495          # Extract the first word of "$tool_basename", so it can be a program name with args.
24496set dummy $tool_basename; ac_word=$2
24497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24498$as_echo_n "checking for $ac_word... " >&6; }
24499if ${ac_cv_path_CODESIGN+:} false; then :
24500  $as_echo_n "(cached) " >&6
24501else
24502  case $CODESIGN in
24503  [\\/]* | ?:[\\/]*)
24504  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24505  ;;
24506  *)
24507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24508for as_dir in $PATH
24509do
24510  IFS=$as_save_IFS
24511  test -z "$as_dir" && as_dir=.
24512    for ac_exec_ext in '' $ac_executable_extensions; do
24513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24514    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24516    break 2
24517  fi
24518done
24519  done
24520IFS=$as_save_IFS
24521
24522  ;;
24523esac
24524fi
24525CODESIGN=$ac_cv_path_CODESIGN
24526if test -n "$CODESIGN"; then
24527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24528$as_echo "$CODESIGN" >&6; }
24529else
24530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24531$as_echo "no" >&6; }
24532fi
24533
24534
24535          if test "x$CODESIGN" = x; then
24536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24537          fi
24538        else
24539          # Otherwise we believe it is a complete path. Use it as it is.
24540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24541$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24543$as_echo_n "checking for CODESIGN... " >&6; }
24544          if test ! -x "$tool_specified"; then
24545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24546$as_echo "not found" >&6; }
24547            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24548          fi
24549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24550$as_echo "$tool_specified" >&6; }
24551        fi
24552      fi
24553    fi
24554
24555  fi
24556
24557
24558    if test "x$CODESIGN" != "x"; then
24559      # Verify that the openjdk_codesign certificate is present
24560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24561$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24562      $RM codesign-testfile
24563      $TOUCH codesign-testfile
24564      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24565      $RM codesign-testfile
24566      if test "x$CODESIGN" = x; then
24567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24568$as_echo "no" >&6; }
24569      else
24570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24571$as_echo "yes" >&6; }
24572      fi
24573    fi
24574
24575
24576
24577  # Publish this variable in the help.
24578
24579
24580  if [ -z "${SETFILE+x}" ]; then
24581    # The variable is not set by user, try to locate tool using the code snippet
24582    for ac_prog in SetFile
24583do
24584  # Extract the first word of "$ac_prog", so it can be a program name with args.
24585set dummy $ac_prog; ac_word=$2
24586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24587$as_echo_n "checking for $ac_word... " >&6; }
24588if ${ac_cv_path_SETFILE+:} false; then :
24589  $as_echo_n "(cached) " >&6
24590else
24591  case $SETFILE in
24592  [\\/]* | ?:[\\/]*)
24593  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24594  ;;
24595  *)
24596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24597for as_dir in $PATH
24598do
24599  IFS=$as_save_IFS
24600  test -z "$as_dir" && as_dir=.
24601    for ac_exec_ext in '' $ac_executable_extensions; do
24602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24603    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24605    break 2
24606  fi
24607done
24608  done
24609IFS=$as_save_IFS
24610
24611  ;;
24612esac
24613fi
24614SETFILE=$ac_cv_path_SETFILE
24615if test -n "$SETFILE"; then
24616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24617$as_echo "$SETFILE" >&6; }
24618else
24619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24620$as_echo "no" >&6; }
24621fi
24622
24623
24624  test -n "$SETFILE" && break
24625done
24626
24627  else
24628    # The variable is set, but is it from the command line or the environment?
24629
24630    # Try to remove the string !SETFILE! from our list.
24631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24633      # If it failed, the variable was not from the command line. Ignore it,
24634      # but warn the user (except for BASH, which is always set by the calling BASH).
24635      if test "xSETFILE" != xBASH; then
24636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24637$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24638      fi
24639      # Try to locate tool using the code snippet
24640      for ac_prog in SetFile
24641do
24642  # Extract the first word of "$ac_prog", so it can be a program name with args.
24643set dummy $ac_prog; ac_word=$2
24644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24645$as_echo_n "checking for $ac_word... " >&6; }
24646if ${ac_cv_path_SETFILE+:} false; then :
24647  $as_echo_n "(cached) " >&6
24648else
24649  case $SETFILE in
24650  [\\/]* | ?:[\\/]*)
24651  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24652  ;;
24653  *)
24654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24655for as_dir in $PATH
24656do
24657  IFS=$as_save_IFS
24658  test -z "$as_dir" && as_dir=.
24659    for ac_exec_ext in '' $ac_executable_extensions; do
24660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24661    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24663    break 2
24664  fi
24665done
24666  done
24667IFS=$as_save_IFS
24668
24669  ;;
24670esac
24671fi
24672SETFILE=$ac_cv_path_SETFILE
24673if test -n "$SETFILE"; then
24674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24675$as_echo "$SETFILE" >&6; }
24676else
24677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24678$as_echo "no" >&6; }
24679fi
24680
24681
24682  test -n "$SETFILE" && break
24683done
24684
24685    else
24686      # If it succeeded, then it was overridden by the user. We will use it
24687      # for the tool.
24688
24689      # First remove it from the list of overridden variables, so we can test
24690      # for unknown variables in the end.
24691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24692
24693      # Check if we try to supply an empty value
24694      if test "x$SETFILE" = x; then
24695        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24696$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24698$as_echo_n "checking for SETFILE... " >&6; }
24699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24700$as_echo "disabled" >&6; }
24701      else
24702        # Check if the provided tool contains a complete path.
24703        tool_specified="$SETFILE"
24704        tool_basename="${tool_specified##*/}"
24705        if test "x$tool_basename" = "x$tool_specified"; then
24706          # A command without a complete path is provided, search $PATH.
24707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24708$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24709          # Extract the first word of "$tool_basename", so it can be a program name with args.
24710set dummy $tool_basename; ac_word=$2
24711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24712$as_echo_n "checking for $ac_word... " >&6; }
24713if ${ac_cv_path_SETFILE+:} false; then :
24714  $as_echo_n "(cached) " >&6
24715else
24716  case $SETFILE in
24717  [\\/]* | ?:[\\/]*)
24718  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24719  ;;
24720  *)
24721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24722for as_dir in $PATH
24723do
24724  IFS=$as_save_IFS
24725  test -z "$as_dir" && as_dir=.
24726    for ac_exec_ext in '' $ac_executable_extensions; do
24727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24728    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24730    break 2
24731  fi
24732done
24733  done
24734IFS=$as_save_IFS
24735
24736  ;;
24737esac
24738fi
24739SETFILE=$ac_cv_path_SETFILE
24740if test -n "$SETFILE"; then
24741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24742$as_echo "$SETFILE" >&6; }
24743else
24744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24745$as_echo "no" >&6; }
24746fi
24747
24748
24749          if test "x$SETFILE" = x; then
24750            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24751          fi
24752        else
24753          # Otherwise we believe it is a complete path. Use it as it is.
24754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24755$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24756          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24757$as_echo_n "checking for SETFILE... " >&6; }
24758          if test ! -x "$tool_specified"; then
24759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24760$as_echo "not found" >&6; }
24761            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24762          fi
24763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24764$as_echo "$tool_specified" >&6; }
24765        fi
24766      fi
24767    fi
24768
24769  fi
24770
24771
24772
24773  if test "x$SETFILE" = x; then
24774    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24775  fi
24776
24777
24778  fi
24779
24780
24781  # Check bash version
24782  # Extra [ ] to stop m4 mangling
24783   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24785$as_echo_n "checking bash version... " >&6; }
24786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24787$as_echo "$BASH_VER" >&6; }
24788
24789  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24790  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24791  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24792    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24793  fi
24794
24795  # Test if bash supports pipefail.
24796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24797$as_echo_n "checking if bash supports pipefail... " >&6; }
24798  if ${BASH} -c 'set -o pipefail'; then
24799    BASH_ARGS="$BASH_ARGS -o pipefail"
24800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24801$as_echo "yes" >&6; }
24802  else
24803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24804$as_echo "no" >&6; }
24805  fi
24806
24807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24808$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24809  if ${BASH} -e -c 'true'; then
24810    BASH_ARGS="$BASH_ARGS -e"
24811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24812$as_echo "yes" >&6; }
24813  else
24814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24815$as_echo "no" >&6; }
24816  fi
24817
24818
24819
24820
24821# Check if pkg-config is available.
24822
24823
24824if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24825	if test -n "$ac_tool_prefix"; then
24826  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24827set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24829$as_echo_n "checking for $ac_word... " >&6; }
24830if ${ac_cv_path_PKG_CONFIG+:} false; then :
24831  $as_echo_n "(cached) " >&6
24832else
24833  case $PKG_CONFIG in
24834  [\\/]* | ?:[\\/]*)
24835  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24836  ;;
24837  *)
24838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24839for as_dir in $PATH
24840do
24841  IFS=$as_save_IFS
24842  test -z "$as_dir" && as_dir=.
24843    for ac_exec_ext in '' $ac_executable_extensions; do
24844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24845    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24847    break 2
24848  fi
24849done
24850  done
24851IFS=$as_save_IFS
24852
24853  ;;
24854esac
24855fi
24856PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24857if test -n "$PKG_CONFIG"; then
24858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24859$as_echo "$PKG_CONFIG" >&6; }
24860else
24861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24862$as_echo "no" >&6; }
24863fi
24864
24865
24866fi
24867if test -z "$ac_cv_path_PKG_CONFIG"; then
24868  ac_pt_PKG_CONFIG=$PKG_CONFIG
24869  # Extract the first word of "pkg-config", so it can be a program name with args.
24870set dummy pkg-config; ac_word=$2
24871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24872$as_echo_n "checking for $ac_word... " >&6; }
24873if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24874  $as_echo_n "(cached) " >&6
24875else
24876  case $ac_pt_PKG_CONFIG in
24877  [\\/]* | ?:[\\/]*)
24878  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24879  ;;
24880  *)
24881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24882for as_dir in $PATH
24883do
24884  IFS=$as_save_IFS
24885  test -z "$as_dir" && as_dir=.
24886    for ac_exec_ext in '' $ac_executable_extensions; do
24887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24888    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24890    break 2
24891  fi
24892done
24893  done
24894IFS=$as_save_IFS
24895
24896  ;;
24897esac
24898fi
24899ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24900if test -n "$ac_pt_PKG_CONFIG"; then
24901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24902$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24903else
24904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24905$as_echo "no" >&6; }
24906fi
24907
24908  if test "x$ac_pt_PKG_CONFIG" = x; then
24909    PKG_CONFIG=""
24910  else
24911    case $cross_compiling:$ac_tool_warned in
24912yes:)
24913{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24914$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24915ac_tool_warned=yes ;;
24916esac
24917    PKG_CONFIG=$ac_pt_PKG_CONFIG
24918  fi
24919else
24920  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24921fi
24922
24923fi
24924if test -n "$PKG_CONFIG"; then
24925	_pkg_min_version=0.9.0
24926	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24927$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24928	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24929		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24930$as_echo "yes" >&6; }
24931	else
24932		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24933$as_echo "no" >&6; }
24934		PKG_CONFIG=""
24935	fi
24936
24937fi
24938
24939# After basic tools have been setup, we can check build os specific details.
24940
24941  ###############################################################################
24942
24943  # Note that this is the build platform OS version!
24944
24945  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24946  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24947  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24948  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24949
24950
24951
24952
24953
24954# Misc basic settings
24955
24956
24957# Check whether --with-default-make-target was given.
24958if test "${with_default_make_target+set}" = set; then :
24959  withval=$with_default_make_target;
24960fi
24961
24962  if test "x$with_default_make_target" = "x" \
24963      || test "x$with_default_make_target" = "xyes"; then
24964    DEFAULT_MAKE_TARGET="exploded-image"
24965  elif test "x$with_default_make_target" = "xno"; then
24966    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24967  else
24968    DEFAULT_MAKE_TARGET="$with_default_make_target"
24969  fi
24970
24971
24972
24973
24974###############################################################################
24975#
24976# Determine OpenJDK variants, options and version numbers.
24977#
24978###############################################################################
24979
24980# We need build & target for this.
24981
24982  # Should we build a JDK without a graphical UI?
24983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24984$as_echo_n "checking headless only... " >&6; }
24985  # Check whether --enable-headless-only was given.
24986if test "${enable_headless_only+set}" = set; then :
24987  enableval=$enable_headless_only;
24988fi
24989
24990
24991  if test "x$enable_headless_only" = "xyes"; then
24992    ENABLE_HEADLESS_ONLY="true"
24993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24994$as_echo "yes" >&6; }
24995  elif test "x$enable_headless_only" = "xno"; then
24996    ENABLE_HEADLESS_ONLY="false"
24997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24998$as_echo "no" >&6; }
24999  elif test "x$enable_headless_only" = "x"; then
25000    ENABLE_HEADLESS_ONLY="false"
25001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25002$as_echo "no" >&6; }
25003  else
25004    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
25005  fi
25006
25007
25008
25009  # Should we build the complete docs, or just a lightweight version?
25010  # Check whether --enable-full-docs was given.
25011if test "${enable_full_docs+set}" = set; then :
25012  enableval=$enable_full_docs;
25013fi
25014
25015
25016  # Verify dependencies
25017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
25018$as_echo_n "checking for graphviz dot... " >&6; }
25019  if test "x$DOT" != "x"; then
25020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25021$as_echo "yes" >&6; }
25022  else
25023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25024$as_echo "no, cannot generate full docs" >&6; }
25025    FULL_DOCS_DEP_MISSING=true
25026  fi
25027
25028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25029$as_echo_n "checking for pandoc... " >&6; }
25030  if test "x$PANDOC" != "x"; then
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25032$as_echo "yes" >&6; }
25033  else
25034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25035$as_echo "no, cannot generate full docs" >&6; }
25036    FULL_DOCS_DEP_MISSING=true
25037  fi
25038
25039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25040$as_echo_n "checking full docs... " >&6; }
25041  if test "x$enable_full_docs" = xyes; then
25042    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25044$as_echo "no, missing dependencies" >&6; }
25045
25046  # Print a helpful message on how to acquire the necessary build dependency.
25047  # dot is the help tag: freetype, cups, alsa etc
25048  MISSING_DEPENDENCY=dot
25049
25050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25051    cygwin_help $MISSING_DEPENDENCY
25052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25053    msys_help $MISSING_DEPENDENCY
25054  else
25055    PKGHANDLER_COMMAND=
25056
25057    case $PKGHANDLER in
25058      apt-get)
25059        apt_help     $MISSING_DEPENDENCY ;;
25060      yum)
25061        yum_help     $MISSING_DEPENDENCY ;;
25062      brew)
25063        brew_help    $MISSING_DEPENDENCY ;;
25064      port)
25065        port_help    $MISSING_DEPENDENCY ;;
25066      pkgutil)
25067        pkgutil_help $MISSING_DEPENDENCY ;;
25068      pkgadd)
25069        pkgadd_help  $MISSING_DEPENDENCY ;;
25070    esac
25071
25072    if test "x$PKGHANDLER_COMMAND" != x; then
25073      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25074    fi
25075  fi
25076
25077      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25078    else
25079      ENABLE_FULL_DOCS=true
25080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25081$as_echo "yes, forced" >&6; }
25082    fi
25083  elif test "x$enable_full_docs" = xno; then
25084    ENABLE_FULL_DOCS=false
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25086$as_echo "no, forced" >&6; }
25087  elif test "x$enable_full_docs" = x; then
25088    # Check for prerequisites
25089    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25090      ENABLE_FULL_DOCS=false
25091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25092$as_echo "no, missing dependencies" >&6; }
25093    else
25094      ENABLE_FULL_DOCS=true
25095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25096$as_echo "yes, dependencies present" >&6; }
25097    fi
25098  else
25099    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25100  fi
25101
25102
25103
25104  # Choose cacerts source file
25105
25106# Check whether --with-cacerts-file was given.
25107if test "${with_cacerts_file+set}" = set; then :
25108  withval=$with_cacerts_file;
25109fi
25110
25111  if test "x$with_cacerts_file" != x; then
25112    CACERTS_FILE=$with_cacerts_file
25113  fi
25114
25115
25116  # Enable or disable unlimited crypto
25117  # Check whether --enable-unlimited-crypto was given.
25118if test "${enable_unlimited_crypto+set}" = set; then :
25119  enableval=$enable_unlimited_crypto;
25120else
25121  enable_unlimited_crypto=yes
25122fi
25123
25124  if test "x$enable_unlimited_crypto" = "xyes"; then
25125    UNLIMITED_CRYPTO=true
25126  else
25127    UNLIMITED_CRYPTO=false
25128  fi
25129
25130
25131  # Should we build the serviceability agent (SA)?
25132  INCLUDE_SA=true
25133  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25134    INCLUDE_SA=false
25135  fi
25136  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25137    INCLUDE_SA=false
25138  fi
25139
25140
25141  # Compress jars
25142  COMPRESS_JARS=false
25143
25144
25145
25146  # Setup default copyright year. Mostly overridden when building close to a new year.
25147
25148# Check whether --with-copyright-year was given.
25149if test "${with_copyright_year+set}" = set; then :
25150  withval=$with_copyright_year;
25151fi
25152
25153  if test "x$with_copyright_year" = xyes; then
25154    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25155  elif test "x$with_copyright_year" != x; then
25156    COPYRIGHT_YEAR="$with_copyright_year"
25157  else
25158    COPYRIGHT_YEAR=`$DATE +'%Y'`
25159  fi
25160
25161
25162
25163  # Check whether --enable-keep-packaged-modules was given.
25164if test "${enable_keep_packaged_modules+set}" = set; then :
25165  enableval=$enable_keep_packaged_modules;
25166fi
25167
25168
25169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25170$as_echo_n "checking if packaged modules are kept... " >&6; }
25171  if test "x$enable_keep_packaged_modules" = "xyes"; then
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25173$as_echo "yes" >&6; }
25174    JLINK_KEEP_PACKAGED_MODULES=true
25175  elif test "x$enable_keep_packaged_modules" = "xno"; then
25176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25177$as_echo "no" >&6; }
25178    JLINK_KEEP_PACKAGED_MODULES=false
25179  elif test "x$enable_keep_packaged_modules" = "x"; then
25180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25181$as_echo "yes (default)" >&6; }
25182    JLINK_KEEP_PACKAGED_MODULES=true
25183  else
25184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25185$as_echo "error" >&6; }
25186    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25187  fi
25188
25189
25190
25191
25192  # Warn user that old version arguments are deprecated.
25193
25194
25195# Check whether --with-milestone was given.
25196if test "${with_milestone+set}" = set; then :
25197  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25198$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25199fi
25200
25201
25202
25203
25204# Check whether --with-update-version was given.
25205if test "${with_update_version+set}" = set; then :
25206  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25207$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25208fi
25209
25210
25211
25212
25213# Check whether --with-user-release-suffix was given.
25214if test "${with_user_release_suffix+set}" = set; then :
25215  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
25216$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25217fi
25218
25219
25220
25221
25222# Check whether --with-build-number was given.
25223if test "${with_build_number+set}" = set; then :
25224  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25225$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25226fi
25227
25228
25229
25230  # Source the version numbers file
25231  . $AUTOCONF_DIR/version-numbers
25232
25233  # Some non-version number information is set in that file
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243  # Override version from arguments
25244
25245  # If --with-version-string is set, process it first. It is possible to
25246  # override parts with more specific flags, since these are processed later.
25247
25248# Check whether --with-version-string was given.
25249if test "${with_version_string+set}" = set; then :
25250  withval=$with_version_string;
25251fi
25252
25253  if test "x$with_version_string" = xyes; then
25254    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25255  elif test "x$with_version_string" != x; then
25256    # Additional [] needed to keep m4 from mangling shell constructs.
25257    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25258      VERSION_MAJOR=${BASH_REMATCH[1]}
25259      VERSION_MINOR=${BASH_REMATCH[3]}
25260      VERSION_SECURITY=${BASH_REMATCH[5]}
25261      VERSION_PATCH=${BASH_REMATCH[7]}
25262      VERSION_PRE=${BASH_REMATCH[9]}
25263      version_plus_separator=${BASH_REMATCH[11]}
25264      VERSION_BUILD=${BASH_REMATCH[12]}
25265      VERSION_OPT=${BASH_REMATCH[14]}
25266      # Unspecified numerical fields are interpreted as 0.
25267      if test "x$VERSION_MINOR" = x; then
25268        VERSION_MINOR=0
25269      fi
25270      if test "x$VERSION_SECURITY" = x; then
25271        VERSION_SECURITY=0
25272      fi
25273      if test "x$VERSION_PATCH" = x; then
25274        VERSION_PATCH=0
25275      fi
25276      if test "x$version_plus_separator" != x \
25277          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25278        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25279      fi
25280      # Stop the version part process from setting default values.
25281      # We still allow them to explicitly override though.
25282      NO_DEFAULT_VERSION_PARTS=true
25283    else
25284      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25285    fi
25286  fi
25287
25288
25289# Check whether --with-version-pre was given.
25290if test "${with_version_pre+set}" = set; then :
25291  withval=$with_version_pre; with_version_pre_present=true
25292else
25293  with_version_pre_present=false
25294fi
25295
25296
25297  if test "x$with_version_pre_present" = xtrue; then
25298    if test "x$with_version_pre" = xyes; then
25299      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25300    elif test "x$with_version_pre" = xno; then
25301      # Interpret --without-* as empty string instead of the literal "no"
25302      VERSION_PRE=
25303    else
25304      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25305       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25306      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25308$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25309      fi
25310    fi
25311  else
25312    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25313      # Default is to use "internal" as pre
25314      VERSION_PRE="internal"
25315    fi
25316  fi
25317
25318
25319# Check whether --with-version-opt was given.
25320if test "${with_version_opt+set}" = set; then :
25321  withval=$with_version_opt; with_version_opt_present=true
25322else
25323  with_version_opt_present=false
25324fi
25325
25326
25327  if test "x$with_version_opt_present" = xtrue; then
25328    if test "x$with_version_opt" = xyes; then
25329      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25330    elif test "x$with_version_opt" = xno; then
25331      # Interpret --without-* as empty string instead of the literal "no"
25332      VERSION_OPT=
25333    else
25334      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25335       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25336      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25338$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25339      fi
25340    fi
25341  else
25342    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25343      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25344      # Outer [ ] to quote m4.
25345       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25346      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25347    fi
25348  fi
25349
25350
25351# Check whether --with-version-build was given.
25352if test "${with_version_build+set}" = set; then :
25353  withval=$with_version_build; with_version_build_present=true
25354else
25355  with_version_build_present=false
25356fi
25357
25358
25359  if test "x$with_version_build_present" = xtrue; then
25360    if test "x$with_version_build" = xyes; then
25361      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25362    elif test "x$with_version_build" = xno; then
25363      # Interpret --without-* as empty string instead of the literal "no"
25364      VERSION_BUILD=
25365    elif test "x$with_version_build" = x; then
25366      VERSION_BUILD=
25367    else
25368
25369  # Additional [] needed to keep m4 from mangling shell constructs.
25370  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25371    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25372  fi
25373  # Extract the version number without leading zeros.
25374  cleaned_value=${BASH_REMATCH[1]}
25375  if test "x$cleaned_value" = x; then
25376    # Special case for zero
25377    cleaned_value=${BASH_REMATCH[2]}
25378  fi
25379
25380  if test $cleaned_value -gt 255; then
25381    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25382  fi
25383  if test "x$cleaned_value" != "x$with_version_build"; then
25384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25385$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25386  fi
25387  VERSION_BUILD=$cleaned_value
25388
25389    fi
25390  else
25391    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25392      # Default is to not have a build number.
25393      VERSION_BUILD=""
25394      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25395      VERSION_BUILD=0
25396    fi
25397  fi
25398
25399
25400# Check whether --with-version-major was given.
25401if test "${with_version_major+set}" = set; then :
25402  withval=$with_version_major; with_version_major_present=true
25403else
25404  with_version_major_present=false
25405fi
25406
25407
25408  if test "x$with_version_major_present" = xtrue; then
25409    if test "x$with_version_major" = xyes; then
25410      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25411    else
25412
25413  # Additional [] needed to keep m4 from mangling shell constructs.
25414  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25415    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25416  fi
25417  # Extract the version number without leading zeros.
25418  cleaned_value=${BASH_REMATCH[1]}
25419  if test "x$cleaned_value" = x; then
25420    # Special case for zero
25421    cleaned_value=${BASH_REMATCH[2]}
25422  fi
25423
25424  if test $cleaned_value -gt 255; then
25425    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25426  fi
25427  if test "x$cleaned_value" != "x$with_version_major"; then
25428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25429$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25430  fi
25431  VERSION_MAJOR=$cleaned_value
25432
25433    fi
25434  else
25435    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25436      # Default is to get value from version-numbers
25437      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25438    fi
25439  fi
25440
25441
25442# Check whether --with-version-minor was given.
25443if test "${with_version_minor+set}" = set; then :
25444  withval=$with_version_minor; with_version_minor_present=true
25445else
25446  with_version_minor_present=false
25447fi
25448
25449
25450  if test "x$with_version_minor_present" = xtrue; then
25451    if test "x$with_version_minor" = xyes; then
25452      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25453    elif test "x$with_version_minor" = xno; then
25454      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25455      VERSION_MINOR=0
25456    elif test "x$with_version_minor" = x; then
25457      VERSION_MINOR=0
25458    else
25459
25460  # Additional [] needed to keep m4 from mangling shell constructs.
25461  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25462    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25463  fi
25464  # Extract the version number without leading zeros.
25465  cleaned_value=${BASH_REMATCH[1]}
25466  if test "x$cleaned_value" = x; then
25467    # Special case for zero
25468    cleaned_value=${BASH_REMATCH[2]}
25469  fi
25470
25471  if test $cleaned_value -gt 255; then
25472    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25473  fi
25474  if test "x$cleaned_value" != "x$with_version_minor"; then
25475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25476$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25477  fi
25478  VERSION_MINOR=$cleaned_value
25479
25480    fi
25481  else
25482    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25483      # Default is 0, if unspecified
25484      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25485    fi
25486  fi
25487
25488
25489# Check whether --with-version-security was given.
25490if test "${with_version_security+set}" = set; then :
25491  withval=$with_version_security; with_version_security_present=true
25492else
25493  with_version_security_present=false
25494fi
25495
25496
25497  if test "x$with_version_security_present" = xtrue; then
25498    if test "x$with_version_security" = xyes; then
25499      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25500    elif test "x$with_version_security" = xno; then
25501      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25502      VERSION_SECURITY=0
25503    elif test "x$with_version_security" = x; then
25504      VERSION_SECURITY=0
25505    else
25506
25507  # Additional [] needed to keep m4 from mangling shell constructs.
25508  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25509    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25510  fi
25511  # Extract the version number without leading zeros.
25512  cleaned_value=${BASH_REMATCH[1]}
25513  if test "x$cleaned_value" = x; then
25514    # Special case for zero
25515    cleaned_value=${BASH_REMATCH[2]}
25516  fi
25517
25518  if test $cleaned_value -gt 255; then
25519    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25520  fi
25521  if test "x$cleaned_value" != "x$with_version_security"; then
25522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25523$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25524  fi
25525  VERSION_SECURITY=$cleaned_value
25526
25527    fi
25528  else
25529    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25530      # Default is 0, if unspecified
25531      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25532    fi
25533  fi
25534
25535
25536# Check whether --with-version-patch was given.
25537if test "${with_version_patch+set}" = set; then :
25538  withval=$with_version_patch; with_version_patch_present=true
25539else
25540  with_version_patch_present=false
25541fi
25542
25543
25544  if test "x$with_version_patch_present" = xtrue; then
25545    if test "x$with_version_patch" = xyes; then
25546      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25547    elif test "x$with_version_patch" = xno; then
25548      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25549      VERSION_PATCH=0
25550    elif test "x$with_version_patch" = x; then
25551      VERSION_PATCH=0
25552    else
25553
25554  # Additional [] needed to keep m4 from mangling shell constructs.
25555  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25556    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25557  fi
25558  # Extract the version number without leading zeros.
25559  cleaned_value=${BASH_REMATCH[1]}
25560  if test "x$cleaned_value" = x; then
25561    # Special case for zero
25562    cleaned_value=${BASH_REMATCH[2]}
25563  fi
25564
25565  if test $cleaned_value -gt 255; then
25566    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25567  fi
25568  if test "x$cleaned_value" != "x$with_version_patch"; then
25569    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25570$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25571  fi
25572  VERSION_PATCH=$cleaned_value
25573
25574    fi
25575  else
25576    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25577      # Default is 0, if unspecified
25578      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25579    fi
25580  fi
25581
25582  # Calculate derived version properties
25583
25584  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25585  if test "x$VERSION_PRE" = x; then
25586    VERSION_IS_GA=true
25587  else
25588    VERSION_IS_GA=false
25589  fi
25590
25591  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25592  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25593
25594  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25595  # Strip trailing zeroes from stripped_version_number
25596  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25597  VERSION_NUMBER=$stripped_version_number
25598
25599  # The complete version string, with additional build information
25600  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25601    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25602  else
25603    # If either build or opt is set, we need a + separator
25604    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25605  fi
25606
25607  # The short version string, just VERSION_NUMBER and PRE, if present.
25608  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25609
25610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25611$as_echo_n "checking for version string... " >&6; }
25612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25613$as_echo "$VERSION_STRING" >&6; }
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629###############################################################################
25630#
25631# Setup BootJDK, used to bootstrap the build.
25632#
25633###############################################################################
25634
25635
25636  BOOT_JDK_FOUND=no
25637
25638# Check whether --with-boot-jdk was given.
25639if test "${with_boot_jdk+set}" = set; then :
25640  withval=$with_boot_jdk;
25641fi
25642
25643
25644  # We look for the Boot JDK through various means, going from more certain to
25645  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25646  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25647  # must check if this is indeed valid; otherwise we'll continue looking.
25648
25649  # Test: Is bootjdk explicitly set by command line arguments?
25650
25651  if test "x$BOOT_JDK_FOUND" = xno; then
25652    # Now execute the test
25653
25654  if test "x$with_boot_jdk" != x; then
25655    BOOT_JDK=$with_boot_jdk
25656    BOOT_JDK_FOUND=maybe
25657    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25658$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25659  fi
25660
25661
25662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25663    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25664      # Do we have a bin/java?
25665      if test ! -x "$BOOT_JDK/bin/java"; then
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25668        BOOT_JDK_FOUND=no
25669      else
25670        # Do we have a bin/javac?
25671        if test ! -x "$BOOT_JDK/bin/javac"; then
25672          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25674          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25675$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25676          BOOT_JDK_FOUND=no
25677        else
25678          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25679          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25680
25681          # Extra M4 quote needed to protect [] in grep expression.
25682          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25683          if test "x$FOUND_CORRECT_VERSION" = x; then
25684            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25686            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25687$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25688            BOOT_JDK_FOUND=no
25689          else
25690            # We're done! :-)
25691            BOOT_JDK_FOUND=yes
25692
25693  # Only process if variable expands to non-empty
25694
25695  if test "x$BOOT_JDK" != x; then
25696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697
25698  # Input might be given as Windows format, start by converting to
25699  # unix format.
25700  path="$BOOT_JDK"
25701  new_path=`$CYGPATH -u "$path"`
25702
25703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25706  # "foo.exe" is OK but "foo" is an error.
25707  #
25708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25709  # It is also a way to make sure we got the proper file name for the real test later on.
25710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25711  if test "x$test_shortpath" = x; then
25712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25714    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25715  fi
25716
25717  # Call helper function which possibly converts this using DOS-style short mode.
25718  # If so, the updated path is stored in $new_path.
25719
25720  input_path="$new_path"
25721  # Check if we need to convert this using DOS-style short mode. If the path
25722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25723  # take no chances and rewrite it.
25724  # Note: m4 eats our [], so we need to use [ and ] instead.
25725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25726  if test "x$has_forbidden_chars" != x; then
25727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25731      # Going to short mode and back again did indeed matter. Since short mode is
25732      # case insensitive, let's make it lowercase to improve readability.
25733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25734      # Now convert it back to Unix-style (cygpath)
25735      input_path=`$CYGPATH -u "$shortmode_path"`
25736      new_path="$input_path"
25737    fi
25738  fi
25739
25740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25741  if test "x$test_cygdrive_prefix" = x; then
25742    # As a simple fix, exclude /usr/bin since it's not a real path.
25743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25745      # a path prefixed by /cygdrive for fixpath to work.
25746      new_path="$CYGWIN_ROOT_PATH$input_path"
25747    fi
25748  fi
25749
25750
25751  if test "x$path" != "x$new_path"; then
25752    BOOT_JDK="$new_path"
25753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25755  fi
25756
25757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25758
25759  path="$BOOT_JDK"
25760  has_colon=`$ECHO $path | $GREP ^.:`
25761  new_path="$path"
25762  if test "x$has_colon" = x; then
25763    # Not in mixed or Windows style, start by that.
25764    new_path=`cmd //c echo $path`
25765  fi
25766
25767
25768  input_path="$new_path"
25769  # Check if we need to convert this using DOS-style short mode. If the path
25770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25771  # take no chances and rewrite it.
25772  # Note: m4 eats our [], so we need to use [ and ] instead.
25773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25774  if test "x$has_forbidden_chars" != x; then
25775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25777  fi
25778
25779
25780  windows_path="$new_path"
25781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25782    unix_path=`$CYGPATH -u "$windows_path"`
25783    new_path="$unix_path"
25784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25786    new_path="$unix_path"
25787  fi
25788
25789  if test "x$path" != "x$new_path"; then
25790    BOOT_JDK="$new_path"
25791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25793  fi
25794
25795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25797
25798    else
25799      # We're on a unix platform. Hooray! :)
25800      path="$BOOT_JDK"
25801      has_space=`$ECHO "$path" | $GREP " "`
25802      if test "x$has_space" != x; then
25803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25804$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25805        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25806      fi
25807
25808      # Use eval to expand a potential ~
25809      eval path="$path"
25810      if test ! -f "$path" && test ! -d "$path"; then
25811        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25812      fi
25813
25814      if test -d "$path"; then
25815        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25816      else
25817        dir="`$DIRNAME "$path"`"
25818        base="`$BASENAME "$path"`"
25819        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25820      fi
25821    fi
25822  fi
25823
25824            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25825$as_echo_n "checking for Boot JDK... " >&6; }
25826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25827$as_echo "$BOOT_JDK" >&6; }
25828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25829$as_echo_n "checking Boot JDK version... " >&6; }
25830            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25832$as_echo "$BOOT_JDK_VERSION" >&6; }
25833          fi # end check jdk version
25834        fi # end check javac
25835      fi # end check java
25836    fi # end check boot jdk found
25837  fi
25838
25839  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25840    # Having specified an argument which is incorrect will produce an instant failure;
25841    # we should not go on looking
25842    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25843  fi
25844
25845  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25846
25847  if test "x$BOOT_JDK_FOUND" = xno; then
25848    # Now execute the test
25849
25850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25851    # First check at user selected default
25852
25853  if test "x$BOOT_JDK_FOUND" = xno; then
25854    # Now execute the test
25855
25856  if test -x /usr/libexec/java_home; then
25857    BOOT_JDK=`/usr/libexec/java_home `
25858    BOOT_JDK_FOUND=maybe
25859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25860$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25861  fi
25862
25863
25864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25866      # Do we have a bin/java?
25867      if test ! -x "$BOOT_JDK/bin/java"; then
25868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25870        BOOT_JDK_FOUND=no
25871      else
25872        # Do we have a bin/javac?
25873        if test ! -x "$BOOT_JDK/bin/javac"; then
25874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25878          BOOT_JDK_FOUND=no
25879        else
25880          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25881          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25882
25883          # Extra M4 quote needed to protect [] in grep expression.
25884          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25885          if test "x$FOUND_CORRECT_VERSION" = x; then
25886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25888            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25889$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25890            BOOT_JDK_FOUND=no
25891          else
25892            # We're done! :-)
25893            BOOT_JDK_FOUND=yes
25894
25895  # Only process if variable expands to non-empty
25896
25897  if test "x$BOOT_JDK" != x; then
25898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25899
25900  # Input might be given as Windows format, start by converting to
25901  # unix format.
25902  path="$BOOT_JDK"
25903  new_path=`$CYGPATH -u "$path"`
25904
25905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25908  # "foo.exe" is OK but "foo" is an error.
25909  #
25910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25911  # It is also a way to make sure we got the proper file name for the real test later on.
25912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25913  if test "x$test_shortpath" = x; then
25914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25917  fi
25918
25919  # Call helper function which possibly converts this using DOS-style short mode.
25920  # If so, the updated path is stored in $new_path.
25921
25922  input_path="$new_path"
25923  # Check if we need to convert this using DOS-style short mode. If the path
25924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25925  # take no chances and rewrite it.
25926  # Note: m4 eats our [], so we need to use [ and ] instead.
25927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25928  if test "x$has_forbidden_chars" != x; then
25929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25933      # Going to short mode and back again did indeed matter. Since short mode is
25934      # case insensitive, let's make it lowercase to improve readability.
25935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25936      # Now convert it back to Unix-style (cygpath)
25937      input_path=`$CYGPATH -u "$shortmode_path"`
25938      new_path="$input_path"
25939    fi
25940  fi
25941
25942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25943  if test "x$test_cygdrive_prefix" = x; then
25944    # As a simple fix, exclude /usr/bin since it's not a real path.
25945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25947      # a path prefixed by /cygdrive for fixpath to work.
25948      new_path="$CYGWIN_ROOT_PATH$input_path"
25949    fi
25950  fi
25951
25952
25953  if test "x$path" != "x$new_path"; then
25954    BOOT_JDK="$new_path"
25955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25957  fi
25958
25959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25960
25961  path="$BOOT_JDK"
25962  has_colon=`$ECHO $path | $GREP ^.:`
25963  new_path="$path"
25964  if test "x$has_colon" = x; then
25965    # Not in mixed or Windows style, start by that.
25966    new_path=`cmd //c echo $path`
25967  fi
25968
25969
25970  input_path="$new_path"
25971  # Check if we need to convert this using DOS-style short mode. If the path
25972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25973  # take no chances and rewrite it.
25974  # Note: m4 eats our [], so we need to use [ and ] instead.
25975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25976  if test "x$has_forbidden_chars" != x; then
25977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25979  fi
25980
25981
25982  windows_path="$new_path"
25983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25984    unix_path=`$CYGPATH -u "$windows_path"`
25985    new_path="$unix_path"
25986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25988    new_path="$unix_path"
25989  fi
25990
25991  if test "x$path" != "x$new_path"; then
25992    BOOT_JDK="$new_path"
25993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25995  fi
25996
25997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25999
26000    else
26001      # We're on a unix platform. Hooray! :)
26002      path="$BOOT_JDK"
26003      has_space=`$ECHO "$path" | $GREP " "`
26004      if test "x$has_space" != x; then
26005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26008      fi
26009
26010      # Use eval to expand a potential ~
26011      eval path="$path"
26012      if test ! -f "$path" && test ! -d "$path"; then
26013        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26014      fi
26015
26016      if test -d "$path"; then
26017        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26018      else
26019        dir="`$DIRNAME "$path"`"
26020        base="`$BASENAME "$path"`"
26021        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26022      fi
26023    fi
26024  fi
26025
26026            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26027$as_echo_n "checking for Boot JDK... " >&6; }
26028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26029$as_echo "$BOOT_JDK" >&6; }
26030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26031$as_echo_n "checking Boot JDK version... " >&6; }
26032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26034$as_echo "$BOOT_JDK_VERSION" >&6; }
26035          fi # end check jdk version
26036        fi # end check javac
26037      fi # end check java
26038    fi # end check boot jdk found
26039  fi
26040
26041    # If that did not work out (e.g. too old), try explicit versions instead
26042
26043  if test "x$BOOT_JDK_FOUND" = xno; then
26044    # Now execute the test
26045
26046  if test -x /usr/libexec/java_home; then
26047    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26048    BOOT_JDK_FOUND=maybe
26049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26050$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26051  fi
26052
26053
26054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26056      # Do we have a bin/java?
26057      if test ! -x "$BOOT_JDK/bin/java"; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26060        BOOT_JDK_FOUND=no
26061      else
26062        # Do we have a bin/javac?
26063        if test ! -x "$BOOT_JDK/bin/javac"; then
26064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26068          BOOT_JDK_FOUND=no
26069        else
26070          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26071          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26072
26073          # Extra M4 quote needed to protect [] in grep expression.
26074          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26075          if test "x$FOUND_CORRECT_VERSION" = x; then
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26078            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26079$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26080            BOOT_JDK_FOUND=no
26081          else
26082            # We're done! :-)
26083            BOOT_JDK_FOUND=yes
26084
26085  # Only process if variable expands to non-empty
26086
26087  if test "x$BOOT_JDK" != x; then
26088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26089
26090  # Input might be given as Windows format, start by converting to
26091  # unix format.
26092  path="$BOOT_JDK"
26093  new_path=`$CYGPATH -u "$path"`
26094
26095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26098  # "foo.exe" is OK but "foo" is an error.
26099  #
26100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26101  # It is also a way to make sure we got the proper file name for the real test later on.
26102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26103  if test "x$test_shortpath" = x; then
26104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26107  fi
26108
26109  # Call helper function which possibly converts this using DOS-style short mode.
26110  # If so, the updated path is stored in $new_path.
26111
26112  input_path="$new_path"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26123      # Going to short mode and back again did indeed matter. Since short mode is
26124      # case insensitive, let's make it lowercase to improve readability.
26125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26126      # Now convert it back to Unix-style (cygpath)
26127      input_path=`$CYGPATH -u "$shortmode_path"`
26128      new_path="$input_path"
26129    fi
26130  fi
26131
26132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26133  if test "x$test_cygdrive_prefix" = x; then
26134    # As a simple fix, exclude /usr/bin since it's not a real path.
26135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26137      # a path prefixed by /cygdrive for fixpath to work.
26138      new_path="$CYGWIN_ROOT_PATH$input_path"
26139    fi
26140  fi
26141
26142
26143  if test "x$path" != "x$new_path"; then
26144    BOOT_JDK="$new_path"
26145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26147  fi
26148
26149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150
26151  path="$BOOT_JDK"
26152  has_colon=`$ECHO $path | $GREP ^.:`
26153  new_path="$path"
26154  if test "x$has_colon" = x; then
26155    # Not in mixed or Windows style, start by that.
26156    new_path=`cmd //c echo $path`
26157  fi
26158
26159
26160  input_path="$new_path"
26161  # Check if we need to convert this using DOS-style short mode. If the path
26162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26163  # take no chances and rewrite it.
26164  # Note: m4 eats our [], so we need to use [ and ] instead.
26165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26166  if test "x$has_forbidden_chars" != x; then
26167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26169  fi
26170
26171
26172  windows_path="$new_path"
26173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26174    unix_path=`$CYGPATH -u "$windows_path"`
26175    new_path="$unix_path"
26176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26178    new_path="$unix_path"
26179  fi
26180
26181  if test "x$path" != "x$new_path"; then
26182    BOOT_JDK="$new_path"
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26185  fi
26186
26187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26189
26190    else
26191      # We're on a unix platform. Hooray! :)
26192      path="$BOOT_JDK"
26193      has_space=`$ECHO "$path" | $GREP " "`
26194      if test "x$has_space" != x; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26198      fi
26199
26200      # Use eval to expand a potential ~
26201      eval path="$path"
26202      if test ! -f "$path" && test ! -d "$path"; then
26203        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26204      fi
26205
26206      if test -d "$path"; then
26207        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26208      else
26209        dir="`$DIRNAME "$path"`"
26210        base="`$BASENAME "$path"`"
26211        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26212      fi
26213    fi
26214  fi
26215
26216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26217$as_echo_n "checking for Boot JDK... " >&6; }
26218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26219$as_echo "$BOOT_JDK" >&6; }
26220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26221$as_echo_n "checking Boot JDK version... " >&6; }
26222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26224$as_echo "$BOOT_JDK_VERSION" >&6; }
26225          fi # end check jdk version
26226        fi # end check javac
26227      fi # end check java
26228    fi # end check boot jdk found
26229  fi
26230
26231
26232  if test "x$BOOT_JDK_FOUND" = xno; then
26233    # Now execute the test
26234
26235  if test -x /usr/libexec/java_home; then
26236    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26237    BOOT_JDK_FOUND=maybe
26238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26239$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26240  fi
26241
26242
26243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26245      # Do we have a bin/java?
26246      if test ! -x "$BOOT_JDK/bin/java"; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26249        BOOT_JDK_FOUND=no
26250      else
26251        # Do we have a bin/javac?
26252        if test ! -x "$BOOT_JDK/bin/javac"; then
26253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26257          BOOT_JDK_FOUND=no
26258        else
26259          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26260          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26261
26262          # Extra M4 quote needed to protect [] in grep expression.
26263          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26264          if test "x$FOUND_CORRECT_VERSION" = x; then
26265            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26267            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26268$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26269            BOOT_JDK_FOUND=no
26270          else
26271            # We're done! :-)
26272            BOOT_JDK_FOUND=yes
26273
26274  # Only process if variable expands to non-empty
26275
26276  if test "x$BOOT_JDK" != x; then
26277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26278
26279  # Input might be given as Windows format, start by converting to
26280  # unix format.
26281  path="$BOOT_JDK"
26282  new_path=`$CYGPATH -u "$path"`
26283
26284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26287  # "foo.exe" is OK but "foo" is an error.
26288  #
26289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26290  # It is also a way to make sure we got the proper file name for the real test later on.
26291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26292  if test "x$test_shortpath" = x; then
26293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26295    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26296  fi
26297
26298  # Call helper function which possibly converts this using DOS-style short mode.
26299  # If so, the updated path is stored in $new_path.
26300
26301  input_path="$new_path"
26302  # Check if we need to convert this using DOS-style short mode. If the path
26303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26304  # take no chances and rewrite it.
26305  # Note: m4 eats our [], so we need to use [ and ] instead.
26306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26307  if test "x$has_forbidden_chars" != x; then
26308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26312      # Going to short mode and back again did indeed matter. Since short mode is
26313      # case insensitive, let's make it lowercase to improve readability.
26314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26315      # Now convert it back to Unix-style (cygpath)
26316      input_path=`$CYGPATH -u "$shortmode_path"`
26317      new_path="$input_path"
26318    fi
26319  fi
26320
26321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26322  if test "x$test_cygdrive_prefix" = x; then
26323    # As a simple fix, exclude /usr/bin since it's not a real path.
26324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26326      # a path prefixed by /cygdrive for fixpath to work.
26327      new_path="$CYGWIN_ROOT_PATH$input_path"
26328    fi
26329  fi
26330
26331
26332  if test "x$path" != "x$new_path"; then
26333    BOOT_JDK="$new_path"
26334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26336  fi
26337
26338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26339
26340  path="$BOOT_JDK"
26341  has_colon=`$ECHO $path | $GREP ^.:`
26342  new_path="$path"
26343  if test "x$has_colon" = x; then
26344    # Not in mixed or Windows style, start by that.
26345    new_path=`cmd //c echo $path`
26346  fi
26347
26348
26349  input_path="$new_path"
26350  # Check if we need to convert this using DOS-style short mode. If the path
26351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26352  # take no chances and rewrite it.
26353  # Note: m4 eats our [], so we need to use [ and ] instead.
26354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26355  if test "x$has_forbidden_chars" != x; then
26356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26358  fi
26359
26360
26361  windows_path="$new_path"
26362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26363    unix_path=`$CYGPATH -u "$windows_path"`
26364    new_path="$unix_path"
26365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26367    new_path="$unix_path"
26368  fi
26369
26370  if test "x$path" != "x$new_path"; then
26371    BOOT_JDK="$new_path"
26372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26374  fi
26375
26376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26378
26379    else
26380      # We're on a unix platform. Hooray! :)
26381      path="$BOOT_JDK"
26382      has_space=`$ECHO "$path" | $GREP " "`
26383      if test "x$has_space" != x; then
26384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26386        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26387      fi
26388
26389      # Use eval to expand a potential ~
26390      eval path="$path"
26391      if test ! -f "$path" && test ! -d "$path"; then
26392        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26393      fi
26394
26395      if test -d "$path"; then
26396        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26397      else
26398        dir="`$DIRNAME "$path"`"
26399        base="`$BASENAME "$path"`"
26400        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26401      fi
26402    fi
26403  fi
26404
26405            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26406$as_echo_n "checking for Boot JDK... " >&6; }
26407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26408$as_echo "$BOOT_JDK" >&6; }
26409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26410$as_echo_n "checking Boot JDK version... " >&6; }
26411            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26413$as_echo "$BOOT_JDK_VERSION" >&6; }
26414          fi # end check jdk version
26415        fi # end check javac
26416      fi # end check java
26417    fi # end check boot jdk found
26418  fi
26419
26420
26421  if test "x$BOOT_JDK_FOUND" = xno; then
26422    # Now execute the test
26423
26424  if test -x /usr/libexec/java_home; then
26425    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26426    BOOT_JDK_FOUND=maybe
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26428$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26429  fi
26430
26431
26432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26434      # Do we have a bin/java?
26435      if test ! -x "$BOOT_JDK/bin/java"; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26438        BOOT_JDK_FOUND=no
26439      else
26440        # Do we have a bin/javac?
26441        if test ! -x "$BOOT_JDK/bin/javac"; then
26442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26446          BOOT_JDK_FOUND=no
26447        else
26448          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26449          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26450
26451          # Extra M4 quote needed to protect [] in grep expression.
26452          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26453          if test "x$FOUND_CORRECT_VERSION" = x; then
26454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26456            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26457$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26458            BOOT_JDK_FOUND=no
26459          else
26460            # We're done! :-)
26461            BOOT_JDK_FOUND=yes
26462
26463  # Only process if variable expands to non-empty
26464
26465  if test "x$BOOT_JDK" != x; then
26466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26467
26468  # Input might be given as Windows format, start by converting to
26469  # unix format.
26470  path="$BOOT_JDK"
26471  new_path=`$CYGPATH -u "$path"`
26472
26473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26476  # "foo.exe" is OK but "foo" is an error.
26477  #
26478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26479  # It is also a way to make sure we got the proper file name for the real test later on.
26480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26481  if test "x$test_shortpath" = x; then
26482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26485  fi
26486
26487  # Call helper function which possibly converts this using DOS-style short mode.
26488  # If so, the updated path is stored in $new_path.
26489
26490  input_path="$new_path"
26491  # Check if we need to convert this using DOS-style short mode. If the path
26492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26493  # take no chances and rewrite it.
26494  # Note: m4 eats our [], so we need to use [ and ] instead.
26495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26496  if test "x$has_forbidden_chars" != x; then
26497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26501      # Going to short mode and back again did indeed matter. Since short mode is
26502      # case insensitive, let's make it lowercase to improve readability.
26503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26504      # Now convert it back to Unix-style (cygpath)
26505      input_path=`$CYGPATH -u "$shortmode_path"`
26506      new_path="$input_path"
26507    fi
26508  fi
26509
26510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26511  if test "x$test_cygdrive_prefix" = x; then
26512    # As a simple fix, exclude /usr/bin since it's not a real path.
26513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26515      # a path prefixed by /cygdrive for fixpath to work.
26516      new_path="$CYGWIN_ROOT_PATH$input_path"
26517    fi
26518  fi
26519
26520
26521  if test "x$path" != "x$new_path"; then
26522    BOOT_JDK="$new_path"
26523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26525  fi
26526
26527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26528
26529  path="$BOOT_JDK"
26530  has_colon=`$ECHO $path | $GREP ^.:`
26531  new_path="$path"
26532  if test "x$has_colon" = x; then
26533    # Not in mixed or Windows style, start by that.
26534    new_path=`cmd //c echo $path`
26535  fi
26536
26537
26538  input_path="$new_path"
26539  # Check if we need to convert this using DOS-style short mode. If the path
26540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26541  # take no chances and rewrite it.
26542  # Note: m4 eats our [], so we need to use [ and ] instead.
26543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26544  if test "x$has_forbidden_chars" != x; then
26545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26547  fi
26548
26549
26550  windows_path="$new_path"
26551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552    unix_path=`$CYGPATH -u "$windows_path"`
26553    new_path="$unix_path"
26554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26556    new_path="$unix_path"
26557  fi
26558
26559  if test "x$path" != "x$new_path"; then
26560    BOOT_JDK="$new_path"
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26563  fi
26564
26565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26567
26568    else
26569      # We're on a unix platform. Hooray! :)
26570      path="$BOOT_JDK"
26571      has_space=`$ECHO "$path" | $GREP " "`
26572      if test "x$has_space" != x; then
26573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26576      fi
26577
26578      # Use eval to expand a potential ~
26579      eval path="$path"
26580      if test ! -f "$path" && test ! -d "$path"; then
26581        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26582      fi
26583
26584      if test -d "$path"; then
26585        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26586      else
26587        dir="`$DIRNAME "$path"`"
26588        base="`$BASENAME "$path"`"
26589        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26590      fi
26591    fi
26592  fi
26593
26594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26595$as_echo_n "checking for Boot JDK... " >&6; }
26596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26597$as_echo "$BOOT_JDK" >&6; }
26598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26599$as_echo_n "checking Boot JDK version... " >&6; }
26600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26602$as_echo "$BOOT_JDK_VERSION" >&6; }
26603          fi # end check jdk version
26604        fi # end check javac
26605      fi # end check java
26606    fi # end check boot jdk found
26607  fi
26608
26609  fi
26610
26611
26612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26614      # Do we have a bin/java?
26615      if test ! -x "$BOOT_JDK/bin/java"; then
26616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26618        BOOT_JDK_FOUND=no
26619      else
26620        # Do we have a bin/javac?
26621        if test ! -x "$BOOT_JDK/bin/javac"; then
26622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26626          BOOT_JDK_FOUND=no
26627        else
26628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26630
26631          # Extra M4 quote needed to protect [] in grep expression.
26632          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26633          if test "x$FOUND_CORRECT_VERSION" = x; then
26634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26638            BOOT_JDK_FOUND=no
26639          else
26640            # We're done! :-)
26641            BOOT_JDK_FOUND=yes
26642
26643  # Only process if variable expands to non-empty
26644
26645  if test "x$BOOT_JDK" != x; then
26646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26647
26648  # Input might be given as Windows format, start by converting to
26649  # unix format.
26650  path="$BOOT_JDK"
26651  new_path=`$CYGPATH -u "$path"`
26652
26653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26656  # "foo.exe" is OK but "foo" is an error.
26657  #
26658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26659  # It is also a way to make sure we got the proper file name for the real test later on.
26660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26661  if test "x$test_shortpath" = x; then
26662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26665  fi
26666
26667  # Call helper function which possibly converts this using DOS-style short mode.
26668  # If so, the updated path is stored in $new_path.
26669
26670  input_path="$new_path"
26671  # Check if we need to convert this using DOS-style short mode. If the path
26672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26673  # take no chances and rewrite it.
26674  # Note: m4 eats our [], so we need to use [ and ] instead.
26675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26676  if test "x$has_forbidden_chars" != x; then
26677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26681      # Going to short mode and back again did indeed matter. Since short mode is
26682      # case insensitive, let's make it lowercase to improve readability.
26683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26684      # Now convert it back to Unix-style (cygpath)
26685      input_path=`$CYGPATH -u "$shortmode_path"`
26686      new_path="$input_path"
26687    fi
26688  fi
26689
26690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26691  if test "x$test_cygdrive_prefix" = x; then
26692    # As a simple fix, exclude /usr/bin since it's not a real path.
26693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26695      # a path prefixed by /cygdrive for fixpath to work.
26696      new_path="$CYGWIN_ROOT_PATH$input_path"
26697    fi
26698  fi
26699
26700
26701  if test "x$path" != "x$new_path"; then
26702    BOOT_JDK="$new_path"
26703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26705  fi
26706
26707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26708
26709  path="$BOOT_JDK"
26710  has_colon=`$ECHO $path | $GREP ^.:`
26711  new_path="$path"
26712  if test "x$has_colon" = x; then
26713    # Not in mixed or Windows style, start by that.
26714    new_path=`cmd //c echo $path`
26715  fi
26716
26717
26718  input_path="$new_path"
26719  # Check if we need to convert this using DOS-style short mode. If the path
26720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26721  # take no chances and rewrite it.
26722  # Note: m4 eats our [], so we need to use [ and ] instead.
26723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26724  if test "x$has_forbidden_chars" != x; then
26725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26727  fi
26728
26729
26730  windows_path="$new_path"
26731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26732    unix_path=`$CYGPATH -u "$windows_path"`
26733    new_path="$unix_path"
26734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26736    new_path="$unix_path"
26737  fi
26738
26739  if test "x$path" != "x$new_path"; then
26740    BOOT_JDK="$new_path"
26741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26743  fi
26744
26745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26747
26748    else
26749      # We're on a unix platform. Hooray! :)
26750      path="$BOOT_JDK"
26751      has_space=`$ECHO "$path" | $GREP " "`
26752      if test "x$has_space" != x; then
26753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26756      fi
26757
26758      # Use eval to expand a potential ~
26759      eval path="$path"
26760      if test ! -f "$path" && test ! -d "$path"; then
26761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26762      fi
26763
26764      if test -d "$path"; then
26765        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26766      else
26767        dir="`$DIRNAME "$path"`"
26768        base="`$BASENAME "$path"`"
26769        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26770      fi
26771    fi
26772  fi
26773
26774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26775$as_echo_n "checking for Boot JDK... " >&6; }
26776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26777$as_echo "$BOOT_JDK" >&6; }
26778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26779$as_echo_n "checking Boot JDK version... " >&6; }
26780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26782$as_echo "$BOOT_JDK_VERSION" >&6; }
26783          fi # end check jdk version
26784        fi # end check javac
26785      fi # end check java
26786    fi # end check boot jdk found
26787  fi
26788
26789
26790  # Test: Is $JAVA_HOME set?
26791
26792  if test "x$BOOT_JDK_FOUND" = xno; then
26793    # Now execute the test
26794
26795  if test "x$JAVA_HOME" != x; then
26796    JAVA_HOME_PROCESSED="$JAVA_HOME"
26797
26798  # Only process if variable expands to non-empty
26799
26800  if test "x$JAVA_HOME_PROCESSED" != x; then
26801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802
26803  # Input might be given as Windows format, start by converting to
26804  # unix format.
26805  path="$JAVA_HOME_PROCESSED"
26806  new_path=`$CYGPATH -u "$path"`
26807
26808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26811  # "foo.exe" is OK but "foo" is an error.
26812  #
26813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26814  # It is also a way to make sure we got the proper file name for the real test later on.
26815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26816  if test "x$test_shortpath" = x; then
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26818$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26819    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26820  fi
26821
26822  # Call helper function which possibly converts this using DOS-style short mode.
26823  # If so, the updated path is stored in $new_path.
26824
26825  input_path="$new_path"
26826  # Check if we need to convert this using DOS-style short mode. If the path
26827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26828  # take no chances and rewrite it.
26829  # Note: m4 eats our [], so we need to use [ and ] instead.
26830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26831  if test "x$has_forbidden_chars" != x; then
26832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26836      # Going to short mode and back again did indeed matter. Since short mode is
26837      # case insensitive, let's make it lowercase to improve readability.
26838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839      # Now convert it back to Unix-style (cygpath)
26840      input_path=`$CYGPATH -u "$shortmode_path"`
26841      new_path="$input_path"
26842    fi
26843  fi
26844
26845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26846  if test "x$test_cygdrive_prefix" = x; then
26847    # As a simple fix, exclude /usr/bin since it's not a real path.
26848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26850      # a path prefixed by /cygdrive for fixpath to work.
26851      new_path="$CYGWIN_ROOT_PATH$input_path"
26852    fi
26853  fi
26854
26855
26856  if test "x$path" != "x$new_path"; then
26857    JAVA_HOME_PROCESSED="$new_path"
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26859$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26860  fi
26861
26862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863
26864  path="$JAVA_HOME_PROCESSED"
26865  has_colon=`$ECHO $path | $GREP ^.:`
26866  new_path="$path"
26867  if test "x$has_colon" = x; then
26868    # Not in mixed or Windows style, start by that.
26869    new_path=`cmd //c echo $path`
26870  fi
26871
26872
26873  input_path="$new_path"
26874  # Check if we need to convert this using DOS-style short mode. If the path
26875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876  # take no chances and rewrite it.
26877  # Note: m4 eats our [], so we need to use [ and ] instead.
26878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26879  if test "x$has_forbidden_chars" != x; then
26880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26882  fi
26883
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894  if test "x$path" != "x$new_path"; then
26895    JAVA_HOME_PROCESSED="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26898  fi
26899
26900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26902
26903    else
26904      # We're on a unix platform. Hooray! :)
26905      path="$JAVA_HOME_PROCESSED"
26906      has_space=`$ECHO "$path" | $GREP " "`
26907      if test "x$has_space" != x; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26909$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26911      fi
26912
26913      # Use eval to expand a potential ~
26914      eval path="$path"
26915      if test ! -f "$path" && test ! -d "$path"; then
26916        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26917      fi
26918
26919      if test -d "$path"; then
26920        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26921      else
26922        dir="`$DIRNAME "$path"`"
26923        base="`$BASENAME "$path"`"
26924        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26925      fi
26926    fi
26927  fi
26928
26929    if test ! -d "$JAVA_HOME_PROCESSED"; then
26930      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26931$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26932    else
26933      # Aha, the user has set a JAVA_HOME
26934      # let us use that as the Boot JDK.
26935      BOOT_JDK="$JAVA_HOME_PROCESSED"
26936      BOOT_JDK_FOUND=maybe
26937      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26938$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26939    fi
26940  fi
26941
26942
26943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26945      # Do we have a bin/java?
26946      if test ! -x "$BOOT_JDK/bin/java"; then
26947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26949        BOOT_JDK_FOUND=no
26950      else
26951        # Do we have a bin/javac?
26952        if test ! -x "$BOOT_JDK/bin/javac"; then
26953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26957          BOOT_JDK_FOUND=no
26958        else
26959          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26960          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26961
26962          # Extra M4 quote needed to protect [] in grep expression.
26963          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26964          if test "x$FOUND_CORRECT_VERSION" = x; then
26965            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26968$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26969            BOOT_JDK_FOUND=no
26970          else
26971            # We're done! :-)
26972            BOOT_JDK_FOUND=yes
26973
26974  # Only process if variable expands to non-empty
26975
26976  if test "x$BOOT_JDK" != x; then
26977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26978
26979  # Input might be given as Windows format, start by converting to
26980  # unix format.
26981  path="$BOOT_JDK"
26982  new_path=`$CYGPATH -u "$path"`
26983
26984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26987  # "foo.exe" is OK but "foo" is an error.
26988  #
26989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26990  # It is also a way to make sure we got the proper file name for the real test later on.
26991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26992  if test "x$test_shortpath" = x; then
26993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26996  fi
26997
26998  # Call helper function which possibly converts this using DOS-style short mode.
26999  # If so, the updated path is stored in $new_path.
27000
27001  input_path="$new_path"
27002  # Check if we need to convert this using DOS-style short mode. If the path
27003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27004  # take no chances and rewrite it.
27005  # Note: m4 eats our [], so we need to use [ and ] instead.
27006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27007  if test "x$has_forbidden_chars" != x; then
27008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27012      # Going to short mode and back again did indeed matter. Since short mode is
27013      # case insensitive, let's make it lowercase to improve readability.
27014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27015      # Now convert it back to Unix-style (cygpath)
27016      input_path=`$CYGPATH -u "$shortmode_path"`
27017      new_path="$input_path"
27018    fi
27019  fi
27020
27021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27022  if test "x$test_cygdrive_prefix" = x; then
27023    # As a simple fix, exclude /usr/bin since it's not a real path.
27024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27026      # a path prefixed by /cygdrive for fixpath to work.
27027      new_path="$CYGWIN_ROOT_PATH$input_path"
27028    fi
27029  fi
27030
27031
27032  if test "x$path" != "x$new_path"; then
27033    BOOT_JDK="$new_path"
27034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27036  fi
27037
27038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27039
27040  path="$BOOT_JDK"
27041  has_colon=`$ECHO $path | $GREP ^.:`
27042  new_path="$path"
27043  if test "x$has_colon" = x; then
27044    # Not in mixed or Windows style, start by that.
27045    new_path=`cmd //c echo $path`
27046  fi
27047
27048
27049  input_path="$new_path"
27050  # Check if we need to convert this using DOS-style short mode. If the path
27051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27052  # take no chances and rewrite it.
27053  # Note: m4 eats our [], so we need to use [ and ] instead.
27054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27055  if test "x$has_forbidden_chars" != x; then
27056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27058  fi
27059
27060
27061  windows_path="$new_path"
27062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063    unix_path=`$CYGPATH -u "$windows_path"`
27064    new_path="$unix_path"
27065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067    new_path="$unix_path"
27068  fi
27069
27070  if test "x$path" != "x$new_path"; then
27071    BOOT_JDK="$new_path"
27072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27074  fi
27075
27076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27078
27079    else
27080      # We're on a unix platform. Hooray! :)
27081      path="$BOOT_JDK"
27082      has_space=`$ECHO "$path" | $GREP " "`
27083      if test "x$has_space" != x; then
27084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27087      fi
27088
27089      # Use eval to expand a potential ~
27090      eval path="$path"
27091      if test ! -f "$path" && test ! -d "$path"; then
27092        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27093      fi
27094
27095      if test -d "$path"; then
27096        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27097      else
27098        dir="`$DIRNAME "$path"`"
27099        base="`$BASENAME "$path"`"
27100        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27101      fi
27102    fi
27103  fi
27104
27105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27106$as_echo_n "checking for Boot JDK... " >&6; }
27107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27108$as_echo "$BOOT_JDK" >&6; }
27109            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27110$as_echo_n "checking Boot JDK version... " >&6; }
27111            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27113$as_echo "$BOOT_JDK_VERSION" >&6; }
27114          fi # end check jdk version
27115        fi # end check javac
27116      fi # end check java
27117    fi # end check boot jdk found
27118  fi
27119
27120
27121  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27122
27123  if test "x$BOOT_JDK_FOUND" = xno; then
27124    # Now execute the test
27125
27126  # Extract the first word of "javac", so it can be a program name with args.
27127set dummy javac; ac_word=$2
27128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27129$as_echo_n "checking for $ac_word... " >&6; }
27130if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27131  $as_echo_n "(cached) " >&6
27132else
27133  case $JAVAC_CHECK in
27134  [\\/]* | ?:[\\/]*)
27135  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27136  ;;
27137  *)
27138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27139for as_dir in $PATH
27140do
27141  IFS=$as_save_IFS
27142  test -z "$as_dir" && as_dir=.
27143    for ac_exec_ext in '' $ac_executable_extensions; do
27144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27145    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27147    break 2
27148  fi
27149done
27150  done
27151IFS=$as_save_IFS
27152
27153  ;;
27154esac
27155fi
27156JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27157if test -n "$JAVAC_CHECK"; then
27158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27159$as_echo "$JAVAC_CHECK" >&6; }
27160else
27161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27162$as_echo "no" >&6; }
27163fi
27164
27165
27166  # Extract the first word of "java", so it can be a program name with args.
27167set dummy java; ac_word=$2
27168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27169$as_echo_n "checking for $ac_word... " >&6; }
27170if ${ac_cv_path_JAVA_CHECK+:} false; then :
27171  $as_echo_n "(cached) " >&6
27172else
27173  case $JAVA_CHECK in
27174  [\\/]* | ?:[\\/]*)
27175  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27176  ;;
27177  *)
27178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27179for as_dir in $PATH
27180do
27181  IFS=$as_save_IFS
27182  test -z "$as_dir" && as_dir=.
27183    for ac_exec_ext in '' $ac_executable_extensions; do
27184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27185    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27187    break 2
27188  fi
27189done
27190  done
27191IFS=$as_save_IFS
27192
27193  ;;
27194esac
27195fi
27196JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27197if test -n "$JAVA_CHECK"; then
27198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27199$as_echo "$JAVA_CHECK" >&6; }
27200else
27201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27202$as_echo "no" >&6; }
27203fi
27204
27205
27206  BINARY="$JAVAC_CHECK"
27207  if test "x$JAVAC_CHECK" = x; then
27208    BINARY="$JAVA_CHECK"
27209  fi
27210  if test "x$BINARY" != x; then
27211    # So there is a java(c) binary, it might be part of a JDK.
27212    # Lets find the JDK/JRE directory by following symbolic links.
27213    # Linux/GNU systems often have links from /usr/bin/java to
27214    # /etc/alternatives/java to the real JDK binary.
27215
27216  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27217    # Follow a chain of symbolic links. Use readlink
27218    # where it exists, else fall back to horribly
27219    # complicated shell code.
27220    if test "x$READLINK_TESTED" != yes; then
27221      # On MacOSX there is a readlink tool with a different
27222      # purpose than the GNU readlink tool. Check the found readlink.
27223      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27224      if test "x$ISGNU" = x; then
27225        # A readlink that we do not know how to use.
27226        # Are there other non-GNU readlinks out there?
27227        READLINK_TESTED=yes
27228        READLINK=
27229      fi
27230    fi
27231
27232    if test "x$READLINK" != x; then
27233      BINARY=`$READLINK -f $BINARY`
27234    else
27235      # Save the current directory for restoring afterwards
27236      STARTDIR=$PWD
27237      COUNTER=0
27238      sym_link_dir=`$DIRNAME $BINARY`
27239      sym_link_file=`$BASENAME $BINARY`
27240      cd $sym_link_dir
27241      # Use -P flag to resolve symlinks in directories.
27242      cd `$THEPWDCMD -P`
27243      sym_link_dir=`$THEPWDCMD -P`
27244      # Resolve file symlinks
27245      while test $COUNTER -lt 20; do
27246        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27247        if test "x$ISLINK" == x; then
27248          # This is not a symbolic link! We are done!
27249          break
27250        fi
27251        # Again resolve directory symlinks since the target of the just found
27252        # link could be in a different directory
27253        cd `$DIRNAME $ISLINK`
27254        sym_link_dir=`$THEPWDCMD -P`
27255        sym_link_file=`$BASENAME $ISLINK`
27256        let COUNTER=COUNTER+1
27257      done
27258      cd $STARTDIR
27259      BINARY=$sym_link_dir/$sym_link_file
27260    fi
27261  fi
27262
27263    BOOT_JDK=`dirname "$BINARY"`
27264    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27265    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27266      # Looks like we found ourselves an JDK
27267      BOOT_JDK_FOUND=maybe
27268      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27269$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27270    fi
27271  fi
27272
27273
27274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27276      # Do we have a bin/java?
27277      if test ! -x "$BOOT_JDK/bin/java"; then
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27280        BOOT_JDK_FOUND=no
27281      else
27282        # Do we have a bin/javac?
27283        if test ! -x "$BOOT_JDK/bin/javac"; then
27284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27288          BOOT_JDK_FOUND=no
27289        else
27290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27292
27293          # Extra M4 quote needed to protect [] in grep expression.
27294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27295          if test "x$FOUND_CORRECT_VERSION" = x; then
27296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27300            BOOT_JDK_FOUND=no
27301          else
27302            # We're done! :-)
27303            BOOT_JDK_FOUND=yes
27304
27305  # Only process if variable expands to non-empty
27306
27307  if test "x$BOOT_JDK" != x; then
27308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27309
27310  # Input might be given as Windows format, start by converting to
27311  # unix format.
27312  path="$BOOT_JDK"
27313  new_path=`$CYGPATH -u "$path"`
27314
27315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27318  # "foo.exe" is OK but "foo" is an error.
27319  #
27320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27321  # It is also a way to make sure we got the proper file name for the real test later on.
27322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27323  if test "x$test_shortpath" = x; then
27324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27327  fi
27328
27329  # Call helper function which possibly converts this using DOS-style short mode.
27330  # If so, the updated path is stored in $new_path.
27331
27332  input_path="$new_path"
27333  # Check if we need to convert this using DOS-style short mode. If the path
27334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27335  # take no chances and rewrite it.
27336  # Note: m4 eats our [], so we need to use [ and ] instead.
27337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27338  if test "x$has_forbidden_chars" != x; then
27339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27343      # Going to short mode and back again did indeed matter. Since short mode is
27344      # case insensitive, let's make it lowercase to improve readability.
27345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27346      # Now convert it back to Unix-style (cygpath)
27347      input_path=`$CYGPATH -u "$shortmode_path"`
27348      new_path="$input_path"
27349    fi
27350  fi
27351
27352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27353  if test "x$test_cygdrive_prefix" = x; then
27354    # As a simple fix, exclude /usr/bin since it's not a real path.
27355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27357      # a path prefixed by /cygdrive for fixpath to work.
27358      new_path="$CYGWIN_ROOT_PATH$input_path"
27359    fi
27360  fi
27361
27362
27363  if test "x$path" != "x$new_path"; then
27364    BOOT_JDK="$new_path"
27365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27367  fi
27368
27369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370
27371  path="$BOOT_JDK"
27372  has_colon=`$ECHO $path | $GREP ^.:`
27373  new_path="$path"
27374  if test "x$has_colon" = x; then
27375    # Not in mixed or Windows style, start by that.
27376    new_path=`cmd //c echo $path`
27377  fi
27378
27379
27380  input_path="$new_path"
27381  # Check if we need to convert this using DOS-style short mode. If the path
27382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27383  # take no chances and rewrite it.
27384  # Note: m4 eats our [], so we need to use [ and ] instead.
27385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27386  if test "x$has_forbidden_chars" != x; then
27387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27389  fi
27390
27391
27392  windows_path="$new_path"
27393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27394    unix_path=`$CYGPATH -u "$windows_path"`
27395    new_path="$unix_path"
27396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27398    new_path="$unix_path"
27399  fi
27400
27401  if test "x$path" != "x$new_path"; then
27402    BOOT_JDK="$new_path"
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27405  fi
27406
27407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27409
27410    else
27411      # We're on a unix platform. Hooray! :)
27412      path="$BOOT_JDK"
27413      has_space=`$ECHO "$path" | $GREP " "`
27414      if test "x$has_space" != x; then
27415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27418      fi
27419
27420      # Use eval to expand a potential ~
27421      eval path="$path"
27422      if test ! -f "$path" && test ! -d "$path"; then
27423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27424      fi
27425
27426      if test -d "$path"; then
27427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27428      else
27429        dir="`$DIRNAME "$path"`"
27430        base="`$BASENAME "$path"`"
27431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27432      fi
27433    fi
27434  fi
27435
27436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27437$as_echo_n "checking for Boot JDK... " >&6; }
27438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27439$as_echo "$BOOT_JDK" >&6; }
27440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27441$as_echo_n "checking Boot JDK version... " >&6; }
27442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27444$as_echo "$BOOT_JDK_VERSION" >&6; }
27445          fi # end check jdk version
27446        fi # end check javac
27447      fi # end check java
27448    fi # end check boot jdk found
27449  fi
27450
27451
27452  # Test: Is there a JDK installed in default, well-known locations?
27453
27454  if test "x$BOOT_JDK_FOUND" = xno; then
27455    # Now execute the test
27456
27457  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27458
27459  if test "x$BOOT_JDK_FOUND" = xno; then
27460    # Now execute the test
27461
27462  if test "x$ProgramW6432" != x; then
27463    VIRTUAL_DIR="$ProgramW6432/Java"
27464
27465  windows_path="$VIRTUAL_DIR"
27466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27467    unix_path=`$CYGPATH -u "$windows_path"`
27468    VIRTUAL_DIR="$unix_path"
27469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27471    VIRTUAL_DIR="$unix_path"
27472  fi
27473
27474
27475  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27476  BOOT_JDK_SUFFIX=""
27477  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27478  if test "x$ALL_JDKS_FOUND" != x; then
27479    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27480
27481  if test "x$BOOT_JDK_FOUND" = xno; then
27482    # Now execute the test
27483
27484        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27485        if test -d "$BOOT_JDK"; then
27486          BOOT_JDK_FOUND=maybe
27487          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27488$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27489        fi
27490
27491
27492    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27493    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27494      # Do we have a bin/java?
27495      if test ! -x "$BOOT_JDK/bin/java"; then
27496        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27498        BOOT_JDK_FOUND=no
27499      else
27500        # Do we have a bin/javac?
27501        if test ! -x "$BOOT_JDK/bin/javac"; then
27502          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27504          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27505$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27506          BOOT_JDK_FOUND=no
27507        else
27508          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27509          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27510
27511          # Extra M4 quote needed to protect [] in grep expression.
27512          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27513          if test "x$FOUND_CORRECT_VERSION" = x; then
27514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27516            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27517$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27518            BOOT_JDK_FOUND=no
27519          else
27520            # We're done! :-)
27521            BOOT_JDK_FOUND=yes
27522
27523  # Only process if variable expands to non-empty
27524
27525  if test "x$BOOT_JDK" != x; then
27526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27527
27528  # Input might be given as Windows format, start by converting to
27529  # unix format.
27530  path="$BOOT_JDK"
27531  new_path=`$CYGPATH -u "$path"`
27532
27533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27536  # "foo.exe" is OK but "foo" is an error.
27537  #
27538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27539  # It is also a way to make sure we got the proper file name for the real test later on.
27540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27541  if test "x$test_shortpath" = x; then
27542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27544    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27545  fi
27546
27547  # Call helper function which possibly converts this using DOS-style short mode.
27548  # If so, the updated path is stored in $new_path.
27549
27550  input_path="$new_path"
27551  # Check if we need to convert this using DOS-style short mode. If the path
27552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27553  # take no chances and rewrite it.
27554  # Note: m4 eats our [], so we need to use [ and ] instead.
27555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27556  if test "x$has_forbidden_chars" != x; then
27557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27561      # Going to short mode and back again did indeed matter. Since short mode is
27562      # case insensitive, let's make it lowercase to improve readability.
27563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27564      # Now convert it back to Unix-style (cygpath)
27565      input_path=`$CYGPATH -u "$shortmode_path"`
27566      new_path="$input_path"
27567    fi
27568  fi
27569
27570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27571  if test "x$test_cygdrive_prefix" = x; then
27572    # As a simple fix, exclude /usr/bin since it's not a real path.
27573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27575      # a path prefixed by /cygdrive for fixpath to work.
27576      new_path="$CYGWIN_ROOT_PATH$input_path"
27577    fi
27578  fi
27579
27580
27581  if test "x$path" != "x$new_path"; then
27582    BOOT_JDK="$new_path"
27583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27584$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27585  fi
27586
27587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27588
27589  path="$BOOT_JDK"
27590  has_colon=`$ECHO $path | $GREP ^.:`
27591  new_path="$path"
27592  if test "x$has_colon" = x; then
27593    # Not in mixed or Windows style, start by that.
27594    new_path=`cmd //c echo $path`
27595  fi
27596
27597
27598  input_path="$new_path"
27599  # Check if we need to convert this using DOS-style short mode. If the path
27600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27601  # take no chances and rewrite it.
27602  # Note: m4 eats our [], so we need to use [ and ] instead.
27603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27604  if test "x$has_forbidden_chars" != x; then
27605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27607  fi
27608
27609
27610  windows_path="$new_path"
27611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27612    unix_path=`$CYGPATH -u "$windows_path"`
27613    new_path="$unix_path"
27614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27616    new_path="$unix_path"
27617  fi
27618
27619  if test "x$path" != "x$new_path"; then
27620    BOOT_JDK="$new_path"
27621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27622$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27623  fi
27624
27625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27627
27628    else
27629      # We're on a unix platform. Hooray! :)
27630      path="$BOOT_JDK"
27631      has_space=`$ECHO "$path" | $GREP " "`
27632      if test "x$has_space" != x; then
27633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27636      fi
27637
27638      # Use eval to expand a potential ~
27639      eval path="$path"
27640      if test ! -f "$path" && test ! -d "$path"; then
27641        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27642      fi
27643
27644      if test -d "$path"; then
27645        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27646      else
27647        dir="`$DIRNAME "$path"`"
27648        base="`$BASENAME "$path"`"
27649        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27650      fi
27651    fi
27652  fi
27653
27654            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27655$as_echo_n "checking for Boot JDK... " >&6; }
27656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27657$as_echo "$BOOT_JDK" >&6; }
27658            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27659$as_echo_n "checking Boot JDK version... " >&6; }
27660            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27662$as_echo "$BOOT_JDK_VERSION" >&6; }
27663          fi # end check jdk version
27664        fi # end check javac
27665      fi # end check java
27666    fi # end check boot jdk found
27667  fi
27668
27669    done
27670  fi
27671
27672  fi
27673
27674
27675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27677      # Do we have a bin/java?
27678      if test ! -x "$BOOT_JDK/bin/java"; then
27679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27681        BOOT_JDK_FOUND=no
27682      else
27683        # Do we have a bin/javac?
27684        if test ! -x "$BOOT_JDK/bin/javac"; then
27685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27689          BOOT_JDK_FOUND=no
27690        else
27691          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27692          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27693
27694          # Extra M4 quote needed to protect [] in grep expression.
27695          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27696          if test "x$FOUND_CORRECT_VERSION" = x; then
27697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27699            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27700$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27701            BOOT_JDK_FOUND=no
27702          else
27703            # We're done! :-)
27704            BOOT_JDK_FOUND=yes
27705
27706  # Only process if variable expands to non-empty
27707
27708  if test "x$BOOT_JDK" != x; then
27709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27710
27711  # Input might be given as Windows format, start by converting to
27712  # unix format.
27713  path="$BOOT_JDK"
27714  new_path=`$CYGPATH -u "$path"`
27715
27716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27719  # "foo.exe" is OK but "foo" is an error.
27720  #
27721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27722  # It is also a way to make sure we got the proper file name for the real test later on.
27723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27724  if test "x$test_shortpath" = x; then
27725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27727    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27728  fi
27729
27730  # Call helper function which possibly converts this using DOS-style short mode.
27731  # If so, the updated path is stored in $new_path.
27732
27733  input_path="$new_path"
27734  # Check if we need to convert this using DOS-style short mode. If the path
27735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27736  # take no chances and rewrite it.
27737  # Note: m4 eats our [], so we need to use [ and ] instead.
27738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27739  if test "x$has_forbidden_chars" != x; then
27740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27744      # Going to short mode and back again did indeed matter. Since short mode is
27745      # case insensitive, let's make it lowercase to improve readability.
27746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27747      # Now convert it back to Unix-style (cygpath)
27748      input_path=`$CYGPATH -u "$shortmode_path"`
27749      new_path="$input_path"
27750    fi
27751  fi
27752
27753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27754  if test "x$test_cygdrive_prefix" = x; then
27755    # As a simple fix, exclude /usr/bin since it's not a real path.
27756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27758      # a path prefixed by /cygdrive for fixpath to work.
27759      new_path="$CYGWIN_ROOT_PATH$input_path"
27760    fi
27761  fi
27762
27763
27764  if test "x$path" != "x$new_path"; then
27765    BOOT_JDK="$new_path"
27766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27768  fi
27769
27770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27771
27772  path="$BOOT_JDK"
27773  has_colon=`$ECHO $path | $GREP ^.:`
27774  new_path="$path"
27775  if test "x$has_colon" = x; then
27776    # Not in mixed or Windows style, start by that.
27777    new_path=`cmd //c echo $path`
27778  fi
27779
27780
27781  input_path="$new_path"
27782  # Check if we need to convert this using DOS-style short mode. If the path
27783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27784  # take no chances and rewrite it.
27785  # Note: m4 eats our [], so we need to use [ and ] instead.
27786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27787  if test "x$has_forbidden_chars" != x; then
27788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27790  fi
27791
27792
27793  windows_path="$new_path"
27794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27795    unix_path=`$CYGPATH -u "$windows_path"`
27796    new_path="$unix_path"
27797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27799    new_path="$unix_path"
27800  fi
27801
27802  if test "x$path" != "x$new_path"; then
27803    BOOT_JDK="$new_path"
27804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27806  fi
27807
27808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27810
27811    else
27812      # We're on a unix platform. Hooray! :)
27813      path="$BOOT_JDK"
27814      has_space=`$ECHO "$path" | $GREP " "`
27815      if test "x$has_space" != x; then
27816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27819      fi
27820
27821      # Use eval to expand a potential ~
27822      eval path="$path"
27823      if test ! -f "$path" && test ! -d "$path"; then
27824        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27825      fi
27826
27827      if test -d "$path"; then
27828        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27829      else
27830        dir="`$DIRNAME "$path"`"
27831        base="`$BASENAME "$path"`"
27832        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27833      fi
27834    fi
27835  fi
27836
27837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27838$as_echo_n "checking for Boot JDK... " >&6; }
27839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27840$as_echo "$BOOT_JDK" >&6; }
27841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27842$as_echo_n "checking Boot JDK version... " >&6; }
27843            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27845$as_echo "$BOOT_JDK_VERSION" >&6; }
27846          fi # end check jdk version
27847        fi # end check javac
27848      fi # end check java
27849    fi # end check boot jdk found
27850  fi
27851
27852
27853  if test "x$BOOT_JDK_FOUND" = xno; then
27854    # Now execute the test
27855
27856  if test "x$PROGRAMW6432" != x; then
27857    VIRTUAL_DIR="$PROGRAMW6432/Java"
27858
27859  windows_path="$VIRTUAL_DIR"
27860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27861    unix_path=`$CYGPATH -u "$windows_path"`
27862    VIRTUAL_DIR="$unix_path"
27863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27865    VIRTUAL_DIR="$unix_path"
27866  fi
27867
27868
27869  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27870  BOOT_JDK_SUFFIX=""
27871  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27872  if test "x$ALL_JDKS_FOUND" != x; then
27873    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27874
27875  if test "x$BOOT_JDK_FOUND" = xno; then
27876    # Now execute the test
27877
27878        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27879        if test -d "$BOOT_JDK"; then
27880          BOOT_JDK_FOUND=maybe
27881          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27882$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27883        fi
27884
27885
27886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27888      # Do we have a bin/java?
27889      if test ! -x "$BOOT_JDK/bin/java"; then
27890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27892        BOOT_JDK_FOUND=no
27893      else
27894        # Do we have a bin/javac?
27895        if test ! -x "$BOOT_JDK/bin/javac"; then
27896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27900          BOOT_JDK_FOUND=no
27901        else
27902          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27903          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27904
27905          # Extra M4 quote needed to protect [] in grep expression.
27906          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27907          if test "x$FOUND_CORRECT_VERSION" = x; then
27908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27910            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27912            BOOT_JDK_FOUND=no
27913          else
27914            # We're done! :-)
27915            BOOT_JDK_FOUND=yes
27916
27917  # Only process if variable expands to non-empty
27918
27919  if test "x$BOOT_JDK" != x; then
27920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27921
27922  # Input might be given as Windows format, start by converting to
27923  # unix format.
27924  path="$BOOT_JDK"
27925  new_path=`$CYGPATH -u "$path"`
27926
27927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27930  # "foo.exe" is OK but "foo" is an error.
27931  #
27932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27933  # It is also a way to make sure we got the proper file name for the real test later on.
27934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27935  if test "x$test_shortpath" = x; then
27936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27939  fi
27940
27941  # Call helper function which possibly converts this using DOS-style short mode.
27942  # If so, the updated path is stored in $new_path.
27943
27944  input_path="$new_path"
27945  # Check if we need to convert this using DOS-style short mode. If the path
27946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27947  # take no chances and rewrite it.
27948  # Note: m4 eats our [], so we need to use [ and ] instead.
27949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27950  if test "x$has_forbidden_chars" != x; then
27951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27955      # Going to short mode and back again did indeed matter. Since short mode is
27956      # case insensitive, let's make it lowercase to improve readability.
27957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27958      # Now convert it back to Unix-style (cygpath)
27959      input_path=`$CYGPATH -u "$shortmode_path"`
27960      new_path="$input_path"
27961    fi
27962  fi
27963
27964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27965  if test "x$test_cygdrive_prefix" = x; then
27966    # As a simple fix, exclude /usr/bin since it's not a real path.
27967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27969      # a path prefixed by /cygdrive for fixpath to work.
27970      new_path="$CYGWIN_ROOT_PATH$input_path"
27971    fi
27972  fi
27973
27974
27975  if test "x$path" != "x$new_path"; then
27976    BOOT_JDK="$new_path"
27977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27979  fi
27980
27981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27982
27983  path="$BOOT_JDK"
27984  has_colon=`$ECHO $path | $GREP ^.:`
27985  new_path="$path"
27986  if test "x$has_colon" = x; then
27987    # Not in mixed or Windows style, start by that.
27988    new_path=`cmd //c echo $path`
27989  fi
27990
27991
27992  input_path="$new_path"
27993  # Check if we need to convert this using DOS-style short mode. If the path
27994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27995  # take no chances and rewrite it.
27996  # Note: m4 eats our [], so we need to use [ and ] instead.
27997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27998  if test "x$has_forbidden_chars" != x; then
27999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28001  fi
28002
28003
28004  windows_path="$new_path"
28005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28006    unix_path=`$CYGPATH -u "$windows_path"`
28007    new_path="$unix_path"
28008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28010    new_path="$unix_path"
28011  fi
28012
28013  if test "x$path" != "x$new_path"; then
28014    BOOT_JDK="$new_path"
28015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28017  fi
28018
28019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28021
28022    else
28023      # We're on a unix platform. Hooray! :)
28024      path="$BOOT_JDK"
28025      has_space=`$ECHO "$path" | $GREP " "`
28026      if test "x$has_space" != x; then
28027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28030      fi
28031
28032      # Use eval to expand a potential ~
28033      eval path="$path"
28034      if test ! -f "$path" && test ! -d "$path"; then
28035        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28036      fi
28037
28038      if test -d "$path"; then
28039        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28040      else
28041        dir="`$DIRNAME "$path"`"
28042        base="`$BASENAME "$path"`"
28043        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28044      fi
28045    fi
28046  fi
28047
28048            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28049$as_echo_n "checking for Boot JDK... " >&6; }
28050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28051$as_echo "$BOOT_JDK" >&6; }
28052            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28053$as_echo_n "checking Boot JDK version... " >&6; }
28054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28056$as_echo "$BOOT_JDK_VERSION" >&6; }
28057          fi # end check jdk version
28058        fi # end check javac
28059      fi # end check java
28060    fi # end check boot jdk found
28061  fi
28062
28063    done
28064  fi
28065
28066  fi
28067
28068
28069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28071      # Do we have a bin/java?
28072      if test ! -x "$BOOT_JDK/bin/java"; then
28073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28075        BOOT_JDK_FOUND=no
28076      else
28077        # Do we have a bin/javac?
28078        if test ! -x "$BOOT_JDK/bin/javac"; then
28079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28083          BOOT_JDK_FOUND=no
28084        else
28085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28087
28088          # Extra M4 quote needed to protect [] in grep expression.
28089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28090          if test "x$FOUND_CORRECT_VERSION" = x; then
28091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28095            BOOT_JDK_FOUND=no
28096          else
28097            # We're done! :-)
28098            BOOT_JDK_FOUND=yes
28099
28100  # Only process if variable expands to non-empty
28101
28102  if test "x$BOOT_JDK" != x; then
28103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104
28105  # Input might be given as Windows format, start by converting to
28106  # unix format.
28107  path="$BOOT_JDK"
28108  new_path=`$CYGPATH -u "$path"`
28109
28110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28113  # "foo.exe" is OK but "foo" is an error.
28114  #
28115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28116  # It is also a way to make sure we got the proper file name for the real test later on.
28117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28118  if test "x$test_shortpath" = x; then
28119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28122  fi
28123
28124  # Call helper function which possibly converts this using DOS-style short mode.
28125  # If so, the updated path is stored in $new_path.
28126
28127  input_path="$new_path"
28128  # Check if we need to convert this using DOS-style short mode. If the path
28129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28130  # take no chances and rewrite it.
28131  # Note: m4 eats our [], so we need to use [ and ] instead.
28132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28133  if test "x$has_forbidden_chars" != x; then
28134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28138      # Going to short mode and back again did indeed matter. Since short mode is
28139      # case insensitive, let's make it lowercase to improve readability.
28140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28141      # Now convert it back to Unix-style (cygpath)
28142      input_path=`$CYGPATH -u "$shortmode_path"`
28143      new_path="$input_path"
28144    fi
28145  fi
28146
28147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28148  if test "x$test_cygdrive_prefix" = x; then
28149    # As a simple fix, exclude /usr/bin since it's not a real path.
28150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28152      # a path prefixed by /cygdrive for fixpath to work.
28153      new_path="$CYGWIN_ROOT_PATH$input_path"
28154    fi
28155  fi
28156
28157
28158  if test "x$path" != "x$new_path"; then
28159    BOOT_JDK="$new_path"
28160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28162  fi
28163
28164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165
28166  path="$BOOT_JDK"
28167  has_colon=`$ECHO $path | $GREP ^.:`
28168  new_path="$path"
28169  if test "x$has_colon" = x; then
28170    # Not in mixed or Windows style, start by that.
28171    new_path=`cmd //c echo $path`
28172  fi
28173
28174
28175  input_path="$new_path"
28176  # Check if we need to convert this using DOS-style short mode. If the path
28177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28178  # take no chances and rewrite it.
28179  # Note: m4 eats our [], so we need to use [ and ] instead.
28180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28181  if test "x$has_forbidden_chars" != x; then
28182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28184  fi
28185
28186
28187  windows_path="$new_path"
28188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28189    unix_path=`$CYGPATH -u "$windows_path"`
28190    new_path="$unix_path"
28191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28193    new_path="$unix_path"
28194  fi
28195
28196  if test "x$path" != "x$new_path"; then
28197    BOOT_JDK="$new_path"
28198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28200  fi
28201
28202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28204
28205    else
28206      # We're on a unix platform. Hooray! :)
28207      path="$BOOT_JDK"
28208      has_space=`$ECHO "$path" | $GREP " "`
28209      if test "x$has_space" != x; then
28210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28213      fi
28214
28215      # Use eval to expand a potential ~
28216      eval path="$path"
28217      if test ! -f "$path" && test ! -d "$path"; then
28218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28219      fi
28220
28221      if test -d "$path"; then
28222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28223      else
28224        dir="`$DIRNAME "$path"`"
28225        base="`$BASENAME "$path"`"
28226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28227      fi
28228    fi
28229  fi
28230
28231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28232$as_echo_n "checking for Boot JDK... " >&6; }
28233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28234$as_echo "$BOOT_JDK" >&6; }
28235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28236$as_echo_n "checking Boot JDK version... " >&6; }
28237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28239$as_echo "$BOOT_JDK_VERSION" >&6; }
28240          fi # end check jdk version
28241        fi # end check javac
28242      fi # end check java
28243    fi # end check boot jdk found
28244  fi
28245
28246
28247  if test "x$BOOT_JDK_FOUND" = xno; then
28248    # Now execute the test
28249
28250  if test "x$PROGRAMFILES" != x; then
28251    VIRTUAL_DIR="$PROGRAMFILES/Java"
28252
28253  windows_path="$VIRTUAL_DIR"
28254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28255    unix_path=`$CYGPATH -u "$windows_path"`
28256    VIRTUAL_DIR="$unix_path"
28257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28259    VIRTUAL_DIR="$unix_path"
28260  fi
28261
28262
28263  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28264  BOOT_JDK_SUFFIX=""
28265  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28266  if test "x$ALL_JDKS_FOUND" != x; then
28267    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28268
28269  if test "x$BOOT_JDK_FOUND" = xno; then
28270    # Now execute the test
28271
28272        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28273        if test -d "$BOOT_JDK"; then
28274          BOOT_JDK_FOUND=maybe
28275          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28276$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28277        fi
28278
28279
28280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28282      # Do we have a bin/java?
28283      if test ! -x "$BOOT_JDK/bin/java"; then
28284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28286        BOOT_JDK_FOUND=no
28287      else
28288        # Do we have a bin/javac?
28289        if test ! -x "$BOOT_JDK/bin/javac"; then
28290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28294          BOOT_JDK_FOUND=no
28295        else
28296          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28297          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28298
28299          # Extra M4 quote needed to protect [] in grep expression.
28300          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28301          if test "x$FOUND_CORRECT_VERSION" = x; then
28302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28304            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28305$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28306            BOOT_JDK_FOUND=no
28307          else
28308            # We're done! :-)
28309            BOOT_JDK_FOUND=yes
28310
28311  # Only process if variable expands to non-empty
28312
28313  if test "x$BOOT_JDK" != x; then
28314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28315
28316  # Input might be given as Windows format, start by converting to
28317  # unix format.
28318  path="$BOOT_JDK"
28319  new_path=`$CYGPATH -u "$path"`
28320
28321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28324  # "foo.exe" is OK but "foo" is an error.
28325  #
28326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28327  # It is also a way to make sure we got the proper file name for the real test later on.
28328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28329  if test "x$test_shortpath" = x; then
28330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28332    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28333  fi
28334
28335  # Call helper function which possibly converts this using DOS-style short mode.
28336  # If so, the updated path is stored in $new_path.
28337
28338  input_path="$new_path"
28339  # Check if we need to convert this using DOS-style short mode. If the path
28340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28341  # take no chances and rewrite it.
28342  # Note: m4 eats our [], so we need to use [ and ] instead.
28343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28344  if test "x$has_forbidden_chars" != x; then
28345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28349      # Going to short mode and back again did indeed matter. Since short mode is
28350      # case insensitive, let's make it lowercase to improve readability.
28351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28352      # Now convert it back to Unix-style (cygpath)
28353      input_path=`$CYGPATH -u "$shortmode_path"`
28354      new_path="$input_path"
28355    fi
28356  fi
28357
28358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28359  if test "x$test_cygdrive_prefix" = x; then
28360    # As a simple fix, exclude /usr/bin since it's not a real path.
28361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28363      # a path prefixed by /cygdrive for fixpath to work.
28364      new_path="$CYGWIN_ROOT_PATH$input_path"
28365    fi
28366  fi
28367
28368
28369  if test "x$path" != "x$new_path"; then
28370    BOOT_JDK="$new_path"
28371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28373  fi
28374
28375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376
28377  path="$BOOT_JDK"
28378  has_colon=`$ECHO $path | $GREP ^.:`
28379  new_path="$path"
28380  if test "x$has_colon" = x; then
28381    # Not in mixed or Windows style, start by that.
28382    new_path=`cmd //c echo $path`
28383  fi
28384
28385
28386  input_path="$new_path"
28387  # Check if we need to convert this using DOS-style short mode. If the path
28388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28389  # take no chances and rewrite it.
28390  # Note: m4 eats our [], so we need to use [ and ] instead.
28391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28392  if test "x$has_forbidden_chars" != x; then
28393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28395  fi
28396
28397
28398  windows_path="$new_path"
28399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28400    unix_path=`$CYGPATH -u "$windows_path"`
28401    new_path="$unix_path"
28402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28404    new_path="$unix_path"
28405  fi
28406
28407  if test "x$path" != "x$new_path"; then
28408    BOOT_JDK="$new_path"
28409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28411  fi
28412
28413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28415
28416    else
28417      # We're on a unix platform. Hooray! :)
28418      path="$BOOT_JDK"
28419      has_space=`$ECHO "$path" | $GREP " "`
28420      if test "x$has_space" != x; then
28421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28424      fi
28425
28426      # Use eval to expand a potential ~
28427      eval path="$path"
28428      if test ! -f "$path" && test ! -d "$path"; then
28429        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28430      fi
28431
28432      if test -d "$path"; then
28433        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28434      else
28435        dir="`$DIRNAME "$path"`"
28436        base="`$BASENAME "$path"`"
28437        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28438      fi
28439    fi
28440  fi
28441
28442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28443$as_echo_n "checking for Boot JDK... " >&6; }
28444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28445$as_echo "$BOOT_JDK" >&6; }
28446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28447$as_echo_n "checking Boot JDK version... " >&6; }
28448            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28450$as_echo "$BOOT_JDK_VERSION" >&6; }
28451          fi # end check jdk version
28452        fi # end check javac
28453      fi # end check java
28454    fi # end check boot jdk found
28455  fi
28456
28457    done
28458  fi
28459
28460  fi
28461
28462
28463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28465      # Do we have a bin/java?
28466      if test ! -x "$BOOT_JDK/bin/java"; then
28467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28469        BOOT_JDK_FOUND=no
28470      else
28471        # Do we have a bin/javac?
28472        if test ! -x "$BOOT_JDK/bin/javac"; then
28473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28477          BOOT_JDK_FOUND=no
28478        else
28479          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28480          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28481
28482          # Extra M4 quote needed to protect [] in grep expression.
28483          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28484          if test "x$FOUND_CORRECT_VERSION" = x; then
28485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28487            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28488$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28489            BOOT_JDK_FOUND=no
28490          else
28491            # We're done! :-)
28492            BOOT_JDK_FOUND=yes
28493
28494  # Only process if variable expands to non-empty
28495
28496  if test "x$BOOT_JDK" != x; then
28497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28498
28499  # Input might be given as Windows format, start by converting to
28500  # unix format.
28501  path="$BOOT_JDK"
28502  new_path=`$CYGPATH -u "$path"`
28503
28504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28507  # "foo.exe" is OK but "foo" is an error.
28508  #
28509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28510  # It is also a way to make sure we got the proper file name for the real test later on.
28511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28512  if test "x$test_shortpath" = x; then
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28516  fi
28517
28518  # Call helper function which possibly converts this using DOS-style short mode.
28519  # If so, the updated path is stored in $new_path.
28520
28521  input_path="$new_path"
28522  # Check if we need to convert this using DOS-style short mode. If the path
28523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28524  # take no chances and rewrite it.
28525  # Note: m4 eats our [], so we need to use [ and ] instead.
28526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28527  if test "x$has_forbidden_chars" != x; then
28528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28532      # Going to short mode and back again did indeed matter. Since short mode is
28533      # case insensitive, let's make it lowercase to improve readability.
28534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28535      # Now convert it back to Unix-style (cygpath)
28536      input_path=`$CYGPATH -u "$shortmode_path"`
28537      new_path="$input_path"
28538    fi
28539  fi
28540
28541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28542  if test "x$test_cygdrive_prefix" = x; then
28543    # As a simple fix, exclude /usr/bin since it's not a real path.
28544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28546      # a path prefixed by /cygdrive for fixpath to work.
28547      new_path="$CYGWIN_ROOT_PATH$input_path"
28548    fi
28549  fi
28550
28551
28552  if test "x$path" != "x$new_path"; then
28553    BOOT_JDK="$new_path"
28554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28556  fi
28557
28558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559
28560  path="$BOOT_JDK"
28561  has_colon=`$ECHO $path | $GREP ^.:`
28562  new_path="$path"
28563  if test "x$has_colon" = x; then
28564    # Not in mixed or Windows style, start by that.
28565    new_path=`cmd //c echo $path`
28566  fi
28567
28568
28569  input_path="$new_path"
28570  # Check if we need to convert this using DOS-style short mode. If the path
28571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28572  # take no chances and rewrite it.
28573  # Note: m4 eats our [], so we need to use [ and ] instead.
28574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28575  if test "x$has_forbidden_chars" != x; then
28576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28578  fi
28579
28580
28581  windows_path="$new_path"
28582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28583    unix_path=`$CYGPATH -u "$windows_path"`
28584    new_path="$unix_path"
28585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28587    new_path="$unix_path"
28588  fi
28589
28590  if test "x$path" != "x$new_path"; then
28591    BOOT_JDK="$new_path"
28592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28594  fi
28595
28596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28598
28599    else
28600      # We're on a unix platform. Hooray! :)
28601      path="$BOOT_JDK"
28602      has_space=`$ECHO "$path" | $GREP " "`
28603      if test "x$has_space" != x; then
28604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28607      fi
28608
28609      # Use eval to expand a potential ~
28610      eval path="$path"
28611      if test ! -f "$path" && test ! -d "$path"; then
28612        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28613      fi
28614
28615      if test -d "$path"; then
28616        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28617      else
28618        dir="`$DIRNAME "$path"`"
28619        base="`$BASENAME "$path"`"
28620        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28621      fi
28622    fi
28623  fi
28624
28625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28626$as_echo_n "checking for Boot JDK... " >&6; }
28627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28628$as_echo "$BOOT_JDK" >&6; }
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28630$as_echo_n "checking Boot JDK version... " >&6; }
28631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28633$as_echo "$BOOT_JDK_VERSION" >&6; }
28634          fi # end check jdk version
28635        fi # end check javac
28636      fi # end check java
28637    fi # end check boot jdk found
28638  fi
28639
28640
28641  if test "x$BOOT_JDK_FOUND" = xno; then
28642    # Now execute the test
28643
28644  if test "x$ProgramFiles" != x; then
28645    VIRTUAL_DIR="$ProgramFiles/Java"
28646
28647  windows_path="$VIRTUAL_DIR"
28648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28649    unix_path=`$CYGPATH -u "$windows_path"`
28650    VIRTUAL_DIR="$unix_path"
28651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28653    VIRTUAL_DIR="$unix_path"
28654  fi
28655
28656
28657  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28658  BOOT_JDK_SUFFIX=""
28659  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28660  if test "x$ALL_JDKS_FOUND" != x; then
28661    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28662
28663  if test "x$BOOT_JDK_FOUND" = xno; then
28664    # Now execute the test
28665
28666        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28667        if test -d "$BOOT_JDK"; then
28668          BOOT_JDK_FOUND=maybe
28669          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28670$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28671        fi
28672
28673
28674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28676      # Do we have a bin/java?
28677      if test ! -x "$BOOT_JDK/bin/java"; then
28678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28680        BOOT_JDK_FOUND=no
28681      else
28682        # Do we have a bin/javac?
28683        if test ! -x "$BOOT_JDK/bin/javac"; then
28684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28688          BOOT_JDK_FOUND=no
28689        else
28690          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28691          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28692
28693          # Extra M4 quote needed to protect [] in grep expression.
28694          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28695          if test "x$FOUND_CORRECT_VERSION" = x; then
28696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28698            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28699$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28700            BOOT_JDK_FOUND=no
28701          else
28702            # We're done! :-)
28703            BOOT_JDK_FOUND=yes
28704
28705  # Only process if variable expands to non-empty
28706
28707  if test "x$BOOT_JDK" != x; then
28708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28709
28710  # Input might be given as Windows format, start by converting to
28711  # unix format.
28712  path="$BOOT_JDK"
28713  new_path=`$CYGPATH -u "$path"`
28714
28715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28718  # "foo.exe" is OK but "foo" is an error.
28719  #
28720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28721  # It is also a way to make sure we got the proper file name for the real test later on.
28722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28723  if test "x$test_shortpath" = x; then
28724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28727  fi
28728
28729  # Call helper function which possibly converts this using DOS-style short mode.
28730  # If so, the updated path is stored in $new_path.
28731
28732  input_path="$new_path"
28733  # Check if we need to convert this using DOS-style short mode. If the path
28734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28735  # take no chances and rewrite it.
28736  # Note: m4 eats our [], so we need to use [ and ] instead.
28737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28738  if test "x$has_forbidden_chars" != x; then
28739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28743      # Going to short mode and back again did indeed matter. Since short mode is
28744      # case insensitive, let's make it lowercase to improve readability.
28745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28746      # Now convert it back to Unix-style (cygpath)
28747      input_path=`$CYGPATH -u "$shortmode_path"`
28748      new_path="$input_path"
28749    fi
28750  fi
28751
28752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28753  if test "x$test_cygdrive_prefix" = x; then
28754    # As a simple fix, exclude /usr/bin since it's not a real path.
28755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28757      # a path prefixed by /cygdrive for fixpath to work.
28758      new_path="$CYGWIN_ROOT_PATH$input_path"
28759    fi
28760  fi
28761
28762
28763  if test "x$path" != "x$new_path"; then
28764    BOOT_JDK="$new_path"
28765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28767  fi
28768
28769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770
28771  path="$BOOT_JDK"
28772  has_colon=`$ECHO $path | $GREP ^.:`
28773  new_path="$path"
28774  if test "x$has_colon" = x; then
28775    # Not in mixed or Windows style, start by that.
28776    new_path=`cmd //c echo $path`
28777  fi
28778
28779
28780  input_path="$new_path"
28781  # Check if we need to convert this using DOS-style short mode. If the path
28782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28783  # take no chances and rewrite it.
28784  # Note: m4 eats our [], so we need to use [ and ] instead.
28785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28786  if test "x$has_forbidden_chars" != x; then
28787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28789  fi
28790
28791
28792  windows_path="$new_path"
28793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28794    unix_path=`$CYGPATH -u "$windows_path"`
28795    new_path="$unix_path"
28796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28798    new_path="$unix_path"
28799  fi
28800
28801  if test "x$path" != "x$new_path"; then
28802    BOOT_JDK="$new_path"
28803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28805  fi
28806
28807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28809
28810    else
28811      # We're on a unix platform. Hooray! :)
28812      path="$BOOT_JDK"
28813      has_space=`$ECHO "$path" | $GREP " "`
28814      if test "x$has_space" != x; then
28815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28818      fi
28819
28820      # Use eval to expand a potential ~
28821      eval path="$path"
28822      if test ! -f "$path" && test ! -d "$path"; then
28823        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28824      fi
28825
28826      if test -d "$path"; then
28827        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28828      else
28829        dir="`$DIRNAME "$path"`"
28830        base="`$BASENAME "$path"`"
28831        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28832      fi
28833    fi
28834  fi
28835
28836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28837$as_echo_n "checking for Boot JDK... " >&6; }
28838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28839$as_echo "$BOOT_JDK" >&6; }
28840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28841$as_echo_n "checking Boot JDK version... " >&6; }
28842            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28844$as_echo "$BOOT_JDK_VERSION" >&6; }
28845          fi # end check jdk version
28846        fi # end check javac
28847      fi # end check java
28848    fi # end check boot jdk found
28849  fi
28850
28851    done
28852  fi
28853
28854  fi
28855
28856
28857    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28858    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28859      # Do we have a bin/java?
28860      if test ! -x "$BOOT_JDK/bin/java"; then
28861        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28863        BOOT_JDK_FOUND=no
28864      else
28865        # Do we have a bin/javac?
28866        if test ! -x "$BOOT_JDK/bin/javac"; then
28867          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28869          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28870$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28871          BOOT_JDK_FOUND=no
28872        else
28873          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28874          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28875
28876          # Extra M4 quote needed to protect [] in grep expression.
28877          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28878          if test "x$FOUND_CORRECT_VERSION" = x; then
28879            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28881            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28882$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28883            BOOT_JDK_FOUND=no
28884          else
28885            # We're done! :-)
28886            BOOT_JDK_FOUND=yes
28887
28888  # Only process if variable expands to non-empty
28889
28890  if test "x$BOOT_JDK" != x; then
28891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28892
28893  # Input might be given as Windows format, start by converting to
28894  # unix format.
28895  path="$BOOT_JDK"
28896  new_path=`$CYGPATH -u "$path"`
28897
28898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28901  # "foo.exe" is OK but "foo" is an error.
28902  #
28903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28904  # It is also a way to make sure we got the proper file name for the real test later on.
28905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28906  if test "x$test_shortpath" = x; then
28907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28909    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28910  fi
28911
28912  # Call helper function which possibly converts this using DOS-style short mode.
28913  # If so, the updated path is stored in $new_path.
28914
28915  input_path="$new_path"
28916  # Check if we need to convert this using DOS-style short mode. If the path
28917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28918  # take no chances and rewrite it.
28919  # Note: m4 eats our [], so we need to use [ and ] instead.
28920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28921  if test "x$has_forbidden_chars" != x; then
28922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28926      # Going to short mode and back again did indeed matter. Since short mode is
28927      # case insensitive, let's make it lowercase to improve readability.
28928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28929      # Now convert it back to Unix-style (cygpath)
28930      input_path=`$CYGPATH -u "$shortmode_path"`
28931      new_path="$input_path"
28932    fi
28933  fi
28934
28935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28936  if test "x$test_cygdrive_prefix" = x; then
28937    # As a simple fix, exclude /usr/bin since it's not a real path.
28938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28940      # a path prefixed by /cygdrive for fixpath to work.
28941      new_path="$CYGWIN_ROOT_PATH$input_path"
28942    fi
28943  fi
28944
28945
28946  if test "x$path" != "x$new_path"; then
28947    BOOT_JDK="$new_path"
28948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28950  fi
28951
28952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28953
28954  path="$BOOT_JDK"
28955  has_colon=`$ECHO $path | $GREP ^.:`
28956  new_path="$path"
28957  if test "x$has_colon" = x; then
28958    # Not in mixed or Windows style, start by that.
28959    new_path=`cmd //c echo $path`
28960  fi
28961
28962
28963  input_path="$new_path"
28964  # Check if we need to convert this using DOS-style short mode. If the path
28965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28966  # take no chances and rewrite it.
28967  # Note: m4 eats our [], so we need to use [ and ] instead.
28968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28969  if test "x$has_forbidden_chars" != x; then
28970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28972  fi
28973
28974
28975  windows_path="$new_path"
28976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28977    unix_path=`$CYGPATH -u "$windows_path"`
28978    new_path="$unix_path"
28979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28981    new_path="$unix_path"
28982  fi
28983
28984  if test "x$path" != "x$new_path"; then
28985    BOOT_JDK="$new_path"
28986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28988  fi
28989
28990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28992
28993    else
28994      # We're on a unix platform. Hooray! :)
28995      path="$BOOT_JDK"
28996      has_space=`$ECHO "$path" | $GREP " "`
28997      if test "x$has_space" != x; then
28998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29001      fi
29002
29003      # Use eval to expand a potential ~
29004      eval path="$path"
29005      if test ! -f "$path" && test ! -d "$path"; then
29006        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29007      fi
29008
29009      if test -d "$path"; then
29010        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29011      else
29012        dir="`$DIRNAME "$path"`"
29013        base="`$BASENAME "$path"`"
29014        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29015      fi
29016    fi
29017  fi
29018
29019            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29020$as_echo_n "checking for Boot JDK... " >&6; }
29021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29022$as_echo "$BOOT_JDK" >&6; }
29023            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29024$as_echo_n "checking Boot JDK version... " >&6; }
29025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29027$as_echo "$BOOT_JDK_VERSION" >&6; }
29028          fi # end check jdk version
29029        fi # end check javac
29030      fi # end check java
29031    fi # end check boot jdk found
29032  fi
29033
29034
29035  if test "x$BOOT_JDK_FOUND" = xno; then
29036    # Now execute the test
29037
29038  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29039  BOOT_JDK_SUFFIX=""
29040  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29041  if test "x$ALL_JDKS_FOUND" != x; then
29042    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29043
29044  if test "x$BOOT_JDK_FOUND" = xno; then
29045    # Now execute the test
29046
29047        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29048        if test -d "$BOOT_JDK"; then
29049          BOOT_JDK_FOUND=maybe
29050          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29051$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29052        fi
29053
29054
29055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29057      # Do we have a bin/java?
29058      if test ! -x "$BOOT_JDK/bin/java"; then
29059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29061        BOOT_JDK_FOUND=no
29062      else
29063        # Do we have a bin/javac?
29064        if test ! -x "$BOOT_JDK/bin/javac"; then
29065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29069          BOOT_JDK_FOUND=no
29070        else
29071          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29072          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29073
29074          # Extra M4 quote needed to protect [] in grep expression.
29075          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29076          if test "x$FOUND_CORRECT_VERSION" = x; then
29077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29079            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29080$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29081            BOOT_JDK_FOUND=no
29082          else
29083            # We're done! :-)
29084            BOOT_JDK_FOUND=yes
29085
29086  # Only process if variable expands to non-empty
29087
29088  if test "x$BOOT_JDK" != x; then
29089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29090
29091  # Input might be given as Windows format, start by converting to
29092  # unix format.
29093  path="$BOOT_JDK"
29094  new_path=`$CYGPATH -u "$path"`
29095
29096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29099  # "foo.exe" is OK but "foo" is an error.
29100  #
29101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29102  # It is also a way to make sure we got the proper file name for the real test later on.
29103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29104  if test "x$test_shortpath" = x; then
29105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29108  fi
29109
29110  # Call helper function which possibly converts this using DOS-style short mode.
29111  # If so, the updated path is stored in $new_path.
29112
29113  input_path="$new_path"
29114  # Check if we need to convert this using DOS-style short mode. If the path
29115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29116  # take no chances and rewrite it.
29117  # Note: m4 eats our [], so we need to use [ and ] instead.
29118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29119  if test "x$has_forbidden_chars" != x; then
29120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29124      # Going to short mode and back again did indeed matter. Since short mode is
29125      # case insensitive, let's make it lowercase to improve readability.
29126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29127      # Now convert it back to Unix-style (cygpath)
29128      input_path=`$CYGPATH -u "$shortmode_path"`
29129      new_path="$input_path"
29130    fi
29131  fi
29132
29133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29134  if test "x$test_cygdrive_prefix" = x; then
29135    # As a simple fix, exclude /usr/bin since it's not a real path.
29136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29138      # a path prefixed by /cygdrive for fixpath to work.
29139      new_path="$CYGWIN_ROOT_PATH$input_path"
29140    fi
29141  fi
29142
29143
29144  if test "x$path" != "x$new_path"; then
29145    BOOT_JDK="$new_path"
29146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29148  fi
29149
29150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29151
29152  path="$BOOT_JDK"
29153  has_colon=`$ECHO $path | $GREP ^.:`
29154  new_path="$path"
29155  if test "x$has_colon" = x; then
29156    # Not in mixed or Windows style, start by that.
29157    new_path=`cmd //c echo $path`
29158  fi
29159
29160
29161  input_path="$new_path"
29162  # Check if we need to convert this using DOS-style short mode. If the path
29163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29164  # take no chances and rewrite it.
29165  # Note: m4 eats our [], so we need to use [ and ] instead.
29166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29167  if test "x$has_forbidden_chars" != x; then
29168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29170  fi
29171
29172
29173  windows_path="$new_path"
29174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29175    unix_path=`$CYGPATH -u "$windows_path"`
29176    new_path="$unix_path"
29177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29179    new_path="$unix_path"
29180  fi
29181
29182  if test "x$path" != "x$new_path"; then
29183    BOOT_JDK="$new_path"
29184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29186  fi
29187
29188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29190
29191    else
29192      # We're on a unix platform. Hooray! :)
29193      path="$BOOT_JDK"
29194      has_space=`$ECHO "$path" | $GREP " "`
29195      if test "x$has_space" != x; then
29196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29199      fi
29200
29201      # Use eval to expand a potential ~
29202      eval path="$path"
29203      if test ! -f "$path" && test ! -d "$path"; then
29204        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29205      fi
29206
29207      if test -d "$path"; then
29208        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29209      else
29210        dir="`$DIRNAME "$path"`"
29211        base="`$BASENAME "$path"`"
29212        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29213      fi
29214    fi
29215  fi
29216
29217            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29218$as_echo_n "checking for Boot JDK... " >&6; }
29219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29220$as_echo "$BOOT_JDK" >&6; }
29221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29222$as_echo_n "checking Boot JDK version... " >&6; }
29223            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29225$as_echo "$BOOT_JDK_VERSION" >&6; }
29226          fi # end check jdk version
29227        fi # end check javac
29228      fi # end check java
29229    fi # end check boot jdk found
29230  fi
29231
29232    done
29233  fi
29234
29235
29236    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29237    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29238      # Do we have a bin/java?
29239      if test ! -x "$BOOT_JDK/bin/java"; then
29240        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29242        BOOT_JDK_FOUND=no
29243      else
29244        # Do we have a bin/javac?
29245        if test ! -x "$BOOT_JDK/bin/javac"; then
29246          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29248          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29249$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29250          BOOT_JDK_FOUND=no
29251        else
29252          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29253          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29254
29255          # Extra M4 quote needed to protect [] in grep expression.
29256          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29257          if test "x$FOUND_CORRECT_VERSION" = x; then
29258            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29260            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29261$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29262            BOOT_JDK_FOUND=no
29263          else
29264            # We're done! :-)
29265            BOOT_JDK_FOUND=yes
29266
29267  # Only process if variable expands to non-empty
29268
29269  if test "x$BOOT_JDK" != x; then
29270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29271
29272  # Input might be given as Windows format, start by converting to
29273  # unix format.
29274  path="$BOOT_JDK"
29275  new_path=`$CYGPATH -u "$path"`
29276
29277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29280  # "foo.exe" is OK but "foo" is an error.
29281  #
29282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29283  # It is also a way to make sure we got the proper file name for the real test later on.
29284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29285  if test "x$test_shortpath" = x; then
29286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29288    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29289  fi
29290
29291  # Call helper function which possibly converts this using DOS-style short mode.
29292  # If so, the updated path is stored in $new_path.
29293
29294  input_path="$new_path"
29295  # Check if we need to convert this using DOS-style short mode. If the path
29296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29297  # take no chances and rewrite it.
29298  # Note: m4 eats our [], so we need to use [ and ] instead.
29299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29300  if test "x$has_forbidden_chars" != x; then
29301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29305      # Going to short mode and back again did indeed matter. Since short mode is
29306      # case insensitive, let's make it lowercase to improve readability.
29307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29308      # Now convert it back to Unix-style (cygpath)
29309      input_path=`$CYGPATH -u "$shortmode_path"`
29310      new_path="$input_path"
29311    fi
29312  fi
29313
29314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29315  if test "x$test_cygdrive_prefix" = x; then
29316    # As a simple fix, exclude /usr/bin since it's not a real path.
29317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29319      # a path prefixed by /cygdrive for fixpath to work.
29320      new_path="$CYGWIN_ROOT_PATH$input_path"
29321    fi
29322  fi
29323
29324
29325  if test "x$path" != "x$new_path"; then
29326    BOOT_JDK="$new_path"
29327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29329  fi
29330
29331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29332
29333  path="$BOOT_JDK"
29334  has_colon=`$ECHO $path | $GREP ^.:`
29335  new_path="$path"
29336  if test "x$has_colon" = x; then
29337    # Not in mixed or Windows style, start by that.
29338    new_path=`cmd //c echo $path`
29339  fi
29340
29341
29342  input_path="$new_path"
29343  # Check if we need to convert this using DOS-style short mode. If the path
29344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29345  # take no chances and rewrite it.
29346  # Note: m4 eats our [], so we need to use [ and ] instead.
29347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29348  if test "x$has_forbidden_chars" != x; then
29349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29351  fi
29352
29353
29354  windows_path="$new_path"
29355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29356    unix_path=`$CYGPATH -u "$windows_path"`
29357    new_path="$unix_path"
29358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29360    new_path="$unix_path"
29361  fi
29362
29363  if test "x$path" != "x$new_path"; then
29364    BOOT_JDK="$new_path"
29365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29367  fi
29368
29369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29371
29372    else
29373      # We're on a unix platform. Hooray! :)
29374      path="$BOOT_JDK"
29375      has_space=`$ECHO "$path" | $GREP " "`
29376      if test "x$has_space" != x; then
29377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29379        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29380      fi
29381
29382      # Use eval to expand a potential ~
29383      eval path="$path"
29384      if test ! -f "$path" && test ! -d "$path"; then
29385        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29386      fi
29387
29388      if test -d "$path"; then
29389        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29390      else
29391        dir="`$DIRNAME "$path"`"
29392        base="`$BASENAME "$path"`"
29393        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29394      fi
29395    fi
29396  fi
29397
29398            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29399$as_echo_n "checking for Boot JDK... " >&6; }
29400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29401$as_echo "$BOOT_JDK" >&6; }
29402            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29403$as_echo_n "checking Boot JDK version... " >&6; }
29404            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29406$as_echo "$BOOT_JDK_VERSION" >&6; }
29407          fi # end check jdk version
29408        fi # end check javac
29409      fi # end check java
29410    fi # end check boot jdk found
29411  fi
29412
29413  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29414
29415  if test "x$BOOT_JDK_FOUND" = xno; then
29416    # Now execute the test
29417
29418  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29419  BOOT_JDK_SUFFIX="/Contents/Home"
29420  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29421  if test "x$ALL_JDKS_FOUND" != x; then
29422    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29423
29424  if test "x$BOOT_JDK_FOUND" = xno; then
29425    # Now execute the test
29426
29427        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29428        if test -d "$BOOT_JDK"; then
29429          BOOT_JDK_FOUND=maybe
29430          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29431$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29432        fi
29433
29434
29435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29437      # Do we have a bin/java?
29438      if test ! -x "$BOOT_JDK/bin/java"; then
29439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29441        BOOT_JDK_FOUND=no
29442      else
29443        # Do we have a bin/javac?
29444        if test ! -x "$BOOT_JDK/bin/javac"; then
29445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29449          BOOT_JDK_FOUND=no
29450        else
29451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29453
29454          # Extra M4 quote needed to protect [] in grep expression.
29455          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29456          if test "x$FOUND_CORRECT_VERSION" = x; then
29457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29461            BOOT_JDK_FOUND=no
29462          else
29463            # We're done! :-)
29464            BOOT_JDK_FOUND=yes
29465
29466  # Only process if variable expands to non-empty
29467
29468  if test "x$BOOT_JDK" != x; then
29469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29470
29471  # Input might be given as Windows format, start by converting to
29472  # unix format.
29473  path="$BOOT_JDK"
29474  new_path=`$CYGPATH -u "$path"`
29475
29476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29479  # "foo.exe" is OK but "foo" is an error.
29480  #
29481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29482  # It is also a way to make sure we got the proper file name for the real test later on.
29483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29484  if test "x$test_shortpath" = x; then
29485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29488  fi
29489
29490  # Call helper function which possibly converts this using DOS-style short mode.
29491  # If so, the updated path is stored in $new_path.
29492
29493  input_path="$new_path"
29494  # Check if we need to convert this using DOS-style short mode. If the path
29495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29496  # take no chances and rewrite it.
29497  # Note: m4 eats our [], so we need to use [ and ] instead.
29498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29499  if test "x$has_forbidden_chars" != x; then
29500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29504      # Going to short mode and back again did indeed matter. Since short mode is
29505      # case insensitive, let's make it lowercase to improve readability.
29506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29507      # Now convert it back to Unix-style (cygpath)
29508      input_path=`$CYGPATH -u "$shortmode_path"`
29509      new_path="$input_path"
29510    fi
29511  fi
29512
29513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29514  if test "x$test_cygdrive_prefix" = x; then
29515    # As a simple fix, exclude /usr/bin since it's not a real path.
29516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29518      # a path prefixed by /cygdrive for fixpath to work.
29519      new_path="$CYGWIN_ROOT_PATH$input_path"
29520    fi
29521  fi
29522
29523
29524  if test "x$path" != "x$new_path"; then
29525    BOOT_JDK="$new_path"
29526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29528  fi
29529
29530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29531
29532  path="$BOOT_JDK"
29533  has_colon=`$ECHO $path | $GREP ^.:`
29534  new_path="$path"
29535  if test "x$has_colon" = x; then
29536    # Not in mixed or Windows style, start by that.
29537    new_path=`cmd //c echo $path`
29538  fi
29539
29540
29541  input_path="$new_path"
29542  # Check if we need to convert this using DOS-style short mode. If the path
29543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29544  # take no chances and rewrite it.
29545  # Note: m4 eats our [], so we need to use [ and ] instead.
29546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29547  if test "x$has_forbidden_chars" != x; then
29548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29550  fi
29551
29552
29553  windows_path="$new_path"
29554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29555    unix_path=`$CYGPATH -u "$windows_path"`
29556    new_path="$unix_path"
29557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29559    new_path="$unix_path"
29560  fi
29561
29562  if test "x$path" != "x$new_path"; then
29563    BOOT_JDK="$new_path"
29564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29566  fi
29567
29568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29570
29571    else
29572      # We're on a unix platform. Hooray! :)
29573      path="$BOOT_JDK"
29574      has_space=`$ECHO "$path" | $GREP " "`
29575      if test "x$has_space" != x; then
29576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29579      fi
29580
29581      # Use eval to expand a potential ~
29582      eval path="$path"
29583      if test ! -f "$path" && test ! -d "$path"; then
29584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29585      fi
29586
29587      if test -d "$path"; then
29588        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29589      else
29590        dir="`$DIRNAME "$path"`"
29591        base="`$BASENAME "$path"`"
29592        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29593      fi
29594    fi
29595  fi
29596
29597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29598$as_echo_n "checking for Boot JDK... " >&6; }
29599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29600$as_echo "$BOOT_JDK" >&6; }
29601            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29602$as_echo_n "checking Boot JDK version... " >&6; }
29603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29605$as_echo "$BOOT_JDK_VERSION" >&6; }
29606          fi # end check jdk version
29607        fi # end check javac
29608      fi # end check java
29609    fi # end check boot jdk found
29610  fi
29611
29612    done
29613  fi
29614
29615
29616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29618      # Do we have a bin/java?
29619      if test ! -x "$BOOT_JDK/bin/java"; then
29620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29622        BOOT_JDK_FOUND=no
29623      else
29624        # Do we have a bin/javac?
29625        if test ! -x "$BOOT_JDK/bin/javac"; then
29626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29630          BOOT_JDK_FOUND=no
29631        else
29632          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29633          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29634
29635          # Extra M4 quote needed to protect [] in grep expression.
29636          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29637          if test "x$FOUND_CORRECT_VERSION" = x; then
29638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29640            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29641$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29642            BOOT_JDK_FOUND=no
29643          else
29644            # We're done! :-)
29645            BOOT_JDK_FOUND=yes
29646
29647  # Only process if variable expands to non-empty
29648
29649  if test "x$BOOT_JDK" != x; then
29650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29651
29652  # Input might be given as Windows format, start by converting to
29653  # unix format.
29654  path="$BOOT_JDK"
29655  new_path=`$CYGPATH -u "$path"`
29656
29657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29660  # "foo.exe" is OK but "foo" is an error.
29661  #
29662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29663  # It is also a way to make sure we got the proper file name for the real test later on.
29664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29665  if test "x$test_shortpath" = x; then
29666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29668    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29669  fi
29670
29671  # Call helper function which possibly converts this using DOS-style short mode.
29672  # If so, the updated path is stored in $new_path.
29673
29674  input_path="$new_path"
29675  # Check if we need to convert this using DOS-style short mode. If the path
29676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29677  # take no chances and rewrite it.
29678  # Note: m4 eats our [], so we need to use [ and ] instead.
29679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29680  if test "x$has_forbidden_chars" != x; then
29681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29685      # Going to short mode and back again did indeed matter. Since short mode is
29686      # case insensitive, let's make it lowercase to improve readability.
29687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29688      # Now convert it back to Unix-style (cygpath)
29689      input_path=`$CYGPATH -u "$shortmode_path"`
29690      new_path="$input_path"
29691    fi
29692  fi
29693
29694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29695  if test "x$test_cygdrive_prefix" = x; then
29696    # As a simple fix, exclude /usr/bin since it's not a real path.
29697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29699      # a path prefixed by /cygdrive for fixpath to work.
29700      new_path="$CYGWIN_ROOT_PATH$input_path"
29701    fi
29702  fi
29703
29704
29705  if test "x$path" != "x$new_path"; then
29706    BOOT_JDK="$new_path"
29707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29709  fi
29710
29711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29712
29713  path="$BOOT_JDK"
29714  has_colon=`$ECHO $path | $GREP ^.:`
29715  new_path="$path"
29716  if test "x$has_colon" = x; then
29717    # Not in mixed or Windows style, start by that.
29718    new_path=`cmd //c echo $path`
29719  fi
29720
29721
29722  input_path="$new_path"
29723  # Check if we need to convert this using DOS-style short mode. If the path
29724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29725  # take no chances and rewrite it.
29726  # Note: m4 eats our [], so we need to use [ and ] instead.
29727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29728  if test "x$has_forbidden_chars" != x; then
29729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29731  fi
29732
29733
29734  windows_path="$new_path"
29735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29736    unix_path=`$CYGPATH -u "$windows_path"`
29737    new_path="$unix_path"
29738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29740    new_path="$unix_path"
29741  fi
29742
29743  if test "x$path" != "x$new_path"; then
29744    BOOT_JDK="$new_path"
29745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29747  fi
29748
29749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29751
29752    else
29753      # We're on a unix platform. Hooray! :)
29754      path="$BOOT_JDK"
29755      has_space=`$ECHO "$path" | $GREP " "`
29756      if test "x$has_space" != x; then
29757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29760      fi
29761
29762      # Use eval to expand a potential ~
29763      eval path="$path"
29764      if test ! -f "$path" && test ! -d "$path"; then
29765        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29766      fi
29767
29768      if test -d "$path"; then
29769        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29770      else
29771        dir="`$DIRNAME "$path"`"
29772        base="`$BASENAME "$path"`"
29773        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29774      fi
29775    fi
29776  fi
29777
29778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29779$as_echo_n "checking for Boot JDK... " >&6; }
29780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29781$as_echo "$BOOT_JDK" >&6; }
29782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29783$as_echo_n "checking Boot JDK version... " >&6; }
29784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29786$as_echo "$BOOT_JDK_VERSION" >&6; }
29787          fi # end check jdk version
29788        fi # end check javac
29789      fi # end check java
29790    fi # end check boot jdk found
29791  fi
29792
29793
29794  if test "x$BOOT_JDK_FOUND" = xno; then
29795    # Now execute the test
29796
29797  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29798  BOOT_JDK_SUFFIX="/Contents/Home"
29799  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29800  if test "x$ALL_JDKS_FOUND" != x; then
29801    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29802
29803  if test "x$BOOT_JDK_FOUND" = xno; then
29804    # Now execute the test
29805
29806        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29807        if test -d "$BOOT_JDK"; then
29808          BOOT_JDK_FOUND=maybe
29809          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29810$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29811        fi
29812
29813
29814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29816      # Do we have a bin/java?
29817      if test ! -x "$BOOT_JDK/bin/java"; then
29818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29820        BOOT_JDK_FOUND=no
29821      else
29822        # Do we have a bin/javac?
29823        if test ! -x "$BOOT_JDK/bin/javac"; then
29824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29828          BOOT_JDK_FOUND=no
29829        else
29830          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29831          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29832
29833          # Extra M4 quote needed to protect [] in grep expression.
29834          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29835          if test "x$FOUND_CORRECT_VERSION" = x; then
29836            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29839$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29840            BOOT_JDK_FOUND=no
29841          else
29842            # We're done! :-)
29843            BOOT_JDK_FOUND=yes
29844
29845  # Only process if variable expands to non-empty
29846
29847  if test "x$BOOT_JDK" != x; then
29848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29849
29850  # Input might be given as Windows format, start by converting to
29851  # unix format.
29852  path="$BOOT_JDK"
29853  new_path=`$CYGPATH -u "$path"`
29854
29855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29858  # "foo.exe" is OK but "foo" is an error.
29859  #
29860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29861  # It is also a way to make sure we got the proper file name for the real test later on.
29862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29863  if test "x$test_shortpath" = x; then
29864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29867  fi
29868
29869  # Call helper function which possibly converts this using DOS-style short mode.
29870  # If so, the updated path is stored in $new_path.
29871
29872  input_path="$new_path"
29873  # Check if we need to convert this using DOS-style short mode. If the path
29874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29875  # take no chances and rewrite it.
29876  # Note: m4 eats our [], so we need to use [ and ] instead.
29877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29878  if test "x$has_forbidden_chars" != x; then
29879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29883      # Going to short mode and back again did indeed matter. Since short mode is
29884      # case insensitive, let's make it lowercase to improve readability.
29885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29886      # Now convert it back to Unix-style (cygpath)
29887      input_path=`$CYGPATH -u "$shortmode_path"`
29888      new_path="$input_path"
29889    fi
29890  fi
29891
29892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29893  if test "x$test_cygdrive_prefix" = x; then
29894    # As a simple fix, exclude /usr/bin since it's not a real path.
29895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29897      # a path prefixed by /cygdrive for fixpath to work.
29898      new_path="$CYGWIN_ROOT_PATH$input_path"
29899    fi
29900  fi
29901
29902
29903  if test "x$path" != "x$new_path"; then
29904    BOOT_JDK="$new_path"
29905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29907  fi
29908
29909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29910
29911  path="$BOOT_JDK"
29912  has_colon=`$ECHO $path | $GREP ^.:`
29913  new_path="$path"
29914  if test "x$has_colon" = x; then
29915    # Not in mixed or Windows style, start by that.
29916    new_path=`cmd //c echo $path`
29917  fi
29918
29919
29920  input_path="$new_path"
29921  # Check if we need to convert this using DOS-style short mode. If the path
29922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29923  # take no chances and rewrite it.
29924  # Note: m4 eats our [], so we need to use [ and ] instead.
29925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29926  if test "x$has_forbidden_chars" != x; then
29927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29929  fi
29930
29931
29932  windows_path="$new_path"
29933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29934    unix_path=`$CYGPATH -u "$windows_path"`
29935    new_path="$unix_path"
29936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29938    new_path="$unix_path"
29939  fi
29940
29941  if test "x$path" != "x$new_path"; then
29942    BOOT_JDK="$new_path"
29943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29945  fi
29946
29947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29949
29950    else
29951      # We're on a unix platform. Hooray! :)
29952      path="$BOOT_JDK"
29953      has_space=`$ECHO "$path" | $GREP " "`
29954      if test "x$has_space" != x; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29958      fi
29959
29960      # Use eval to expand a potential ~
29961      eval path="$path"
29962      if test ! -f "$path" && test ! -d "$path"; then
29963        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29964      fi
29965
29966      if test -d "$path"; then
29967        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29968      else
29969        dir="`$DIRNAME "$path"`"
29970        base="`$BASENAME "$path"`"
29971        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29972      fi
29973    fi
29974  fi
29975
29976            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29977$as_echo_n "checking for Boot JDK... " >&6; }
29978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29979$as_echo "$BOOT_JDK" >&6; }
29980            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29981$as_echo_n "checking Boot JDK version... " >&6; }
29982            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29984$as_echo "$BOOT_JDK_VERSION" >&6; }
29985          fi # end check jdk version
29986        fi # end check javac
29987      fi # end check java
29988    fi # end check boot jdk found
29989  fi
29990
29991    done
29992  fi
29993
29994
29995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29997      # Do we have a bin/java?
29998      if test ! -x "$BOOT_JDK/bin/java"; then
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30001        BOOT_JDK_FOUND=no
30002      else
30003        # Do we have a bin/javac?
30004        if test ! -x "$BOOT_JDK/bin/javac"; then
30005          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30007          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30009          BOOT_JDK_FOUND=no
30010        else
30011          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30012          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30013
30014          # Extra M4 quote needed to protect [] in grep expression.
30015          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30016          if test "x$FOUND_CORRECT_VERSION" = x; then
30017            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30019            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30020$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30021            BOOT_JDK_FOUND=no
30022          else
30023            # We're done! :-)
30024            BOOT_JDK_FOUND=yes
30025
30026  # Only process if variable expands to non-empty
30027
30028  if test "x$BOOT_JDK" != x; then
30029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30030
30031  # Input might be given as Windows format, start by converting to
30032  # unix format.
30033  path="$BOOT_JDK"
30034  new_path=`$CYGPATH -u "$path"`
30035
30036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30039  # "foo.exe" is OK but "foo" is an error.
30040  #
30041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30042  # It is also a way to make sure we got the proper file name for the real test later on.
30043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30044  if test "x$test_shortpath" = x; then
30045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30048  fi
30049
30050  # Call helper function which possibly converts this using DOS-style short mode.
30051  # If so, the updated path is stored in $new_path.
30052
30053  input_path="$new_path"
30054  # Check if we need to convert this using DOS-style short mode. If the path
30055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30056  # take no chances and rewrite it.
30057  # Note: m4 eats our [], so we need to use [ and ] instead.
30058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30059  if test "x$has_forbidden_chars" != x; then
30060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30064      # Going to short mode and back again did indeed matter. Since short mode is
30065      # case insensitive, let's make it lowercase to improve readability.
30066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30067      # Now convert it back to Unix-style (cygpath)
30068      input_path=`$CYGPATH -u "$shortmode_path"`
30069      new_path="$input_path"
30070    fi
30071  fi
30072
30073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30074  if test "x$test_cygdrive_prefix" = x; then
30075    # As a simple fix, exclude /usr/bin since it's not a real path.
30076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30078      # a path prefixed by /cygdrive for fixpath to work.
30079      new_path="$CYGWIN_ROOT_PATH$input_path"
30080    fi
30081  fi
30082
30083
30084  if test "x$path" != "x$new_path"; then
30085    BOOT_JDK="$new_path"
30086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30088  fi
30089
30090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30091
30092  path="$BOOT_JDK"
30093  has_colon=`$ECHO $path | $GREP ^.:`
30094  new_path="$path"
30095  if test "x$has_colon" = x; then
30096    # Not in mixed or Windows style, start by that.
30097    new_path=`cmd //c echo $path`
30098  fi
30099
30100
30101  input_path="$new_path"
30102  # Check if we need to convert this using DOS-style short mode. If the path
30103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30104  # take no chances and rewrite it.
30105  # Note: m4 eats our [], so we need to use [ and ] instead.
30106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30107  if test "x$has_forbidden_chars" != x; then
30108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30110  fi
30111
30112
30113  windows_path="$new_path"
30114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30115    unix_path=`$CYGPATH -u "$windows_path"`
30116    new_path="$unix_path"
30117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30119    new_path="$unix_path"
30120  fi
30121
30122  if test "x$path" != "x$new_path"; then
30123    BOOT_JDK="$new_path"
30124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30126  fi
30127
30128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30130
30131    else
30132      # We're on a unix platform. Hooray! :)
30133      path="$BOOT_JDK"
30134      has_space=`$ECHO "$path" | $GREP " "`
30135      if test "x$has_space" != x; then
30136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30139      fi
30140
30141      # Use eval to expand a potential ~
30142      eval path="$path"
30143      if test ! -f "$path" && test ! -d "$path"; then
30144        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30145      fi
30146
30147      if test -d "$path"; then
30148        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30149      else
30150        dir="`$DIRNAME "$path"`"
30151        base="`$BASENAME "$path"`"
30152        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30153      fi
30154    fi
30155  fi
30156
30157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30158$as_echo_n "checking for Boot JDK... " >&6; }
30159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30160$as_echo "$BOOT_JDK" >&6; }
30161            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30162$as_echo_n "checking Boot JDK version... " >&6; }
30163            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30165$as_echo "$BOOT_JDK_VERSION" >&6; }
30166          fi # end check jdk version
30167        fi # end check javac
30168      fi # end check java
30169    fi # end check boot jdk found
30170  fi
30171
30172  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30173
30174  if test "x$BOOT_JDK_FOUND" = xno; then
30175    # Now execute the test
30176
30177  BOOT_JDK_PREFIX="/usr/lib/jvm"
30178  BOOT_JDK_SUFFIX=""
30179  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30180  if test "x$ALL_JDKS_FOUND" != x; then
30181    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30182
30183  if test "x$BOOT_JDK_FOUND" = xno; then
30184    # Now execute the test
30185
30186        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30187        if test -d "$BOOT_JDK"; then
30188          BOOT_JDK_FOUND=maybe
30189          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30190$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30191        fi
30192
30193
30194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30196      # Do we have a bin/java?
30197      if test ! -x "$BOOT_JDK/bin/java"; then
30198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30200        BOOT_JDK_FOUND=no
30201      else
30202        # Do we have a bin/javac?
30203        if test ! -x "$BOOT_JDK/bin/javac"; then
30204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30208          BOOT_JDK_FOUND=no
30209        else
30210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30212
30213          # Extra M4 quote needed to protect [] in grep expression.
30214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30215          if test "x$FOUND_CORRECT_VERSION" = x; then
30216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30220            BOOT_JDK_FOUND=no
30221          else
30222            # We're done! :-)
30223            BOOT_JDK_FOUND=yes
30224
30225  # Only process if variable expands to non-empty
30226
30227  if test "x$BOOT_JDK" != x; then
30228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30229
30230  # Input might be given as Windows format, start by converting to
30231  # unix format.
30232  path="$BOOT_JDK"
30233  new_path=`$CYGPATH -u "$path"`
30234
30235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30238  # "foo.exe" is OK but "foo" is an error.
30239  #
30240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30241  # It is also a way to make sure we got the proper file name for the real test later on.
30242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30243  if test "x$test_shortpath" = x; then
30244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30247  fi
30248
30249  # Call helper function which possibly converts this using DOS-style short mode.
30250  # If so, the updated path is stored in $new_path.
30251
30252  input_path="$new_path"
30253  # Check if we need to convert this using DOS-style short mode. If the path
30254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30255  # take no chances and rewrite it.
30256  # Note: m4 eats our [], so we need to use [ and ] instead.
30257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30258  if test "x$has_forbidden_chars" != x; then
30259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30263      # Going to short mode and back again did indeed matter. Since short mode is
30264      # case insensitive, let's make it lowercase to improve readability.
30265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30266      # Now convert it back to Unix-style (cygpath)
30267      input_path=`$CYGPATH -u "$shortmode_path"`
30268      new_path="$input_path"
30269    fi
30270  fi
30271
30272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30273  if test "x$test_cygdrive_prefix" = x; then
30274    # As a simple fix, exclude /usr/bin since it's not a real path.
30275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30277      # a path prefixed by /cygdrive for fixpath to work.
30278      new_path="$CYGWIN_ROOT_PATH$input_path"
30279    fi
30280  fi
30281
30282
30283  if test "x$path" != "x$new_path"; then
30284    BOOT_JDK="$new_path"
30285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30287  fi
30288
30289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30290
30291  path="$BOOT_JDK"
30292  has_colon=`$ECHO $path | $GREP ^.:`
30293  new_path="$path"
30294  if test "x$has_colon" = x; then
30295    # Not in mixed or Windows style, start by that.
30296    new_path=`cmd //c echo $path`
30297  fi
30298
30299
30300  input_path="$new_path"
30301  # Check if we need to convert this using DOS-style short mode. If the path
30302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30303  # take no chances and rewrite it.
30304  # Note: m4 eats our [], so we need to use [ and ] instead.
30305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30306  if test "x$has_forbidden_chars" != x; then
30307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30309  fi
30310
30311
30312  windows_path="$new_path"
30313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30314    unix_path=`$CYGPATH -u "$windows_path"`
30315    new_path="$unix_path"
30316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30318    new_path="$unix_path"
30319  fi
30320
30321  if test "x$path" != "x$new_path"; then
30322    BOOT_JDK="$new_path"
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30325  fi
30326
30327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30329
30330    else
30331      # We're on a unix platform. Hooray! :)
30332      path="$BOOT_JDK"
30333      has_space=`$ECHO "$path" | $GREP " "`
30334      if test "x$has_space" != x; then
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30338      fi
30339
30340      # Use eval to expand a potential ~
30341      eval path="$path"
30342      if test ! -f "$path" && test ! -d "$path"; then
30343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30344      fi
30345
30346      if test -d "$path"; then
30347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30348      else
30349        dir="`$DIRNAME "$path"`"
30350        base="`$BASENAME "$path"`"
30351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30352      fi
30353    fi
30354  fi
30355
30356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30357$as_echo_n "checking for Boot JDK... " >&6; }
30358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30359$as_echo "$BOOT_JDK" >&6; }
30360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30361$as_echo_n "checking Boot JDK version... " >&6; }
30362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30364$as_echo "$BOOT_JDK_VERSION" >&6; }
30365          fi # end check jdk version
30366        fi # end check javac
30367      fi # end check java
30368    fi # end check boot jdk found
30369  fi
30370
30371    done
30372  fi
30373
30374
30375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30377      # Do we have a bin/java?
30378      if test ! -x "$BOOT_JDK/bin/java"; then
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30381        BOOT_JDK_FOUND=no
30382      else
30383        # Do we have a bin/javac?
30384        if test ! -x "$BOOT_JDK/bin/javac"; then
30385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30389          BOOT_JDK_FOUND=no
30390        else
30391          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30392          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30393
30394          # Extra M4 quote needed to protect [] in grep expression.
30395          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30396          if test "x$FOUND_CORRECT_VERSION" = x; then
30397            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30399            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30400$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30401            BOOT_JDK_FOUND=no
30402          else
30403            # We're done! :-)
30404            BOOT_JDK_FOUND=yes
30405
30406  # Only process if variable expands to non-empty
30407
30408  if test "x$BOOT_JDK" != x; then
30409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30410
30411  # Input might be given as Windows format, start by converting to
30412  # unix format.
30413  path="$BOOT_JDK"
30414  new_path=`$CYGPATH -u "$path"`
30415
30416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30419  # "foo.exe" is OK but "foo" is an error.
30420  #
30421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30422  # It is also a way to make sure we got the proper file name for the real test later on.
30423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30424  if test "x$test_shortpath" = x; then
30425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30428  fi
30429
30430  # Call helper function which possibly converts this using DOS-style short mode.
30431  # If so, the updated path is stored in $new_path.
30432
30433  input_path="$new_path"
30434  # Check if we need to convert this using DOS-style short mode. If the path
30435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30436  # take no chances and rewrite it.
30437  # Note: m4 eats our [], so we need to use [ and ] instead.
30438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30439  if test "x$has_forbidden_chars" != x; then
30440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30444      # Going to short mode and back again did indeed matter. Since short mode is
30445      # case insensitive, let's make it lowercase to improve readability.
30446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30447      # Now convert it back to Unix-style (cygpath)
30448      input_path=`$CYGPATH -u "$shortmode_path"`
30449      new_path="$input_path"
30450    fi
30451  fi
30452
30453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30454  if test "x$test_cygdrive_prefix" = x; then
30455    # As a simple fix, exclude /usr/bin since it's not a real path.
30456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30458      # a path prefixed by /cygdrive for fixpath to work.
30459      new_path="$CYGWIN_ROOT_PATH$input_path"
30460    fi
30461  fi
30462
30463
30464  if test "x$path" != "x$new_path"; then
30465    BOOT_JDK="$new_path"
30466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30468  fi
30469
30470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30471
30472  path="$BOOT_JDK"
30473  has_colon=`$ECHO $path | $GREP ^.:`
30474  new_path="$path"
30475  if test "x$has_colon" = x; then
30476    # Not in mixed or Windows style, start by that.
30477    new_path=`cmd //c echo $path`
30478  fi
30479
30480
30481  input_path="$new_path"
30482  # Check if we need to convert this using DOS-style short mode. If the path
30483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30484  # take no chances and rewrite it.
30485  # Note: m4 eats our [], so we need to use [ and ] instead.
30486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30487  if test "x$has_forbidden_chars" != x; then
30488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30490  fi
30491
30492
30493  windows_path="$new_path"
30494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30495    unix_path=`$CYGPATH -u "$windows_path"`
30496    new_path="$unix_path"
30497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30499    new_path="$unix_path"
30500  fi
30501
30502  if test "x$path" != "x$new_path"; then
30503    BOOT_JDK="$new_path"
30504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30506  fi
30507
30508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30510
30511    else
30512      # We're on a unix platform. Hooray! :)
30513      path="$BOOT_JDK"
30514      has_space=`$ECHO "$path" | $GREP " "`
30515      if test "x$has_space" != x; then
30516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30519      fi
30520
30521      # Use eval to expand a potential ~
30522      eval path="$path"
30523      if test ! -f "$path" && test ! -d "$path"; then
30524        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30525      fi
30526
30527      if test -d "$path"; then
30528        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30529      else
30530        dir="`$DIRNAME "$path"`"
30531        base="`$BASENAME "$path"`"
30532        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30533      fi
30534    fi
30535  fi
30536
30537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30538$as_echo_n "checking for Boot JDK... " >&6; }
30539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30540$as_echo "$BOOT_JDK" >&6; }
30541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30542$as_echo_n "checking Boot JDK version... " >&6; }
30543            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30545$as_echo "$BOOT_JDK_VERSION" >&6; }
30546          fi # end check jdk version
30547        fi # end check javac
30548      fi # end check java
30549    fi # end check boot jdk found
30550  fi
30551
30552  fi
30553
30554
30555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30557      # Do we have a bin/java?
30558      if test ! -x "$BOOT_JDK/bin/java"; then
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30561        BOOT_JDK_FOUND=no
30562      else
30563        # Do we have a bin/javac?
30564        if test ! -x "$BOOT_JDK/bin/javac"; then
30565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30569          BOOT_JDK_FOUND=no
30570        else
30571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30573
30574          # Extra M4 quote needed to protect [] in grep expression.
30575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30576          if test "x$FOUND_CORRECT_VERSION" = x; then
30577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30581            BOOT_JDK_FOUND=no
30582          else
30583            # We're done! :-)
30584            BOOT_JDK_FOUND=yes
30585
30586  # Only process if variable expands to non-empty
30587
30588  if test "x$BOOT_JDK" != x; then
30589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30590
30591  # Input might be given as Windows format, start by converting to
30592  # unix format.
30593  path="$BOOT_JDK"
30594  new_path=`$CYGPATH -u "$path"`
30595
30596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30599  # "foo.exe" is OK but "foo" is an error.
30600  #
30601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30602  # It is also a way to make sure we got the proper file name for the real test later on.
30603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30604  if test "x$test_shortpath" = x; then
30605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30608  fi
30609
30610  # Call helper function which possibly converts this using DOS-style short mode.
30611  # If so, the updated path is stored in $new_path.
30612
30613  input_path="$new_path"
30614  # Check if we need to convert this using DOS-style short mode. If the path
30615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30616  # take no chances and rewrite it.
30617  # Note: m4 eats our [], so we need to use [ and ] instead.
30618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30619  if test "x$has_forbidden_chars" != x; then
30620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30624      # Going to short mode and back again did indeed matter. Since short mode is
30625      # case insensitive, let's make it lowercase to improve readability.
30626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30627      # Now convert it back to Unix-style (cygpath)
30628      input_path=`$CYGPATH -u "$shortmode_path"`
30629      new_path="$input_path"
30630    fi
30631  fi
30632
30633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30634  if test "x$test_cygdrive_prefix" = x; then
30635    # As a simple fix, exclude /usr/bin since it's not a real path.
30636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30638      # a path prefixed by /cygdrive for fixpath to work.
30639      new_path="$CYGWIN_ROOT_PATH$input_path"
30640    fi
30641  fi
30642
30643
30644  if test "x$path" != "x$new_path"; then
30645    BOOT_JDK="$new_path"
30646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30648  fi
30649
30650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30651
30652  path="$BOOT_JDK"
30653  has_colon=`$ECHO $path | $GREP ^.:`
30654  new_path="$path"
30655  if test "x$has_colon" = x; then
30656    # Not in mixed or Windows style, start by that.
30657    new_path=`cmd //c echo $path`
30658  fi
30659
30660
30661  input_path="$new_path"
30662  # Check if we need to convert this using DOS-style short mode. If the path
30663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30664  # take no chances and rewrite it.
30665  # Note: m4 eats our [], so we need to use [ and ] instead.
30666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30667  if test "x$has_forbidden_chars" != x; then
30668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30670  fi
30671
30672
30673  windows_path="$new_path"
30674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30675    unix_path=`$CYGPATH -u "$windows_path"`
30676    new_path="$unix_path"
30677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30679    new_path="$unix_path"
30680  fi
30681
30682  if test "x$path" != "x$new_path"; then
30683    BOOT_JDK="$new_path"
30684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30686  fi
30687
30688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30690
30691    else
30692      # We're on a unix platform. Hooray! :)
30693      path="$BOOT_JDK"
30694      has_space=`$ECHO "$path" | $GREP " "`
30695      if test "x$has_space" != x; then
30696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30699      fi
30700
30701      # Use eval to expand a potential ~
30702      eval path="$path"
30703      if test ! -f "$path" && test ! -d "$path"; then
30704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30705      fi
30706
30707      if test -d "$path"; then
30708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30709      else
30710        dir="`$DIRNAME "$path"`"
30711        base="`$BASENAME "$path"`"
30712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30713      fi
30714    fi
30715  fi
30716
30717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30718$as_echo_n "checking for Boot JDK... " >&6; }
30719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30720$as_echo "$BOOT_JDK" >&6; }
30721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30722$as_echo_n "checking Boot JDK version... " >&6; }
30723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30725$as_echo "$BOOT_JDK_VERSION" >&6; }
30726          fi # end check jdk version
30727        fi # end check javac
30728      fi # end check java
30729    fi # end check boot jdk found
30730  fi
30731
30732
30733  # If we haven't found anything yet, we've truly lost. Give up.
30734  if test "x$BOOT_JDK_FOUND" = xno; then
30735
30736  # Print a helpful message on how to acquire the necessary build dependency.
30737  # openjdk is the help tag: freetype, cups, alsa etc
30738  MISSING_DEPENDENCY=openjdk
30739
30740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30741    cygwin_help $MISSING_DEPENDENCY
30742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30743    msys_help $MISSING_DEPENDENCY
30744  else
30745    PKGHANDLER_COMMAND=
30746
30747    case $PKGHANDLER in
30748      apt-get)
30749        apt_help     $MISSING_DEPENDENCY ;;
30750      yum)
30751        yum_help     $MISSING_DEPENDENCY ;;
30752      brew)
30753        brew_help    $MISSING_DEPENDENCY ;;
30754      port)
30755        port_help    $MISSING_DEPENDENCY ;;
30756      pkgutil)
30757        pkgutil_help $MISSING_DEPENDENCY ;;
30758      pkgadd)
30759        pkgadd_help  $MISSING_DEPENDENCY ;;
30760    esac
30761
30762    if test "x$PKGHANDLER_COMMAND" != x; then
30763      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30764    fi
30765  fi
30766
30767    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30768$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30769    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30770$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30771    as_fn_error $? "Cannot continue" "$LINENO" 5
30772  fi
30773
30774
30775
30776  # Setup tools from the Boot JDK.
30777
30778  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30779
30780  # Publish this variable in the help.
30781
30782
30783  if [ -z "${JAVA+x}" ]; then
30784    # The variable is not set by user, try to locate tool using the code snippet
30785
30786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30787$as_echo_n "checking for java in Boot JDK... " >&6; }
30788      JAVA=$BOOT_JDK/bin/java
30789      if test ! -x $JAVA; then
30790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30791$as_echo "not found" >&6; }
30792        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30793$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30794        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30795      fi
30796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30797$as_echo "ok" >&6; }
30798
30799
30800  else
30801    # The variable is set, but is it from the command line or the environment?
30802
30803    # Try to remove the string !JAVA! from our list.
30804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30806      # If it failed, the variable was not from the command line. Ignore it,
30807      # but warn the user (except for BASH, which is always set by the calling BASH).
30808      if test "xJAVA" != xBASH; then
30809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30810$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30811      fi
30812      # Try to locate tool using the code snippet
30813
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30815$as_echo_n "checking for java in Boot JDK... " >&6; }
30816      JAVA=$BOOT_JDK/bin/java
30817      if test ! -x $JAVA; then
30818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30819$as_echo "not found" >&6; }
30820        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30821$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30822        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30823      fi
30824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30825$as_echo "ok" >&6; }
30826
30827
30828    else
30829      # If it succeeded, then it was overridden by the user. We will use it
30830      # for the tool.
30831
30832      # First remove it from the list of overridden variables, so we can test
30833      # for unknown variables in the end.
30834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30835
30836      # Check if we try to supply an empty value
30837      if test "x$JAVA" = x; then
30838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30839$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30841$as_echo_n "checking for JAVA... " >&6; }
30842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30843$as_echo "disabled" >&6; }
30844      else
30845        # Check if the provided tool contains a complete path.
30846        tool_specified="$JAVA"
30847        tool_basename="${tool_specified##*/}"
30848        if test "x$tool_basename" = "x$tool_specified"; then
30849          # A command without a complete path is provided, search $PATH.
30850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30851$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30852          # Extract the first word of "$tool_basename", so it can be a program name with args.
30853set dummy $tool_basename; ac_word=$2
30854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30855$as_echo_n "checking for $ac_word... " >&6; }
30856if ${ac_cv_path_JAVA+:} false; then :
30857  $as_echo_n "(cached) " >&6
30858else
30859  case $JAVA in
30860  [\\/]* | ?:[\\/]*)
30861  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30862  ;;
30863  *)
30864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30865for as_dir in $PATH
30866do
30867  IFS=$as_save_IFS
30868  test -z "$as_dir" && as_dir=.
30869    for ac_exec_ext in '' $ac_executable_extensions; do
30870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30871    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30873    break 2
30874  fi
30875done
30876  done
30877IFS=$as_save_IFS
30878
30879  ;;
30880esac
30881fi
30882JAVA=$ac_cv_path_JAVA
30883if test -n "$JAVA"; then
30884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30885$as_echo "$JAVA" >&6; }
30886else
30887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30888$as_echo "no" >&6; }
30889fi
30890
30891
30892          if test "x$JAVA" = x; then
30893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30894          fi
30895        else
30896          # Otherwise we believe it is a complete path. Use it as it is.
30897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30898$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30900$as_echo_n "checking for JAVA... " >&6; }
30901          if test ! -x "$tool_specified"; then
30902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30903$as_echo "not found" >&6; }
30904            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30905          fi
30906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30907$as_echo "$tool_specified" >&6; }
30908        fi
30909      fi
30910    fi
30911
30912  fi
30913
30914
30915
30916  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30917
30918  # Publish this variable in the help.
30919
30920
30921  if [ -z "${JAVAC+x}" ]; then
30922    # The variable is not set by user, try to locate tool using the code snippet
30923
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30925$as_echo_n "checking for javac in Boot JDK... " >&6; }
30926      JAVAC=$BOOT_JDK/bin/javac
30927      if test ! -x $JAVAC; then
30928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30929$as_echo "not found" >&6; }
30930        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30931$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30932        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30933      fi
30934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30935$as_echo "ok" >&6; }
30936
30937
30938  else
30939    # The variable is set, but is it from the command line or the environment?
30940
30941    # Try to remove the string !JAVAC! from our list.
30942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30944      # If it failed, the variable was not from the command line. Ignore it,
30945      # but warn the user (except for BASH, which is always set by the calling BASH).
30946      if test "xJAVAC" != xBASH; then
30947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30948$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30949      fi
30950      # Try to locate tool using the code snippet
30951
30952      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30953$as_echo_n "checking for javac in Boot JDK... " >&6; }
30954      JAVAC=$BOOT_JDK/bin/javac
30955      if test ! -x $JAVAC; then
30956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30957$as_echo "not found" >&6; }
30958        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30959$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30960        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30961      fi
30962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30963$as_echo "ok" >&6; }
30964
30965
30966    else
30967      # If it succeeded, then it was overridden by the user. We will use it
30968      # for the tool.
30969
30970      # First remove it from the list of overridden variables, so we can test
30971      # for unknown variables in the end.
30972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30973
30974      # Check if we try to supply an empty value
30975      if test "x$JAVAC" = x; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30977$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30979$as_echo_n "checking for JAVAC... " >&6; }
30980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30981$as_echo "disabled" >&6; }
30982      else
30983        # Check if the provided tool contains a complete path.
30984        tool_specified="$JAVAC"
30985        tool_basename="${tool_specified##*/}"
30986        if test "x$tool_basename" = "x$tool_specified"; then
30987          # A command without a complete path is provided, search $PATH.
30988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30989$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30990          # Extract the first word of "$tool_basename", so it can be a program name with args.
30991set dummy $tool_basename; ac_word=$2
30992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30993$as_echo_n "checking for $ac_word... " >&6; }
30994if ${ac_cv_path_JAVAC+:} false; then :
30995  $as_echo_n "(cached) " >&6
30996else
30997  case $JAVAC in
30998  [\\/]* | ?:[\\/]*)
30999  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
31000  ;;
31001  *)
31002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31003for as_dir in $PATH
31004do
31005  IFS=$as_save_IFS
31006  test -z "$as_dir" && as_dir=.
31007    for ac_exec_ext in '' $ac_executable_extensions; do
31008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31009    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
31010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31011    break 2
31012  fi
31013done
31014  done
31015IFS=$as_save_IFS
31016
31017  ;;
31018esac
31019fi
31020JAVAC=$ac_cv_path_JAVAC
31021if test -n "$JAVAC"; then
31022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31023$as_echo "$JAVAC" >&6; }
31024else
31025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31026$as_echo "no" >&6; }
31027fi
31028
31029
31030          if test "x$JAVAC" = x; then
31031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31032          fi
31033        else
31034          # Otherwise we believe it is a complete path. Use it as it is.
31035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31036$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31038$as_echo_n "checking for JAVAC... " >&6; }
31039          if test ! -x "$tool_specified"; then
31040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31041$as_echo "not found" >&6; }
31042            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31043          fi
31044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31045$as_echo "$tool_specified" >&6; }
31046        fi
31047      fi
31048    fi
31049
31050  fi
31051
31052
31053
31054  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31055
31056  # Publish this variable in the help.
31057
31058
31059  if [ -z "${JAVAH+x}" ]; then
31060    # The variable is not set by user, try to locate tool using the code snippet
31061
31062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31063$as_echo_n "checking for javah in Boot JDK... " >&6; }
31064      JAVAH=$BOOT_JDK/bin/javah
31065      if test ! -x $JAVAH; then
31066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31067$as_echo "not found" >&6; }
31068        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31069$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31070        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31071      fi
31072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31073$as_echo "ok" >&6; }
31074
31075
31076  else
31077    # The variable is set, but is it from the command line or the environment?
31078
31079    # Try to remove the string !JAVAH! from our list.
31080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31082      # If it failed, the variable was not from the command line. Ignore it,
31083      # but warn the user (except for BASH, which is always set by the calling BASH).
31084      if test "xJAVAH" != xBASH; then
31085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31086$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31087      fi
31088      # Try to locate tool using the code snippet
31089
31090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31091$as_echo_n "checking for javah in Boot JDK... " >&6; }
31092      JAVAH=$BOOT_JDK/bin/javah
31093      if test ! -x $JAVAH; then
31094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31095$as_echo "not found" >&6; }
31096        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31097$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31098        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31099      fi
31100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31101$as_echo "ok" >&6; }
31102
31103
31104    else
31105      # If it succeeded, then it was overridden by the user. We will use it
31106      # for the tool.
31107
31108      # First remove it from the list of overridden variables, so we can test
31109      # for unknown variables in the end.
31110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31111
31112      # Check if we try to supply an empty value
31113      if test "x$JAVAH" = x; then
31114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31115$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31117$as_echo_n "checking for JAVAH... " >&6; }
31118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31119$as_echo "disabled" >&6; }
31120      else
31121        # Check if the provided tool contains a complete path.
31122        tool_specified="$JAVAH"
31123        tool_basename="${tool_specified##*/}"
31124        if test "x$tool_basename" = "x$tool_specified"; then
31125          # A command without a complete path is provided, search $PATH.
31126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31127$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31128          # Extract the first word of "$tool_basename", so it can be a program name with args.
31129set dummy $tool_basename; ac_word=$2
31130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31131$as_echo_n "checking for $ac_word... " >&6; }
31132if ${ac_cv_path_JAVAH+:} false; then :
31133  $as_echo_n "(cached) " >&6
31134else
31135  case $JAVAH in
31136  [\\/]* | ?:[\\/]*)
31137  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31138  ;;
31139  *)
31140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31141for as_dir in $PATH
31142do
31143  IFS=$as_save_IFS
31144  test -z "$as_dir" && as_dir=.
31145    for ac_exec_ext in '' $ac_executable_extensions; do
31146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31147    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31149    break 2
31150  fi
31151done
31152  done
31153IFS=$as_save_IFS
31154
31155  ;;
31156esac
31157fi
31158JAVAH=$ac_cv_path_JAVAH
31159if test -n "$JAVAH"; then
31160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31161$as_echo "$JAVAH" >&6; }
31162else
31163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31164$as_echo "no" >&6; }
31165fi
31166
31167
31168          if test "x$JAVAH" = x; then
31169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31170          fi
31171        else
31172          # Otherwise we believe it is a complete path. Use it as it is.
31173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31174$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31176$as_echo_n "checking for JAVAH... " >&6; }
31177          if test ! -x "$tool_specified"; then
31178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31179$as_echo "not found" >&6; }
31180            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31181          fi
31182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31183$as_echo "$tool_specified" >&6; }
31184        fi
31185      fi
31186    fi
31187
31188  fi
31189
31190
31191
31192  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31193
31194  # Publish this variable in the help.
31195
31196
31197  if [ -z "${JAR+x}" ]; then
31198    # The variable is not set by user, try to locate tool using the code snippet
31199
31200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31201$as_echo_n "checking for jar in Boot JDK... " >&6; }
31202      JAR=$BOOT_JDK/bin/jar
31203      if test ! -x $JAR; then
31204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31205$as_echo "not found" >&6; }
31206        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31207$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31208        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31209      fi
31210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31211$as_echo "ok" >&6; }
31212
31213
31214  else
31215    # The variable is set, but is it from the command line or the environment?
31216
31217    # Try to remove the string !JAR! from our list.
31218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31220      # If it failed, the variable was not from the command line. Ignore it,
31221      # but warn the user (except for BASH, which is always set by the calling BASH).
31222      if test "xJAR" != xBASH; then
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31224$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31225      fi
31226      # Try to locate tool using the code snippet
31227
31228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31229$as_echo_n "checking for jar in Boot JDK... " >&6; }
31230      JAR=$BOOT_JDK/bin/jar
31231      if test ! -x $JAR; then
31232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31233$as_echo "not found" >&6; }
31234        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31235$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31236        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31237      fi
31238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31239$as_echo "ok" >&6; }
31240
31241
31242    else
31243      # If it succeeded, then it was overridden by the user. We will use it
31244      # for the tool.
31245
31246      # First remove it from the list of overridden variables, so we can test
31247      # for unknown variables in the end.
31248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31249
31250      # Check if we try to supply an empty value
31251      if test "x$JAR" = x; then
31252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31253$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31255$as_echo_n "checking for JAR... " >&6; }
31256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31257$as_echo "disabled" >&6; }
31258      else
31259        # Check if the provided tool contains a complete path.
31260        tool_specified="$JAR"
31261        tool_basename="${tool_specified##*/}"
31262        if test "x$tool_basename" = "x$tool_specified"; then
31263          # A command without a complete path is provided, search $PATH.
31264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31265$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31266          # Extract the first word of "$tool_basename", so it can be a program name with args.
31267set dummy $tool_basename; ac_word=$2
31268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31269$as_echo_n "checking for $ac_word... " >&6; }
31270if ${ac_cv_path_JAR+:} false; then :
31271  $as_echo_n "(cached) " >&6
31272else
31273  case $JAR in
31274  [\\/]* | ?:[\\/]*)
31275  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31276  ;;
31277  *)
31278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31279for as_dir in $PATH
31280do
31281  IFS=$as_save_IFS
31282  test -z "$as_dir" && as_dir=.
31283    for ac_exec_ext in '' $ac_executable_extensions; do
31284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31285    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31287    break 2
31288  fi
31289done
31290  done
31291IFS=$as_save_IFS
31292
31293  ;;
31294esac
31295fi
31296JAR=$ac_cv_path_JAR
31297if test -n "$JAR"; then
31298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31299$as_echo "$JAR" >&6; }
31300else
31301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31302$as_echo "no" >&6; }
31303fi
31304
31305
31306          if test "x$JAR" = x; then
31307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31308          fi
31309        else
31310          # Otherwise we believe it is a complete path. Use it as it is.
31311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31312$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31314$as_echo_n "checking for JAR... " >&6; }
31315          if test ! -x "$tool_specified"; then
31316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31317$as_echo "not found" >&6; }
31318            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31319          fi
31320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31321$as_echo "$tool_specified" >&6; }
31322        fi
31323      fi
31324    fi
31325
31326  fi
31327
31328
31329
31330  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31331
31332  # Publish this variable in the help.
31333
31334
31335  if [ -z "${JARSIGNER+x}" ]; then
31336    # The variable is not set by user, try to locate tool using the code snippet
31337
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31339$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31340      JARSIGNER=$BOOT_JDK/bin/jarsigner
31341      if test ! -x $JARSIGNER; then
31342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31343$as_echo "not found" >&6; }
31344        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31345$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31346        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31347      fi
31348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31349$as_echo "ok" >&6; }
31350
31351
31352  else
31353    # The variable is set, but is it from the command line or the environment?
31354
31355    # Try to remove the string !JARSIGNER! from our list.
31356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31358      # If it failed, the variable was not from the command line. Ignore it,
31359      # but warn the user (except for BASH, which is always set by the calling BASH).
31360      if test "xJARSIGNER" != xBASH; then
31361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31362$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31363      fi
31364      # Try to locate tool using the code snippet
31365
31366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31367$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31368      JARSIGNER=$BOOT_JDK/bin/jarsigner
31369      if test ! -x $JARSIGNER; then
31370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31371$as_echo "not found" >&6; }
31372        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31373$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31374        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31375      fi
31376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31377$as_echo "ok" >&6; }
31378
31379
31380    else
31381      # If it succeeded, then it was overridden by the user. We will use it
31382      # for the tool.
31383
31384      # First remove it from the list of overridden variables, so we can test
31385      # for unknown variables in the end.
31386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31387
31388      # Check if we try to supply an empty value
31389      if test "x$JARSIGNER" = x; then
31390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31391$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31393$as_echo_n "checking for JARSIGNER... " >&6; }
31394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31395$as_echo "disabled" >&6; }
31396      else
31397        # Check if the provided tool contains a complete path.
31398        tool_specified="$JARSIGNER"
31399        tool_basename="${tool_specified##*/}"
31400        if test "x$tool_basename" = "x$tool_specified"; then
31401          # A command without a complete path is provided, search $PATH.
31402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31403$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31404          # Extract the first word of "$tool_basename", so it can be a program name with args.
31405set dummy $tool_basename; ac_word=$2
31406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31407$as_echo_n "checking for $ac_word... " >&6; }
31408if ${ac_cv_path_JARSIGNER+:} false; then :
31409  $as_echo_n "(cached) " >&6
31410else
31411  case $JARSIGNER in
31412  [\\/]* | ?:[\\/]*)
31413  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31414  ;;
31415  *)
31416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31417for as_dir in $PATH
31418do
31419  IFS=$as_save_IFS
31420  test -z "$as_dir" && as_dir=.
31421    for ac_exec_ext in '' $ac_executable_extensions; do
31422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31423    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31425    break 2
31426  fi
31427done
31428  done
31429IFS=$as_save_IFS
31430
31431  ;;
31432esac
31433fi
31434JARSIGNER=$ac_cv_path_JARSIGNER
31435if test -n "$JARSIGNER"; then
31436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31437$as_echo "$JARSIGNER" >&6; }
31438else
31439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31440$as_echo "no" >&6; }
31441fi
31442
31443
31444          if test "x$JARSIGNER" = x; then
31445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31446          fi
31447        else
31448          # Otherwise we believe it is a complete path. Use it as it is.
31449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31450$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31452$as_echo_n "checking for JARSIGNER... " >&6; }
31453          if test ! -x "$tool_specified"; then
31454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31455$as_echo "not found" >&6; }
31456            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31457          fi
31458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31459$as_echo "$tool_specified" >&6; }
31460        fi
31461      fi
31462    fi
31463
31464  fi
31465
31466
31467
31468  # Finally, set some other options...
31469
31470  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31471  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31472
31473
31474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31475$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31476  if "$JAVA" --list-modules > /dev/null 2>&1; then
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31478$as_echo "yes" >&6; }
31479    BOOT_JDK_MODULAR="true"
31480  else
31481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31482$as_echo "no" >&6; }
31483    BOOT_JDK_MODULAR="false"
31484  fi
31485
31486
31487
31488
31489  # Check if the boot jdk is 32 or 64 bit
31490  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31491    BOOT_JDK_BITS="64"
31492  else
31493    BOOT_JDK_BITS="32"
31494  fi
31495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31496$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31498$as_echo "$BOOT_JDK_BITS" >&6; }
31499
31500
31501
31502# Check whether --with-build-jdk was given.
31503if test "${with_build_jdk+set}" = set; then :
31504  withval=$with_build_jdk;
31505fi
31506
31507
31508  CREATE_BUILDJDK=false
31509  EXTERNAL_BUILDJDK=false
31510  BUILD_JDK_FOUND="no"
31511  if test "x$with_build_jdk" != "x"; then
31512
31513  if test "x$BUILD_JDK_FOUND" = xno; then
31514    # Execute the test
31515
31516       if test "x$with_build_jdk" != x; then
31517         BUILD_JDK=$with_build_jdk
31518         BUILD_JDK_FOUND=maybe
31519         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31520$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31521       fi
31522
31523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31524    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31525      # Do we have a bin/java?
31526      if test ! -x "$BUILD_JDK/bin/java"; then
31527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31528$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31529        BUILD_JDK_FOUND=no
31530      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31532$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31533        BUILD_JDK_FOUND=no
31534      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31536$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31537        BUILD_JDK_FOUND=no
31538      elif test ! -x "$BUILD_JDK/bin/javac"; then
31539        # Do we have a bin/javac?
31540        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31541$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31542        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31543$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31544        BUILD_JDK_FOUND=no
31545      else
31546        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31547        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31548
31549        # Extra M4 quote needed to protect [] in grep expression.
31550        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31551        if test "x$FOUND_CORRECT_VERSION" = x; then
31552          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31553$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31554          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31555$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31556          BUILD_JDK_FOUND=no
31557        else
31558          # We're done!
31559          BUILD_JDK_FOUND=yes
31560
31561  # Only process if variable expands to non-empty
31562
31563  if test "x$BUILD_JDK" != x; then
31564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31565
31566  # Input might be given as Windows format, start by converting to
31567  # unix format.
31568  path="$BUILD_JDK"
31569  new_path=`$CYGPATH -u "$path"`
31570
31571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31574  # "foo.exe" is OK but "foo" is an error.
31575  #
31576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31577  # It is also a way to make sure we got the proper file name for the real test later on.
31578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31579  if test "x$test_shortpath" = x; then
31580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31581$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31582    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31583  fi
31584
31585  # Call helper function which possibly converts this using DOS-style short mode.
31586  # If so, the updated path is stored in $new_path.
31587
31588  input_path="$new_path"
31589  # Check if we need to convert this using DOS-style short mode. If the path
31590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31591  # take no chances and rewrite it.
31592  # Note: m4 eats our [], so we need to use [ and ] instead.
31593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31594  if test "x$has_forbidden_chars" != x; then
31595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31599      # Going to short mode and back again did indeed matter. Since short mode is
31600      # case insensitive, let's make it lowercase to improve readability.
31601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31602      # Now convert it back to Unix-style (cygpath)
31603      input_path=`$CYGPATH -u "$shortmode_path"`
31604      new_path="$input_path"
31605    fi
31606  fi
31607
31608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31609  if test "x$test_cygdrive_prefix" = x; then
31610    # As a simple fix, exclude /usr/bin since it's not a real path.
31611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31613      # a path prefixed by /cygdrive for fixpath to work.
31614      new_path="$CYGWIN_ROOT_PATH$input_path"
31615    fi
31616  fi
31617
31618
31619  if test "x$path" != "x$new_path"; then
31620    BUILD_JDK="$new_path"
31621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31622$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31623  fi
31624
31625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31626
31627  path="$BUILD_JDK"
31628  has_colon=`$ECHO $path | $GREP ^.:`
31629  new_path="$path"
31630  if test "x$has_colon" = x; then
31631    # Not in mixed or Windows style, start by that.
31632    new_path=`cmd //c echo $path`
31633  fi
31634
31635
31636  input_path="$new_path"
31637  # Check if we need to convert this using DOS-style short mode. If the path
31638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31639  # take no chances and rewrite it.
31640  # Note: m4 eats our [], so we need to use [ and ] instead.
31641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31642  if test "x$has_forbidden_chars" != x; then
31643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31645  fi
31646
31647
31648  windows_path="$new_path"
31649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31650    unix_path=`$CYGPATH -u "$windows_path"`
31651    new_path="$unix_path"
31652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31654    new_path="$unix_path"
31655  fi
31656
31657  if test "x$path" != "x$new_path"; then
31658    BUILD_JDK="$new_path"
31659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31660$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31661  fi
31662
31663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31665
31666    else
31667      # We're on a unix platform. Hooray! :)
31668      path="$BUILD_JDK"
31669      has_space=`$ECHO "$path" | $GREP " "`
31670      if test "x$has_space" != x; then
31671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31672$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31674      fi
31675
31676      # Use eval to expand a potential ~
31677      eval path="$path"
31678      if test ! -f "$path" && test ! -d "$path"; then
31679        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31680      fi
31681
31682      if test -d "$path"; then
31683        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31684      else
31685        dir="`$DIRNAME "$path"`"
31686        base="`$BASENAME "$path"`"
31687        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31688      fi
31689    fi
31690  fi
31691
31692          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31693$as_echo_n "checking for Build JDK... " >&6; }
31694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31695$as_echo "$BUILD_JDK" >&6; }
31696          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31697$as_echo_n "checking Build JDK version... " >&6; }
31698          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31699          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31700$as_echo "$BUILD_JDK_VERSION" >&6; }
31701        fi # end check jdk version
31702      fi # end check java
31703    fi # end check build jdk found
31704  fi
31705
31706    EXTERNAL_BUILDJDK=true
31707  else
31708    if test "x$COMPILE_TYPE" = "xcross"; then
31709      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31710      BUILD_JDK_FOUND=yes
31711      CREATE_BUILDJDK=true
31712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31713$as_echo_n "checking for Build JDK... " >&6; }
31714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31715$as_echo "yes, will build it for the host platform" >&6; }
31716    else
31717      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31718      BUILD_JDK_FOUND=yes
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31720$as_echo_n "checking for Build JDK... " >&6; }
31721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31722$as_echo "yes, will use output dir" >&6; }
31723    fi
31724  fi
31725
31726  JMOD="$BUILD_JDK/bin/jmod"
31727  JLINK="$BUILD_JDK/bin/jlink"
31728
31729
31730
31731  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31733$as_echo_n "checking for Build JDK... " >&6; }
31734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31735$as_echo "no" >&6; }
31736    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31737  fi
31738
31739
31740
31741
31742
31743
31744###############################################################################
31745#
31746# Configure the sources to use. We can add or override individual directories.
31747#
31748###############################################################################
31749
31750
31751  # Where are the sources.
31752  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31753  CORBA_TOPDIR="$SRC_ROOT/corba"
31754  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31755  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31756  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31757  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31758  JDK_TOPDIR="$SRC_ROOT/jdk"
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768  # This feature is no longer supported.
31769
31770
31771
31772# Check whether --with-add-source-root was given.
31773if test "${with_add_source_root+set}" = set; then :
31774  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
31775$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31776fi
31777
31778
31779
31780
31781# Check whether --with-override-source-root was given.
31782if test "${with_override_source_root+set}" = set; then :
31783  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
31784$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31785fi
31786
31787
31788
31789
31790# Check whether --with-adds-and-overrides was given.
31791if test "${with_adds_and_overrides+set}" = set; then :
31792  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
31793$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31794fi
31795
31796
31797
31798
31799# Check whether --with-override-langtools was given.
31800if test "${with_override_langtools+set}" = set; then :
31801  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31802$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31803fi
31804
31805
31806
31807
31808# Check whether --with-override-corba was given.
31809if test "${with_override_corba+set}" = set; then :
31810  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31811$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31812fi
31813
31814
31815
31816
31817# Check whether --with-override-jaxp was given.
31818if test "${with_override_jaxp+set}" = set; then :
31819  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31820$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31821fi
31822
31823
31824
31825
31826# Check whether --with-override-jaxws was given.
31827if test "${with_override_jaxws+set}" = set; then :
31828  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31829$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31830fi
31831
31832
31833
31834
31835# Check whether --with-override-hotspot was given.
31836if test "${with_override_hotspot+set}" = set; then :
31837  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31838$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31839fi
31840
31841
31842
31843
31844# Check whether --with-override-nashorn was given.
31845if test "${with_override_nashorn+set}" = set; then :
31846  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31847$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31848fi
31849
31850
31851
31852
31853# Check whether --with-override-jdk was given.
31854if test "${with_override_jdk+set}" = set; then :
31855  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31856$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31857fi
31858
31859
31860
31861
31862  BUILD_OUTPUT="$OUTPUT_ROOT"
31863
31864  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31865
31866
31867
31868# Check whether --with-import_hotspot was given.
31869if test "${with_import_hotspot+set}" = set; then :
31870  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31871$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31872fi
31873
31874
31875
31876
31877
31878
31879# Check whether --with-import-modules was given.
31880if test "${with_import_modules+set}" = set; then :
31881  withval=$with_import_modules;
31882fi
31883
31884
31885  if test "x$with_import_modules" != x \
31886      && test "x$with_import_modules" != "xno"; then
31887    if test -d "$with_import_modules"; then
31888      IMPORT_MODULES_TOPDIR="$with_import_modules"
31889
31890  # Only process if variable expands to non-empty
31891
31892  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31894
31895  # Input might be given as Windows format, start by converting to
31896  # unix format.
31897  path="$IMPORT_MODULES_TOPDIR"
31898  new_path=`$CYGPATH -u "$path"`
31899
31900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31903  # "foo.exe" is OK but "foo" is an error.
31904  #
31905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31906  # It is also a way to make sure we got the proper file name for the real test later on.
31907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31908  if test "x$test_shortpath" = x; then
31909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31910$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31911    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31912  fi
31913
31914  # Call helper function which possibly converts this using DOS-style short mode.
31915  # If so, the updated path is stored in $new_path.
31916
31917  input_path="$new_path"
31918  # Check if we need to convert this using DOS-style short mode. If the path
31919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31920  # take no chances and rewrite it.
31921  # Note: m4 eats our [], so we need to use [ and ] instead.
31922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31923  if test "x$has_forbidden_chars" != x; then
31924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31928      # Going to short mode and back again did indeed matter. Since short mode is
31929      # case insensitive, let's make it lowercase to improve readability.
31930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31931      # Now convert it back to Unix-style (cygpath)
31932      input_path=`$CYGPATH -u "$shortmode_path"`
31933      new_path="$input_path"
31934    fi
31935  fi
31936
31937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31938  if test "x$test_cygdrive_prefix" = x; then
31939    # As a simple fix, exclude /usr/bin since it's not a real path.
31940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31942      # a path prefixed by /cygdrive for fixpath to work.
31943      new_path="$CYGWIN_ROOT_PATH$input_path"
31944    fi
31945  fi
31946
31947
31948  if test "x$path" != "x$new_path"; then
31949    IMPORT_MODULES_TOPDIR="$new_path"
31950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31951$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31952  fi
31953
31954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31955
31956  path="$IMPORT_MODULES_TOPDIR"
31957  has_colon=`$ECHO $path | $GREP ^.:`
31958  new_path="$path"
31959  if test "x$has_colon" = x; then
31960    # Not in mixed or Windows style, start by that.
31961    new_path=`cmd //c echo $path`
31962  fi
31963
31964
31965  input_path="$new_path"
31966  # Check if we need to convert this using DOS-style short mode. If the path
31967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31968  # take no chances and rewrite it.
31969  # Note: m4 eats our [], so we need to use [ and ] instead.
31970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31971  if test "x$has_forbidden_chars" != x; then
31972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31974  fi
31975
31976
31977  windows_path="$new_path"
31978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31979    unix_path=`$CYGPATH -u "$windows_path"`
31980    new_path="$unix_path"
31981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31983    new_path="$unix_path"
31984  fi
31985
31986  if test "x$path" != "x$new_path"; then
31987    IMPORT_MODULES_TOPDIR="$new_path"
31988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31989$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31990  fi
31991
31992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31994
31995    else
31996      # We're on a unix platform. Hooray! :)
31997      path="$IMPORT_MODULES_TOPDIR"
31998      has_space=`$ECHO "$path" | $GREP " "`
31999      if test "x$has_space" != x; then
32000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
32001$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
32002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32003      fi
32004
32005      # Use eval to expand a potential ~
32006      eval path="$path"
32007      if test ! -f "$path" && test ! -d "$path"; then
32008        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
32009      fi
32010
32011      if test -d "$path"; then
32012        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
32013      else
32014        dir="`$DIRNAME "$path"`"
32015        base="`$BASENAME "$path"`"
32016        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
32017      fi
32018    fi
32019  fi
32020
32021    elif test -e "$with_import_modules"; then
32022      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
32023      $RM -rf "$IMPORT_MODULES_TOPDIR"
32024      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
32025      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
32026        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32027      fi
32028    else
32029      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32030    fi
32031  fi
32032
32033  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
32034    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
32035  fi
32036  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
32037    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
32038  fi
32039  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
32040    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
32041  fi
32042  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
32043    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
32044  fi
32045  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
32046    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
32047  fi
32048  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
32049    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
32050  fi
32051  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
32052    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
32053  fi
32054  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
32055    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
32056  fi
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068###############################################################################
32069#
32070# Setup the toolchain (compilers etc), i.e. tools used to compile and process
32071# native code.
32072#
32073###############################################################################
32074
32075# See if we are doing a complete static build or not
32076
32077  # Check whether --enable-static-build was given.
32078if test "${enable_static_build+set}" = set; then :
32079  enableval=$enable_static_build;
32080fi
32081
32082  STATIC_BUILD=false
32083  if test "x$enable_static_build" = "xyes"; then
32084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32085$as_echo_n "checking if static build is enabled... " >&6; }
32086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32087$as_echo "yes" >&6; }
32088    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32089      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32090    fi
32091    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32092    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32093    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32094    STATIC_BUILD=true
32095  elif test "x$enable_static_build" = "xno"; then
32096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32097$as_echo_n "checking if static build is enabled... " >&6; }
32098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32099$as_echo "no" >&6; }
32100  elif test "x$enable_static_build" != "x"; then
32101    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32102  fi
32103
32104
32105
32106
32107# First determine the toolchain type (compiler family)
32108
32109
32110# Check whether --with-toolchain-type was given.
32111if test "${with_toolchain_type+set}" = set; then :
32112  withval=$with_toolchain_type;
32113fi
32114
32115
32116  # Use indirect variable referencing
32117  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32118  VALID_TOOLCHAINS=${!toolchain_var_name}
32119
32120  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32121    if test -n "$XCODEBUILD"; then
32122      # On Mac OS X, default toolchain to clang after Xcode 5
32123      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32124      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32125      if test $? -ne 0; then
32126        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32127      fi
32128      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32129          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32130          $CUT -f 1 -d .`
32131      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32132$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32133      if test $XCODE_MAJOR_VERSION -ge 5; then
32134          DEFAULT_TOOLCHAIN="clang"
32135      else
32136          DEFAULT_TOOLCHAIN="gcc"
32137      fi
32138    else
32139      # If Xcode is not installed, but the command line tools are
32140      # then we can't run xcodebuild. On these systems we should
32141      # default to clang
32142      DEFAULT_TOOLCHAIN="clang"
32143    fi
32144  else
32145    # First toolchain type in the list is the default
32146    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32147  fi
32148
32149  if test "x$with_toolchain_type" = xlist; then
32150    # List all toolchains
32151    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32152$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32153    for toolchain in $VALID_TOOLCHAINS; do
32154      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32155      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32156      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32157    done
32158
32159    exit 0
32160  elif test "x$with_toolchain_type" != x; then
32161    # User override; check that it is valid
32162    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32163      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32164$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32165      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32166$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32167      as_fn_error $? "Cannot continue." "$LINENO" 5
32168    fi
32169    TOOLCHAIN_TYPE=$with_toolchain_type
32170  else
32171    # No flag given, use default
32172    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32173  fi
32174
32175
32176  TOOLCHAIN_CC_BINARY_clang="clang"
32177  TOOLCHAIN_CC_BINARY_gcc="gcc"
32178  TOOLCHAIN_CC_BINARY_microsoft="cl"
32179  TOOLCHAIN_CC_BINARY_solstudio="cc"
32180  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32181
32182  TOOLCHAIN_CXX_BINARY_clang="clang++"
32183  TOOLCHAIN_CXX_BINARY_gcc="g++"
32184  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32185  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32186  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32187
32188  # Use indirect variable referencing
32189  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32190  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32191  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32192  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32193  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32194  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32195  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32196  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32197
32198
32199  # Define filename patterns
32200  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32201    LIBRARY_PREFIX=
32202    SHARED_LIBRARY_SUFFIX='.dll'
32203    STATIC_LIBRARY_SUFFIX='.lib'
32204    SHARED_LIBRARY='$1.dll'
32205    STATIC_LIBRARY='$1.lib'
32206    OBJ_SUFFIX='.obj'
32207    EXE_SUFFIX='.exe'
32208  else
32209    LIBRARY_PREFIX=lib
32210    SHARED_LIBRARY_SUFFIX='.so'
32211    STATIC_LIBRARY_SUFFIX='.a'
32212    SHARED_LIBRARY='lib$1.so'
32213    STATIC_LIBRARY='lib$1.a'
32214    OBJ_SUFFIX='.o'
32215    EXE_SUFFIX=''
32216    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32217      # For full static builds, we're overloading the SHARED_LIBRARY
32218      # variables in order to limit the amount of changes required.
32219      # It would be better to remove SHARED and just use LIBRARY and
32220      # LIBRARY_SUFFIX for libraries that can be built either
32221      # shared or static and use STATIC_* for libraries that are
32222      # always built statically.
32223      if test "x$STATIC_BUILD" = xtrue; then
32224        SHARED_LIBRARY='lib$1.a'
32225        SHARED_LIBRARY_SUFFIX='.a'
32226      else
32227        SHARED_LIBRARY='lib$1.dylib'
32228        SHARED_LIBRARY_SUFFIX='.dylib'
32229      fi
32230    fi
32231  fi
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32243    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32244$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32245  else
32246    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32247$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32248  fi
32249
32250
32251# User supplied flags should be used when configure detects compilers
32252
32253  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32254    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32255$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32256  fi
32257
32258  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32260$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32261  fi
32262
32263  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32264    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32265$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32266  fi
32267
32268
32269# Check whether --with-extra-cflags was given.
32270if test "${with_extra_cflags+set}" = set; then :
32271  withval=$with_extra_cflags;
32272fi
32273
32274
32275
32276# Check whether --with-extra-cxxflags was given.
32277if test "${with_extra_cxxflags+set}" = set; then :
32278  withval=$with_extra_cxxflags;
32279fi
32280
32281
32282
32283# Check whether --with-extra-ldflags was given.
32284if test "${with_extra_ldflags+set}" = set; then :
32285  withval=$with_extra_ldflags;
32286fi
32287
32288
32289  EXTRA_CFLAGS="$with_extra_cflags"
32290  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32291  EXTRA_LDFLAGS="$with_extra_ldflags"
32292
32293
32294
32295
32296
32297  # The global CFLAGS and LDLAGS variables are used by configure tests and
32298  # should include the extra parameters
32299  CFLAGS="$EXTRA_CFLAGS"
32300  CXXFLAGS="$EXTRA_CXXFLAGS"
32301  LDFLAGS="$EXTRA_LDFLAGS"
32302  CPPFLAGS=""
32303
32304# The sysroot cflags are needed for configure to be able to run the compilers
32305
32306  if test "x$SYSROOT" != "x"; then
32307    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32308      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32309        # Solaris Studio does not have a concept of sysroot. Instead we must
32310        # make sure the default include and lib dirs are appended to each
32311        # compile and link command line. Must also add -I-xbuiltin to enable
32312        # inlining of system functions and intrinsics.
32313        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32314        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32315            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32316      fi
32317    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32318      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32319      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32320    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32321      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32322      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32323    fi
32324    # The global CFLAGS and LDFLAGS variables need these for configure to function
32325    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32326    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32327    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32328    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32329  fi
32330
32331  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32332    # We also need -iframework<path>/System/Library/Frameworks
32333    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32334    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32335    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32336    # set this here so it doesn't have to be peppered throughout the forest
32337    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32338    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32339  fi
32340
32341
32342
32343
32344
32345# Then detect the actual binaries needed
32346
32347  # FIXME: Is this needed?
32348  ac_ext=cpp
32349ac_cpp='$CXXCPP $CPPFLAGS'
32350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32353
32354
32355  # Store the CFLAGS etc passed to the configure script.
32356  ORG_CFLAGS="$CFLAGS"
32357  ORG_CXXFLAGS="$CXXFLAGS"
32358
32359  # autoconf magic only relies on PATH, so update it if tools dir is specified
32360  OLD_PATH="$PATH"
32361
32362  # On Windows, we need to detect the visual studio installation first.
32363  # This will change the PATH, but we need to keep that new PATH even
32364  # after toolchain detection is done, since the compiler (on x86) uses
32365  # it for DLL resolution in runtime.
32366  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32367      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32368
32369  # Store path to cygwin link.exe to help excluding it when searching for
32370  # VS linker. This must be done before changing the PATH when looking for VS.
32371  # Extract the first word of "link", so it can be a program name with args.
32372set dummy link; ac_word=$2
32373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32374$as_echo_n "checking for $ac_word... " >&6; }
32375if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32376  $as_echo_n "(cached) " >&6
32377else
32378  case $CYGWIN_LINK in
32379  [\\/]* | ?:[\\/]*)
32380  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32381  ;;
32382  *)
32383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32384for as_dir in $PATH
32385do
32386  IFS=$as_save_IFS
32387  test -z "$as_dir" && as_dir=.
32388    for ac_exec_ext in '' $ac_executable_extensions; do
32389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32390    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32392    break 2
32393  fi
32394done
32395  done
32396IFS=$as_save_IFS
32397
32398  ;;
32399esac
32400fi
32401CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32402if test -n "$CYGWIN_LINK"; then
32403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32404$as_echo "$CYGWIN_LINK" >&6; }
32405else
32406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32407$as_echo "no" >&6; }
32408fi
32409
32410
32411  if test "x$CYGWIN_LINK" != x; then
32412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32413$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32414    "$CYGWIN_LINK" --version > /dev/null
32415    if test $? -eq 0 ; then
32416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32417$as_echo "yes" >&6; }
32418    else
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32420$as_echo "no" >&6; }
32421      # This might be the VS linker. Don't exclude it later on.
32422      CYGWIN_LINK=""
32423    fi
32424  fi
32425
32426  # First-hand choice is to locate and run the vsvars bat file.
32427
32428
32429# Check whether --with-toolchain-version was given.
32430if test "${with_toolchain_version+set}" = set; then :
32431  withval=$with_toolchain_version;
32432fi
32433
32434
32435  if test "x$with_toolchain_version" = xlist; then
32436    # List all toolchains
32437    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32438$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32439    for version in $VALID_VS_VERSIONS; do
32440      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32441      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32442    done
32443
32444    exit 0
32445  elif test "x$DEVKIT_VS_VERSION" != x; then
32446    VS_VERSION=$DEVKIT_VS_VERSION
32447    TOOLCHAIN_VERSION=$VS_VERSION
32448    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32449    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32450    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32451    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32452    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32453    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32454
32455    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32456    # can still be exported as INCLUDE for compiler invocations without
32457    # SYSROOT_CFLAGS
32458    OLDIFS="$IFS"
32459    IFS=";"
32460    for i in $DEVKIT_VS_INCLUDE; do
32461      ipath=$i
32462
32463  unix_path="$ipath"
32464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32465    windows_path=`$CYGPATH -m "$unix_path"`
32466    ipath="$windows_path"
32467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32468    windows_path=`cmd //c echo $unix_path`
32469    ipath="$windows_path"
32470  fi
32471
32472      VS_INCLUDE="$VS_INCLUDE;$ipath"
32473    done
32474    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32475    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32476    for i in $DEVKIT_VS_LIB; do
32477      libpath=$i
32478
32479  unix_path="$libpath"
32480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32481    windows_path=`$CYGPATH -m "$unix_path"`
32482    libpath="$windows_path"
32483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32484    windows_path=`cmd //c echo $unix_path`
32485    libpath="$windows_path"
32486  fi
32487
32488      VS_LIB="$VS_LIB;$libpath"
32489    done
32490    IFS="$OLDIFS"
32491
32492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32493$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32494
32495  elif test "x$with_toolchain_version" != x; then
32496    # User override; check that it is valid
32497    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32498      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32499$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32500      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32501$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32502      as_fn_error $? "Cannot continue." "$LINENO" 5
32503    fi
32504    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32505  else
32506    # No flag given, use default
32507    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32508  fi
32509
32510  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32511
32512  VS_VERSION="$VS_VERSION"
32513  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32514  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32515  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32516  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32517
32518  # When using --with-tools-dir, assume it points to the correct and default
32519  # version of Visual Studio or that --with-toolchain-version was also set.
32520  if test "x$with_tools_dir" != x; then
32521
32522  if test "x$VS_ENV_CMD" = x; then
32523    VS_VERSION="${VS_VERSION}"
32524    VS_BASE="$with_tools_dir/../.."
32525    METHOD="--with-tools-dir"
32526
32527    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32528      VCVARSFILE="vc/bin/vcvars32.bat"
32529    else
32530      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32531    fi
32532
32533
32534  windows_path="$VS_BASE"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    unix_path=`$CYGPATH -u "$windows_path"`
32537    VS_BASE="$unix_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32540    VS_BASE="$unix_path"
32541  fi
32542
32543    if test -d "$VS_BASE"; then
32544      if test -f "$VS_BASE/$VCVARSFILE"; then
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32546$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32547        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32548        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32549        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32550        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32551      else
32552        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32553$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32554        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32555$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32556      fi
32557    fi
32558  fi
32559
32560
32561  if test "x$VS_ENV_CMD" = x; then
32562    VS_VERSION="${VS_VERSION}"
32563    VS_BASE="$with_tools_dir/../../.."
32564    METHOD="--with-tools-dir"
32565
32566    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32567      VCVARSFILE="vc/bin/vcvars32.bat"
32568    else
32569      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32570    fi
32571
32572
32573  windows_path="$VS_BASE"
32574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32575    unix_path=`$CYGPATH -u "$windows_path"`
32576    VS_BASE="$unix_path"
32577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32579    VS_BASE="$unix_path"
32580  fi
32581
32582    if test -d "$VS_BASE"; then
32583      if test -f "$VS_BASE/$VCVARSFILE"; then
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32585$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32586        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32587        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32588        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32589        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32590      else
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32592$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32594$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32595      fi
32596    fi
32597  fi
32598
32599    if test "x$VS_ENV_CMD" = x; then
32600      # Having specified an argument which is incorrect will produce an instant failure;
32601      # we should not go on looking
32602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32603$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32604      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32605$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32606      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32607$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32608      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32609    fi
32610  fi
32611
32612  VS_ENV_CMD=""
32613  VS_ENV_ARGS=""
32614
32615  if test "x$VS_COMNTOOLS" != x; then
32616
32617  if test "x$VS_ENV_CMD" = x; then
32618    VS_VERSION="${VS_VERSION}"
32619    VS_BASE="$VS_COMNTOOLS/../.."
32620    METHOD="$VS_COMNTOOLS_VAR variable"
32621
32622    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32623      VCVARSFILE="vc/bin/vcvars32.bat"
32624    else
32625      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32626    fi
32627
32628
32629  windows_path="$VS_BASE"
32630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32631    unix_path=`$CYGPATH -u "$windows_path"`
32632    VS_BASE="$unix_path"
32633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32635    VS_BASE="$unix_path"
32636  fi
32637
32638    if test -d "$VS_BASE"; then
32639      if test -f "$VS_BASE/$VCVARSFILE"; then
32640        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32641$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32642        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32643        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32644        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32645        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32646      else
32647        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32648$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32649        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32650$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32651      fi
32652    fi
32653  fi
32654
32655  fi
32656  if test "x$PROGRAMFILES" != x; then
32657
32658  if test "x$VS_ENV_CMD" = x; then
32659    VS_VERSION="${VS_VERSION}"
32660    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32661    METHOD="well-known name"
32662
32663    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32664      VCVARSFILE="vc/bin/vcvars32.bat"
32665    else
32666      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32667    fi
32668
32669
32670  windows_path="$VS_BASE"
32671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32672    unix_path=`$CYGPATH -u "$windows_path"`
32673    VS_BASE="$unix_path"
32674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32676    VS_BASE="$unix_path"
32677  fi
32678
32679    if test -d "$VS_BASE"; then
32680      if test -f "$VS_BASE/$VCVARSFILE"; then
32681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32682$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32683        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32684        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32685        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32686        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32687      else
32688        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32689$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32690        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32691$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32692      fi
32693    fi
32694  fi
32695
32696  fi
32697  # Work around the insanely named ProgramFiles(x86) env variable
32698  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32699  if test "x$PROGRAMFILES_X86" != x; then
32700
32701  if test "x$VS_ENV_CMD" = x; then
32702    VS_VERSION="${VS_VERSION}"
32703    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32704    METHOD="well-known name"
32705
32706    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32707      VCVARSFILE="vc/bin/vcvars32.bat"
32708    else
32709      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32710    fi
32711
32712
32713  windows_path="$VS_BASE"
32714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32715    unix_path=`$CYGPATH -u "$windows_path"`
32716    VS_BASE="$unix_path"
32717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32719    VS_BASE="$unix_path"
32720  fi
32721
32722    if test -d "$VS_BASE"; then
32723      if test -f "$VS_BASE/$VCVARSFILE"; then
32724        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32725$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32726        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32727        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32728        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32729        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32730      else
32731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32732$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32734$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32735      fi
32736    fi
32737  fi
32738
32739  fi
32740
32741  if test "x$VS_ENV_CMD" = x; then
32742    VS_VERSION="${VS_VERSION}"
32743    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32744    METHOD="well-known name"
32745
32746    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32747      VCVARSFILE="vc/bin/vcvars32.bat"
32748    else
32749      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32750    fi
32751
32752
32753  windows_path="$VS_BASE"
32754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32755    unix_path=`$CYGPATH -u "$windows_path"`
32756    VS_BASE="$unix_path"
32757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32759    VS_BASE="$unix_path"
32760  fi
32761
32762    if test -d "$VS_BASE"; then
32763      if test -f "$VS_BASE/$VCVARSFILE"; then
32764        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32765$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32766        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32767        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32768        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32769        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32770      else
32771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32772$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32773        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32774$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32775      fi
32776    fi
32777  fi
32778
32779
32780  if test "x$VS_ENV_CMD" = x; then
32781    VS_VERSION="${VS_VERSION}"
32782    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32783    METHOD="well-known name"
32784
32785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32786      VCVARSFILE="vc/bin/vcvars32.bat"
32787    else
32788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32789    fi
32790
32791
32792  windows_path="$VS_BASE"
32793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32794    unix_path=`$CYGPATH -u "$windows_path"`
32795    VS_BASE="$unix_path"
32796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32798    VS_BASE="$unix_path"
32799  fi
32800
32801    if test -d "$VS_BASE"; then
32802      if test -f "$VS_BASE/$VCVARSFILE"; then
32803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32809      else
32810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32814      fi
32815    fi
32816  fi
32817
32818
32819  if test "x$SDK_INSTALL_DIR" != x; then
32820    if test "x$ProgramW6432" != x; then
32821
32822  if test "x$VS_ENV_CMD" = x; then
32823    VS_VERSION="${VS_VERSION}"
32824    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32825    METHOD="well-known name"
32826
32827  windows_path="$WIN_SDK_BASE"
32828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32829    unix_path=`$CYGPATH -u "$windows_path"`
32830    WIN_SDK_BASE="$unix_path"
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32833    WIN_SDK_BASE="$unix_path"
32834  fi
32835
32836    if test -d "$WIN_SDK_BASE"; then
32837      # There have been cases of partial or broken SDK installations. A missing
32838      # lib dir is not going to work.
32839      if test ! -d "$WIN_SDK_BASE/lib"; then
32840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32841$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32843$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32844      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32846$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32847        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32848        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32849          VS_ENV_ARGS="/x86"
32850        else
32851          VS_ENV_ARGS="/x64"
32852        fi
32853        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32854        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32855        # TODO: improve detection for other versions of SDK
32856        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32857      else
32858        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32859$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32860        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32861$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32862      fi
32863    fi
32864  fi
32865
32866    fi
32867    if test "x$PROGRAMW6432" != x; then
32868
32869  if test "x$VS_ENV_CMD" = x; then
32870    VS_VERSION="${VS_VERSION}"
32871    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32872    METHOD="well-known name"
32873
32874  windows_path="$WIN_SDK_BASE"
32875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32876    unix_path=`$CYGPATH -u "$windows_path"`
32877    WIN_SDK_BASE="$unix_path"
32878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32880    WIN_SDK_BASE="$unix_path"
32881  fi
32882
32883    if test -d "$WIN_SDK_BASE"; then
32884      # There have been cases of partial or broken SDK installations. A missing
32885      # lib dir is not going to work.
32886      if test ! -d "$WIN_SDK_BASE/lib"; then
32887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32890$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32891      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32895        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32896          VS_ENV_ARGS="/x86"
32897        else
32898          VS_ENV_ARGS="/x64"
32899        fi
32900        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32901        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32902        # TODO: improve detection for other versions of SDK
32903        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32904      else
32905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32906$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32907        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32908$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32909      fi
32910    fi
32911  fi
32912
32913    fi
32914    if test "x$PROGRAMFILES" != x; then
32915
32916  if test "x$VS_ENV_CMD" = x; then
32917    VS_VERSION="${VS_VERSION}"
32918    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32919    METHOD="well-known name"
32920
32921  windows_path="$WIN_SDK_BASE"
32922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32923    unix_path=`$CYGPATH -u "$windows_path"`
32924    WIN_SDK_BASE="$unix_path"
32925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32927    WIN_SDK_BASE="$unix_path"
32928  fi
32929
32930    if test -d "$WIN_SDK_BASE"; then
32931      # There have been cases of partial or broken SDK installations. A missing
32932      # lib dir is not going to work.
32933      if test ! -d "$WIN_SDK_BASE/lib"; then
32934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32937$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32938      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32941        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32942        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32943          VS_ENV_ARGS="/x86"
32944        else
32945          VS_ENV_ARGS="/x64"
32946        fi
32947        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32948        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32949        # TODO: improve detection for other versions of SDK
32950        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32951      else
32952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32953$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32955$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32956      fi
32957    fi
32958  fi
32959
32960    fi
32961
32962  if test "x$VS_ENV_CMD" = x; then
32963    VS_VERSION="${VS_VERSION}"
32964    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32965    METHOD="well-known name"
32966
32967  windows_path="$WIN_SDK_BASE"
32968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32969    unix_path=`$CYGPATH -u "$windows_path"`
32970    WIN_SDK_BASE="$unix_path"
32971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32973    WIN_SDK_BASE="$unix_path"
32974  fi
32975
32976    if test -d "$WIN_SDK_BASE"; then
32977      # There have been cases of partial or broken SDK installations. A missing
32978      # lib dir is not going to work.
32979      if test ! -d "$WIN_SDK_BASE/lib"; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32983$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32984      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32986$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32987        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32988        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32989          VS_ENV_ARGS="/x86"
32990        else
32991          VS_ENV_ARGS="/x64"
32992        fi
32993        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32994        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32995        # TODO: improve detection for other versions of SDK
32996        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32997      else
32998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33001$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33002      fi
33003    fi
33004  fi
33005
33006
33007  if test "x$VS_ENV_CMD" = x; then
33008    VS_VERSION="${VS_VERSION}"
33009    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
33010    METHOD="well-known name"
33011
33012  windows_path="$WIN_SDK_BASE"
33013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33014    unix_path=`$CYGPATH -u "$windows_path"`
33015    WIN_SDK_BASE="$unix_path"
33016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33018    WIN_SDK_BASE="$unix_path"
33019  fi
33020
33021    if test -d "$WIN_SDK_BASE"; then
33022      # There have been cases of partial or broken SDK installations. A missing
33023      # lib dir is not going to work.
33024      if test ! -d "$WIN_SDK_BASE/lib"; then
33025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33027        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33028$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33029      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33031$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33032        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33033        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33034          VS_ENV_ARGS="/x86"
33035        else
33036          VS_ENV_ARGS="/x64"
33037        fi
33038        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33039        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33040        # TODO: improve detection for other versions of SDK
33041        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33042      else
33043        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33044$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33045        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33046$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33047      fi
33048    fi
33049  fi
33050
33051  fi
33052
33053    if test "x$VS_ENV_CMD" != x; then
33054      TOOLCHAIN_VERSION=$VS_VERSION
33055      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
33056      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
33057      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
33058      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
33059      # The rest of the variables are already evaled while probing
33060      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
33061$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
33062      break
33063    fi
33064  done
33065
33066
33067  # If we have a devkit, skip all of the below.
33068  if test "x$DEVKIT_VS_VERSION" = x; then
33069    if test "x$VS_ENV_CMD" != x; then
33070      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33071
33072  # Only process if variable expands to non-empty
33073
33074  if test "x$VS_ENV_CMD" != x; then
33075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33076
33077  # First separate the path from the arguments. This will split at the first
33078  # space.
33079  complete="$VS_ENV_CMD"
33080  path="${complete%% *}"
33081  tmp="$complete EOL"
33082  arguments="${tmp#* }"
33083
33084  # Input might be given as Windows format, start by converting to
33085  # unix format.
33086  new_path=`$CYGPATH -u "$path"`
33087
33088  # Now try to locate executable using which
33089  new_path=`$WHICH "$new_path" 2> /dev/null`
33090  # bat and cmd files are not always considered executable in cygwin causing which
33091  # to not find them
33092  if test "x$new_path" = x \
33093      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33094      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33095    new_path=`$CYGPATH -u "$path"`
33096  fi
33097  if test "x$new_path" = x; then
33098    # Oops. Which didn't find the executable.
33099    # The splitting of arguments from the executable at a space might have been incorrect,
33100    # since paths with space are more likely in Windows. Give it another try with the whole
33101    # argument.
33102    path="$complete"
33103    arguments="EOL"
33104    new_path=`$CYGPATH -u "$path"`
33105    new_path=`$WHICH "$new_path" 2> /dev/null`
33106    # bat and cmd files are not always considered executable in cygwin causing which
33107    # to not find them
33108    if test "x$new_path" = x \
33109        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33110        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33111      new_path=`$CYGPATH -u "$path"`
33112    fi
33113    if test "x$new_path" = x; then
33114      # It's still not found. Now this is an unrecoverable error.
33115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33116$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33117      has_space=`$ECHO "$complete" | $GREP " "`
33118      if test "x$has_space" != x; then
33119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33121      fi
33122      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33123    fi
33124  fi
33125
33126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33129  # "foo.exe" is OK but "foo" is an error.
33130  #
33131  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33132  # It is also a way to make sure we got the proper file name for the real test later on.
33133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33134  if test "x$test_shortpath" = x; then
33135    # Short path failed, file does not exist as specified.
33136    # Try adding .exe or .cmd
33137    if test -f "${new_path}.exe"; then
33138      input_to_shortpath="${new_path}.exe"
33139    elif test -f "${new_path}.cmd"; then
33140      input_to_shortpath="${new_path}.cmd"
33141    else
33142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33143$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33144      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33145$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33146      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33147    fi
33148  else
33149    input_to_shortpath="$new_path"
33150  fi
33151
33152  # Call helper function which possibly converts this using DOS-style short mode.
33153  # If so, the updated path is stored in $new_path.
33154  new_path="$input_to_shortpath"
33155
33156  input_path="$input_to_shortpath"
33157  # Check if we need to convert this using DOS-style short mode. If the path
33158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33159  # take no chances and rewrite it.
33160  # Note: m4 eats our [], so we need to use [ and ] instead.
33161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33162  if test "x$has_forbidden_chars" != x; then
33163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33167      # Going to short mode and back again did indeed matter. Since short mode is
33168      # case insensitive, let's make it lowercase to improve readability.
33169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33170      # Now convert it back to Unix-style (cygpath)
33171      input_path=`$CYGPATH -u "$shortmode_path"`
33172      new_path="$input_path"
33173    fi
33174  fi
33175
33176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33177  if test "x$test_cygdrive_prefix" = x; then
33178    # As a simple fix, exclude /usr/bin since it's not a real path.
33179    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33181      # a path prefixed by /cygdrive for fixpath to work.
33182      new_path="$CYGWIN_ROOT_PATH$input_path"
33183    fi
33184  fi
33185
33186  # remove trailing .exe if any
33187  new_path="${new_path/%.exe/}"
33188
33189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33190
33191  # First separate the path from the arguments. This will split at the first
33192  # space.
33193  complete="$VS_ENV_CMD"
33194  path="${complete%% *}"
33195  tmp="$complete EOL"
33196  arguments="${tmp#* }"
33197
33198  # Input might be given as Windows format, start by converting to
33199  # unix format.
33200  new_path="$path"
33201
33202  windows_path="$new_path"
33203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33204    unix_path=`$CYGPATH -u "$windows_path"`
33205    new_path="$unix_path"
33206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33208    new_path="$unix_path"
33209  fi
33210
33211
33212  # Now try to locate executable using which
33213  new_path=`$WHICH "$new_path" 2> /dev/null`
33214
33215  if test "x$new_path" = x; then
33216    # Oops. Which didn't find the executable.
33217    # The splitting of arguments from the executable at a space might have been incorrect,
33218    # since paths with space are more likely in Windows. Give it another try with the whole
33219    # argument.
33220    path="$complete"
33221    arguments="EOL"
33222    new_path="$path"
33223
33224  windows_path="$new_path"
33225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33226    unix_path=`$CYGPATH -u "$windows_path"`
33227    new_path="$unix_path"
33228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33230    new_path="$unix_path"
33231  fi
33232
33233
33234    new_path=`$WHICH "$new_path" 2> /dev/null`
33235    # bat and cmd files are not always considered executable in MSYS causing which
33236    # to not find them
33237    if test "x$new_path" = x \
33238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33240      new_path="$path"
33241
33242  windows_path="$new_path"
33243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33244    unix_path=`$CYGPATH -u "$windows_path"`
33245    new_path="$unix_path"
33246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33248    new_path="$unix_path"
33249  fi
33250
33251    fi
33252
33253    if test "x$new_path" = x; then
33254      # It's still not found. Now this is an unrecoverable error.
33255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33256$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33257      has_space=`$ECHO "$complete" | $GREP " "`
33258      if test "x$has_space" != x; then
33259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33261      fi
33262      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33263    fi
33264  fi
33265
33266  # Now new_path has a complete unix path to the binary
33267  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33268    # Keep paths in /bin as-is, but remove trailing .exe if any
33269    new_path="${new_path/%.exe/}"
33270    # Do not save /bin paths to all_fixpath_prefixes!
33271  else
33272    # Not in mixed or Windows style, start by that.
33273    new_path=`cmd //c echo $new_path`
33274
33275  input_path="$new_path"
33276  # Check if we need to convert this using DOS-style short mode. If the path
33277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33278  # take no chances and rewrite it.
33279  # Note: m4 eats our [], so we need to use [ and ] instead.
33280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33281  if test "x$has_forbidden_chars" != x; then
33282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33284  fi
33285
33286    # Output is in $new_path
33287
33288  windows_path="$new_path"
33289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33290    unix_path=`$CYGPATH -u "$windows_path"`
33291    new_path="$unix_path"
33292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33294    new_path="$unix_path"
33295  fi
33296
33297    # remove trailing .exe if any
33298    new_path="${new_path/%.exe/}"
33299
33300    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33301    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33302  fi
33303
33304    else
33305      # We're on a unix platform. Hooray! :)
33306      # First separate the path from the arguments. This will split at the first
33307      # space.
33308      complete="$VS_ENV_CMD"
33309      path="${complete%% *}"
33310      tmp="$complete EOL"
33311      arguments="${tmp#* }"
33312
33313      # Cannot rely on the command "which" here since it doesn't always work.
33314      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33315      if test -z "$is_absolute_path"; then
33316        # Path to executable is not absolute. Find it.
33317        IFS_save="$IFS"
33318        IFS=:
33319        for p in $PATH; do
33320          if test -f "$p/$path" && test -x "$p/$path"; then
33321            new_path="$p/$path"
33322            break
33323          fi
33324        done
33325        IFS="$IFS_save"
33326      else
33327        # This is an absolute path, we can use it without further modifications.
33328        new_path="$path"
33329      fi
33330
33331      if test "x$new_path" = x; then
33332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33333$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33334        has_space=`$ECHO "$complete" | $GREP " "`
33335        if test "x$has_space" != x; then
33336          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33338        fi
33339        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33340      fi
33341    fi
33342
33343    # Now join together the path and the arguments once again
33344    if test "x$arguments" != xEOL; then
33345      new_complete="$new_path ${arguments% *}"
33346    else
33347      new_complete="$new_path"
33348    fi
33349
33350    if test "x$complete" != "x$new_complete"; then
33351      VS_ENV_CMD="$new_complete"
33352      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33353$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33354    fi
33355  fi
33356
33357
33358      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33359      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33360$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33361
33362      # We need to create a couple of temporary files.
33363      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33364      $MKDIR -p $VS_ENV_TMP_DIR
33365
33366      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33367      # Instead create a shell script which will set the relevant variables when run.
33368      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33369
33370  unix_path="$WINPATH_VS_ENV_CMD"
33371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33372    windows_path=`$CYGPATH -m "$unix_path"`
33373    WINPATH_VS_ENV_CMD="$windows_path"
33374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33375    windows_path=`cmd //c echo $unix_path`
33376    WINPATH_VS_ENV_CMD="$windows_path"
33377  fi
33378
33379      WINPATH_BASH="$BASH"
33380
33381  unix_path="$WINPATH_BASH"
33382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33383    windows_path=`$CYGPATH -m "$unix_path"`
33384    WINPATH_BASH="$windows_path"
33385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33386    windows_path=`cmd //c echo $unix_path`
33387    WINPATH_BASH="$windows_path"
33388  fi
33389
33390
33391      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33392      # script (executable by bash) that will setup the important variables.
33393      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33394      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33395      # This will end up something like:
33396      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33397      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33398      # These will end up something like:
33399      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33400      # The trailing space for everyone except PATH is no typo, but is needed due
33401      # to trailing \ in the Windows paths. These will be stripped later.
33402      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33403          >> $EXTRACT_VC_ENV_BAT_FILE
33404      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33405          >> $EXTRACT_VC_ENV_BAT_FILE
33406      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33407          >> $EXTRACT_VC_ENV_BAT_FILE
33408      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33409          >> $EXTRACT_VC_ENV_BAT_FILE
33410      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33411          >> $EXTRACT_VC_ENV_BAT_FILE
33412      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33413          >> $EXTRACT_VC_ENV_BAT_FILE
33414
33415      # Now execute the newly created bat file.
33416      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33417      # Change directory so we don't need to mess with Windows paths in redirects.
33418      cd $VS_ENV_TMP_DIR
33419      cmd /c extract-vs-env.bat | $CAT
33420      cd $CURDIR
33421
33422      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33423        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33424$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33425        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33426$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33427        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33428$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33429        as_fn_error $? "Cannot continue" "$LINENO" 5
33430      fi
33431
33432      # Now set all paths and other env variables. This will allow the rest of
33433      # the configure script to find and run the compiler in the proper way.
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33435$as_echo "$as_me: Setting extracted environment variables" >&6;}
33436      . $VS_ENV_TMP_DIR/set-vs-env.sh
33437      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33438      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33439    else
33440      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33441      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33442$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33443    fi
33444  fi
33445
33446  # At this point, we should have correct variables in the environment, or we can't continue.
33447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33448$as_echo_n "checking for Visual Studio variables... " >&6; }
33449
33450  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33451      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33452    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33454$as_echo "present but broken" >&6; }
33455      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33456    else
33457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33458$as_echo "ok" >&6; }
33459      # Remove any trailing "\" ";" and " " from the variables.
33460      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33461      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33462      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33463      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33464      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33465      # Remove any paths containing # (typically F#) as that messes up make. This
33466      # is needed if visual studio was installed with F# support.
33467      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33468
33469
33470
33471
33472
33473      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33474      OLDIFS="$IFS"
33475      IFS=";"
33476      for i in $VS_INCLUDE; do
33477        ipath=$i
33478        # Only process non-empty elements
33479        if test "x$ipath" != x; then
33480          IFS="$OLDIFS"
33481          # Check that directory exists before calling fixup_path
33482          testpath=$ipath
33483
33484  windows_path="$testpath"
33485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33486    unix_path=`$CYGPATH -u "$windows_path"`
33487    testpath="$unix_path"
33488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33490    testpath="$unix_path"
33491  fi
33492
33493          if test -d "$testpath"; then
33494
33495  # Only process if variable expands to non-empty
33496
33497  if test "x$ipath" != x; then
33498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33499
33500  # Input might be given as Windows format, start by converting to
33501  # unix format.
33502  path="$ipath"
33503  new_path=`$CYGPATH -u "$path"`
33504
33505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33508  # "foo.exe" is OK but "foo" is an error.
33509  #
33510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33511  # It is also a way to make sure we got the proper file name for the real test later on.
33512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33513  if test "x$test_shortpath" = x; then
33514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33515$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33516    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33517  fi
33518
33519  # Call helper function which possibly converts this using DOS-style short mode.
33520  # If so, the updated path is stored in $new_path.
33521
33522  input_path="$new_path"
33523  # Check if we need to convert this using DOS-style short mode. If the path
33524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33525  # take no chances and rewrite it.
33526  # Note: m4 eats our [], so we need to use [ and ] instead.
33527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33528  if test "x$has_forbidden_chars" != x; then
33529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33533      # Going to short mode and back again did indeed matter. Since short mode is
33534      # case insensitive, let's make it lowercase to improve readability.
33535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33536      # Now convert it back to Unix-style (cygpath)
33537      input_path=`$CYGPATH -u "$shortmode_path"`
33538      new_path="$input_path"
33539    fi
33540  fi
33541
33542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33543  if test "x$test_cygdrive_prefix" = x; then
33544    # As a simple fix, exclude /usr/bin since it's not a real path.
33545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33547      # a path prefixed by /cygdrive for fixpath to work.
33548      new_path="$CYGWIN_ROOT_PATH$input_path"
33549    fi
33550  fi
33551
33552
33553  if test "x$path" != "x$new_path"; then
33554    ipath="$new_path"
33555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33556$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33557  fi
33558
33559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33560
33561  path="$ipath"
33562  has_colon=`$ECHO $path | $GREP ^.:`
33563  new_path="$path"
33564  if test "x$has_colon" = x; then
33565    # Not in mixed or Windows style, start by that.
33566    new_path=`cmd //c echo $path`
33567  fi
33568
33569
33570  input_path="$new_path"
33571  # Check if we need to convert this using DOS-style short mode. If the path
33572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33573  # take no chances and rewrite it.
33574  # Note: m4 eats our [], so we need to use [ and ] instead.
33575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33576  if test "x$has_forbidden_chars" != x; then
33577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33579  fi
33580
33581
33582  windows_path="$new_path"
33583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584    unix_path=`$CYGPATH -u "$windows_path"`
33585    new_path="$unix_path"
33586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33588    new_path="$unix_path"
33589  fi
33590
33591  if test "x$path" != "x$new_path"; then
33592    ipath="$new_path"
33593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33594$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33595  fi
33596
33597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33599
33600    else
33601      # We're on a unix platform. Hooray! :)
33602      path="$ipath"
33603      has_space=`$ECHO "$path" | $GREP " "`
33604      if test "x$has_space" != x; then
33605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33606$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33608      fi
33609
33610      # Use eval to expand a potential ~
33611      eval path="$path"
33612      if test ! -f "$path" && test ! -d "$path"; then
33613        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33614      fi
33615
33616      if test -d "$path"; then
33617        ipath="`cd "$path"; $THEPWDCMD -L`"
33618      else
33619        dir="`$DIRNAME "$path"`"
33620        base="`$BASENAME "$path"`"
33621        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33622      fi
33623    fi
33624  fi
33625
33626            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33627          fi
33628          IFS=";"
33629        fi
33630      done
33631      # Convert VS_LIB into SYSROOT_LDFLAGS
33632      for i in $VS_LIB; do
33633        libpath=$i
33634        # Only process non-empty elements
33635        if test "x$libpath" != x; then
33636          IFS="$OLDIFS"
33637          # Check that directory exists before calling fixup_path
33638          testpath=$libpath
33639
33640  windows_path="$testpath"
33641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33642    unix_path=`$CYGPATH -u "$windows_path"`
33643    testpath="$unix_path"
33644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33646    testpath="$unix_path"
33647  fi
33648
33649          if test -d "$testpath"; then
33650
33651  # Only process if variable expands to non-empty
33652
33653  if test "x$libpath" != x; then
33654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655
33656  # Input might be given as Windows format, start by converting to
33657  # unix format.
33658  path="$libpath"
33659  new_path=`$CYGPATH -u "$path"`
33660
33661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33664  # "foo.exe" is OK but "foo" is an error.
33665  #
33666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33667  # It is also a way to make sure we got the proper file name for the real test later on.
33668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33669  if test "x$test_shortpath" = x; then
33670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33671$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33672    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33673  fi
33674
33675  # Call helper function which possibly converts this using DOS-style short mode.
33676  # If so, the updated path is stored in $new_path.
33677
33678  input_path="$new_path"
33679  # Check if we need to convert this using DOS-style short mode. If the path
33680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33681  # take no chances and rewrite it.
33682  # Note: m4 eats our [], so we need to use [ and ] instead.
33683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33684  if test "x$has_forbidden_chars" != x; then
33685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33689      # Going to short mode and back again did indeed matter. Since short mode is
33690      # case insensitive, let's make it lowercase to improve readability.
33691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33692      # Now convert it back to Unix-style (cygpath)
33693      input_path=`$CYGPATH -u "$shortmode_path"`
33694      new_path="$input_path"
33695    fi
33696  fi
33697
33698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33699  if test "x$test_cygdrive_prefix" = x; then
33700    # As a simple fix, exclude /usr/bin since it's not a real path.
33701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33703      # a path prefixed by /cygdrive for fixpath to work.
33704      new_path="$CYGWIN_ROOT_PATH$input_path"
33705    fi
33706  fi
33707
33708
33709  if test "x$path" != "x$new_path"; then
33710    libpath="$new_path"
33711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33712$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33713  fi
33714
33715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33716
33717  path="$libpath"
33718  has_colon=`$ECHO $path | $GREP ^.:`
33719  new_path="$path"
33720  if test "x$has_colon" = x; then
33721    # Not in mixed or Windows style, start by that.
33722    new_path=`cmd //c echo $path`
33723  fi
33724
33725
33726  input_path="$new_path"
33727  # Check if we need to convert this using DOS-style short mode. If the path
33728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33729  # take no chances and rewrite it.
33730  # Note: m4 eats our [], so we need to use [ and ] instead.
33731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33732  if test "x$has_forbidden_chars" != x; then
33733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33735  fi
33736
33737
33738  windows_path="$new_path"
33739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33740    unix_path=`$CYGPATH -u "$windows_path"`
33741    new_path="$unix_path"
33742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33744    new_path="$unix_path"
33745  fi
33746
33747  if test "x$path" != "x$new_path"; then
33748    libpath="$new_path"
33749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33750$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33751  fi
33752
33753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33755
33756    else
33757      # We're on a unix platform. Hooray! :)
33758      path="$libpath"
33759      has_space=`$ECHO "$path" | $GREP " "`
33760      if test "x$has_space" != x; then
33761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33762$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33764      fi
33765
33766      # Use eval to expand a potential ~
33767      eval path="$path"
33768      if test ! -f "$path" && test ! -d "$path"; then
33769        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33770      fi
33771
33772      if test -d "$path"; then
33773        libpath="`cd "$path"; $THEPWDCMD -L`"
33774      else
33775        dir="`$DIRNAME "$path"`"
33776        base="`$BASENAME "$path"`"
33777        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33778      fi
33779    fi
33780  fi
33781
33782            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33783          fi
33784          IFS=";"
33785        fi
33786      done
33787      IFS="$OLDIFS"
33788    fi
33789  else
33790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33791$as_echo "not found" >&6; }
33792
33793    if test "x$VS_ENV_CMD" = x; then
33794      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33795$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33796      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33797$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33798    else
33799      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33800$as_echo "$as_me: Running the extraction script failed." >&6;}
33801    fi
33802    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33803$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33804    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33805$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33806    as_fn_error $? "Cannot continue" "$LINENO" 5
33807  fi
33808
33809    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33810    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33811    PATH="$VS_PATH"
33812    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33813    export INCLUDE="$VS_INCLUDE"
33814    export LIB="$VS_LIB"
33815  else
33816    if test "x$XCODE_VERSION_OUTPUT" != x; then
33817      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33818      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33819      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33820    else
33821      # Currently we do not define this for other toolchains. This might change as the need arise.
33822      TOOLCHAIN_VERSION=
33823    fi
33824  fi
33825
33826
33827  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33828  # override all other locations.
33829  if test "x$TOOLCHAIN_PATH" != x; then
33830    PATH=$TOOLCHAIN_PATH:$PATH
33831  fi
33832
33833
33834  #
33835  # Setup the compilers (CC and CXX)
33836  #
33837
33838  COMPILER_NAME=C
33839  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33840
33841  if test "x$CC" != x; then
33842    # User has supplied compiler name already, always let that override.
33843    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33844$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33845    if test "x`basename $CC`" = "x$CC"; then
33846      # A command without a complete path is provided, search $PATH.
33847
33848      for ac_prog in $CC
33849do
33850  # Extract the first word of "$ac_prog", so it can be a program name with args.
33851set dummy $ac_prog; ac_word=$2
33852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33853$as_echo_n "checking for $ac_word... " >&6; }
33854if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33855  $as_echo_n "(cached) " >&6
33856else
33857  case $POTENTIAL_CC in
33858  [\\/]* | ?:[\\/]*)
33859  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33860  ;;
33861  *)
33862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33863for as_dir in $PATH
33864do
33865  IFS=$as_save_IFS
33866  test -z "$as_dir" && as_dir=.
33867    for ac_exec_ext in '' $ac_executable_extensions; do
33868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33869    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33871    break 2
33872  fi
33873done
33874  done
33875IFS=$as_save_IFS
33876
33877  ;;
33878esac
33879fi
33880POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33881if test -n "$POTENTIAL_CC"; then
33882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33883$as_echo "$POTENTIAL_CC" >&6; }
33884else
33885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33886$as_echo "no" >&6; }
33887fi
33888
33889
33890  test -n "$POTENTIAL_CC" && break
33891done
33892
33893      if test "x$POTENTIAL_CC" != x; then
33894        CC=$POTENTIAL_CC
33895      else
33896        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33897      fi
33898    else
33899      # Otherwise it might already be a complete path
33900      if test ! -x "$CC"; then
33901        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33902      fi
33903    fi
33904  else
33905    # No user supplied value. Locate compiler ourselves.
33906
33907    # If we are cross compiling, assume cross compilation tools follows the
33908    # cross compilation standard where they are prefixed with the autoconf
33909    # standard name for the target. For example the binary
33910    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33911    # If we are not cross compiling, then the default compiler name will be
33912    # used.
33913
33914    CC=
33915    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33916    # before checking the rest of the PATH.
33917    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33918    # step, this should not be necessary.
33919    if test -n "$TOOLCHAIN_PATH"; then
33920      PATH_save="$PATH"
33921      PATH="$TOOLCHAIN_PATH"
33922      if test -n "$ac_tool_prefix"; then
33923  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33924set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33926$as_echo_n "checking for $ac_word... " >&6; }
33927if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33928  $as_echo_n "(cached) " >&6
33929else
33930  case $TOOLCHAIN_PATH_CC in
33931  [\\/]* | ?:[\\/]*)
33932  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33933  ;;
33934  *)
33935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33936for as_dir in $PATH
33937do
33938  IFS=$as_save_IFS
33939  test -z "$as_dir" && as_dir=.
33940    for ac_exec_ext in '' $ac_executable_extensions; do
33941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33942    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33944    break 2
33945  fi
33946done
33947  done
33948IFS=$as_save_IFS
33949
33950  ;;
33951esac
33952fi
33953TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33954if test -n "$TOOLCHAIN_PATH_CC"; then
33955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33956$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33957else
33958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33959$as_echo "no" >&6; }
33960fi
33961
33962
33963fi
33964if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33965  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33966  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33967set dummy $SEARCH_LIST; ac_word=$2
33968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33969$as_echo_n "checking for $ac_word... " >&6; }
33970if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33971  $as_echo_n "(cached) " >&6
33972else
33973  case $ac_pt_TOOLCHAIN_PATH_CC in
33974  [\\/]* | ?:[\\/]*)
33975  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33976  ;;
33977  *)
33978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33979for as_dir in $PATH
33980do
33981  IFS=$as_save_IFS
33982  test -z "$as_dir" && as_dir=.
33983    for ac_exec_ext in '' $ac_executable_extensions; do
33984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33985    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33987    break 2
33988  fi
33989done
33990  done
33991IFS=$as_save_IFS
33992
33993  ;;
33994esac
33995fi
33996ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33997if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33999$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
34000else
34001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34002$as_echo "no" >&6; }
34003fi
34004
34005  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
34006    TOOLCHAIN_PATH_CC=""
34007  else
34008    case $cross_compiling:$ac_tool_warned in
34009yes:)
34010{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34011$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34012ac_tool_warned=yes ;;
34013esac
34014    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
34015  fi
34016else
34017  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
34018fi
34019
34020      CC=$TOOLCHAIN_PATH_CC
34021      PATH="$PATH_save"
34022    fi
34023
34024    # AC_PATH_TOOL can't be run multiple times with the same variable,
34025    # so create a new name for this run.
34026    if test "x$CC" = x; then
34027      if test -n "$ac_tool_prefix"; then
34028  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34029set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34031$as_echo_n "checking for $ac_word... " >&6; }
34032if ${ac_cv_path_POTENTIAL_CC+:} false; then :
34033  $as_echo_n "(cached) " >&6
34034else
34035  case $POTENTIAL_CC in
34036  [\\/]* | ?:[\\/]*)
34037  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
34038  ;;
34039  *)
34040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34041for as_dir in $PATH
34042do
34043  IFS=$as_save_IFS
34044  test -z "$as_dir" && as_dir=.
34045    for ac_exec_ext in '' $ac_executable_extensions; do
34046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34047    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34049    break 2
34050  fi
34051done
34052  done
34053IFS=$as_save_IFS
34054
34055  ;;
34056esac
34057fi
34058POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
34059if test -n "$POTENTIAL_CC"; then
34060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
34061$as_echo "$POTENTIAL_CC" >&6; }
34062else
34063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34064$as_echo "no" >&6; }
34065fi
34066
34067
34068fi
34069if test -z "$ac_cv_path_POTENTIAL_CC"; then
34070  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34071  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34072set dummy $SEARCH_LIST; ac_word=$2
34073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34074$as_echo_n "checking for $ac_word... " >&6; }
34075if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34076  $as_echo_n "(cached) " >&6
34077else
34078  case $ac_pt_POTENTIAL_CC in
34079  [\\/]* | ?:[\\/]*)
34080  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34081  ;;
34082  *)
34083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34084for as_dir in $PATH
34085do
34086  IFS=$as_save_IFS
34087  test -z "$as_dir" && as_dir=.
34088    for ac_exec_ext in '' $ac_executable_extensions; do
34089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34090    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34092    break 2
34093  fi
34094done
34095  done
34096IFS=$as_save_IFS
34097
34098  ;;
34099esac
34100fi
34101ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34102if test -n "$ac_pt_POTENTIAL_CC"; then
34103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34104$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34105else
34106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34107$as_echo "no" >&6; }
34108fi
34109
34110  if test "x$ac_pt_POTENTIAL_CC" = x; then
34111    POTENTIAL_CC=""
34112  else
34113    case $cross_compiling:$ac_tool_warned in
34114yes:)
34115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34117ac_tool_warned=yes ;;
34118esac
34119    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34120  fi
34121else
34122  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34123fi
34124
34125      CC=$POTENTIAL_CC
34126    fi
34127
34128    if test "x$CC" = x; then
34129
34130  # Print a helpful message on how to acquire the necessary build dependency.
34131  # devkit is the help tag: freetype, cups, alsa etc
34132  MISSING_DEPENDENCY=devkit
34133
34134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34135    cygwin_help $MISSING_DEPENDENCY
34136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34137    msys_help $MISSING_DEPENDENCY
34138  else
34139    PKGHANDLER_COMMAND=
34140
34141    case $PKGHANDLER in
34142      apt-get)
34143        apt_help     $MISSING_DEPENDENCY ;;
34144      yum)
34145        yum_help     $MISSING_DEPENDENCY ;;
34146      brew)
34147        brew_help    $MISSING_DEPENDENCY ;;
34148      port)
34149        port_help    $MISSING_DEPENDENCY ;;
34150      pkgutil)
34151        pkgutil_help $MISSING_DEPENDENCY ;;
34152      pkgadd)
34153        pkgadd_help  $MISSING_DEPENDENCY ;;
34154    esac
34155
34156    if test "x$PKGHANDLER_COMMAND" != x; then
34157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34158    fi
34159  fi
34160
34161      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34162    fi
34163  fi
34164
34165  # Now we have a compiler binary in CC. Make sure it's okay.
34166
34167  # Only process if variable expands to non-empty
34168
34169  if test "x$CC" != x; then
34170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34171
34172  # First separate the path from the arguments. This will split at the first
34173  # space.
34174  complete="$CC"
34175  path="${complete%% *}"
34176  tmp="$complete EOL"
34177  arguments="${tmp#* }"
34178
34179  # Input might be given as Windows format, start by converting to
34180  # unix format.
34181  new_path=`$CYGPATH -u "$path"`
34182
34183  # Now try to locate executable using which
34184  new_path=`$WHICH "$new_path" 2> /dev/null`
34185  # bat and cmd files are not always considered executable in cygwin causing which
34186  # to not find them
34187  if test "x$new_path" = x \
34188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34190    new_path=`$CYGPATH -u "$path"`
34191  fi
34192  if test "x$new_path" = x; then
34193    # Oops. Which didn't find the executable.
34194    # The splitting of arguments from the executable at a space might have been incorrect,
34195    # since paths with space are more likely in Windows. Give it another try with the whole
34196    # argument.
34197    path="$complete"
34198    arguments="EOL"
34199    new_path=`$CYGPATH -u "$path"`
34200    new_path=`$WHICH "$new_path" 2> /dev/null`
34201    # bat and cmd files are not always considered executable in cygwin causing which
34202    # to not find them
34203    if test "x$new_path" = x \
34204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34206      new_path=`$CYGPATH -u "$path"`
34207    fi
34208    if test "x$new_path" = x; then
34209      # It's still not found. Now this is an unrecoverable error.
34210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34211$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34212      has_space=`$ECHO "$complete" | $GREP " "`
34213      if test "x$has_space" != x; then
34214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34216      fi
34217      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34218    fi
34219  fi
34220
34221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34224  # "foo.exe" is OK but "foo" is an error.
34225  #
34226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34227  # It is also a way to make sure we got the proper file name for the real test later on.
34228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34229  if test "x$test_shortpath" = x; then
34230    # Short path failed, file does not exist as specified.
34231    # Try adding .exe or .cmd
34232    if test -f "${new_path}.exe"; then
34233      input_to_shortpath="${new_path}.exe"
34234    elif test -f "${new_path}.cmd"; then
34235      input_to_shortpath="${new_path}.cmd"
34236    else
34237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34238$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34241      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34242    fi
34243  else
34244    input_to_shortpath="$new_path"
34245  fi
34246
34247  # Call helper function which possibly converts this using DOS-style short mode.
34248  # If so, the updated path is stored in $new_path.
34249  new_path="$input_to_shortpath"
34250
34251  input_path="$input_to_shortpath"
34252  # Check if we need to convert this using DOS-style short mode. If the path
34253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34254  # take no chances and rewrite it.
34255  # Note: m4 eats our [], so we need to use [ and ] instead.
34256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34257  if test "x$has_forbidden_chars" != x; then
34258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34262      # Going to short mode and back again did indeed matter. Since short mode is
34263      # case insensitive, let's make it lowercase to improve readability.
34264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34265      # Now convert it back to Unix-style (cygpath)
34266      input_path=`$CYGPATH -u "$shortmode_path"`
34267      new_path="$input_path"
34268    fi
34269  fi
34270
34271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34272  if test "x$test_cygdrive_prefix" = x; then
34273    # As a simple fix, exclude /usr/bin since it's not a real path.
34274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34276      # a path prefixed by /cygdrive for fixpath to work.
34277      new_path="$CYGWIN_ROOT_PATH$input_path"
34278    fi
34279  fi
34280
34281  # remove trailing .exe if any
34282  new_path="${new_path/%.exe/}"
34283
34284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34285
34286  # First separate the path from the arguments. This will split at the first
34287  # space.
34288  complete="$CC"
34289  path="${complete%% *}"
34290  tmp="$complete EOL"
34291  arguments="${tmp#* }"
34292
34293  # Input might be given as Windows format, start by converting to
34294  # unix format.
34295  new_path="$path"
34296
34297  windows_path="$new_path"
34298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34299    unix_path=`$CYGPATH -u "$windows_path"`
34300    new_path="$unix_path"
34301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34303    new_path="$unix_path"
34304  fi
34305
34306
34307  # Now try to locate executable using which
34308  new_path=`$WHICH "$new_path" 2> /dev/null`
34309
34310  if test "x$new_path" = x; then
34311    # Oops. Which didn't find the executable.
34312    # The splitting of arguments from the executable at a space might have been incorrect,
34313    # since paths with space are more likely in Windows. Give it another try with the whole
34314    # argument.
34315    path="$complete"
34316    arguments="EOL"
34317    new_path="$path"
34318
34319  windows_path="$new_path"
34320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34321    unix_path=`$CYGPATH -u "$windows_path"`
34322    new_path="$unix_path"
34323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34325    new_path="$unix_path"
34326  fi
34327
34328
34329    new_path=`$WHICH "$new_path" 2> /dev/null`
34330    # bat and cmd files are not always considered executable in MSYS causing which
34331    # to not find them
34332    if test "x$new_path" = x \
34333        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34334        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34335      new_path="$path"
34336
34337  windows_path="$new_path"
34338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34339    unix_path=`$CYGPATH -u "$windows_path"`
34340    new_path="$unix_path"
34341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34343    new_path="$unix_path"
34344  fi
34345
34346    fi
34347
34348    if test "x$new_path" = x; then
34349      # It's still not found. Now this is an unrecoverable error.
34350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34351$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34352      has_space=`$ECHO "$complete" | $GREP " "`
34353      if test "x$has_space" != x; then
34354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34356      fi
34357      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34358    fi
34359  fi
34360
34361  # Now new_path has a complete unix path to the binary
34362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34363    # Keep paths in /bin as-is, but remove trailing .exe if any
34364    new_path="${new_path/%.exe/}"
34365    # Do not save /bin paths to all_fixpath_prefixes!
34366  else
34367    # Not in mixed or Windows style, start by that.
34368    new_path=`cmd //c echo $new_path`
34369
34370  input_path="$new_path"
34371  # Check if we need to convert this using DOS-style short mode. If the path
34372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34373  # take no chances and rewrite it.
34374  # Note: m4 eats our [], so we need to use [ and ] instead.
34375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34376  if test "x$has_forbidden_chars" != x; then
34377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34379  fi
34380
34381    # Output is in $new_path
34382
34383  windows_path="$new_path"
34384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34385    unix_path=`$CYGPATH -u "$windows_path"`
34386    new_path="$unix_path"
34387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34389    new_path="$unix_path"
34390  fi
34391
34392    # remove trailing .exe if any
34393    new_path="${new_path/%.exe/}"
34394
34395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34397  fi
34398
34399    else
34400      # We're on a unix platform. Hooray! :)
34401      # First separate the path from the arguments. This will split at the first
34402      # space.
34403      complete="$CC"
34404      path="${complete%% *}"
34405      tmp="$complete EOL"
34406      arguments="${tmp#* }"
34407
34408      # Cannot rely on the command "which" here since it doesn't always work.
34409      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34410      if test -z "$is_absolute_path"; then
34411        # Path to executable is not absolute. Find it.
34412        IFS_save="$IFS"
34413        IFS=:
34414        for p in $PATH; do
34415          if test -f "$p/$path" && test -x "$p/$path"; then
34416            new_path="$p/$path"
34417            break
34418          fi
34419        done
34420        IFS="$IFS_save"
34421      else
34422        # This is an absolute path, we can use it without further modifications.
34423        new_path="$path"
34424      fi
34425
34426      if test "x$new_path" = x; then
34427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34428$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34429        has_space=`$ECHO "$complete" | $GREP " "`
34430        if test "x$has_space" != x; then
34431          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34432$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34433        fi
34434        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34435      fi
34436    fi
34437
34438    # Now join together the path and the arguments once again
34439    if test "x$arguments" != xEOL; then
34440      new_complete="$new_path ${arguments% *}"
34441    else
34442      new_complete="$new_path"
34443    fi
34444
34445    if test "x$complete" != "x$new_complete"; then
34446      CC="$new_complete"
34447      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34448$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34449    fi
34450  fi
34451
34452  TEST_COMPILER="$CC"
34453
34454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34455$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34456  SYMLINK_ORIGINAL="$TEST_COMPILER"
34457
34458  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34459    # Follow a chain of symbolic links. Use readlink
34460    # where it exists, else fall back to horribly
34461    # complicated shell code.
34462    if test "x$READLINK_TESTED" != yes; then
34463      # On MacOSX there is a readlink tool with a different
34464      # purpose than the GNU readlink tool. Check the found readlink.
34465      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34466      if test "x$ISGNU" = x; then
34467        # A readlink that we do not know how to use.
34468        # Are there other non-GNU readlinks out there?
34469        READLINK_TESTED=yes
34470        READLINK=
34471      fi
34472    fi
34473
34474    if test "x$READLINK" != x; then
34475      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34476    else
34477      # Save the current directory for restoring afterwards
34478      STARTDIR=$PWD
34479      COUNTER=0
34480      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34481      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34482      cd $sym_link_dir
34483      # Use -P flag to resolve symlinks in directories.
34484      cd `$THEPWDCMD -P`
34485      sym_link_dir=`$THEPWDCMD -P`
34486      # Resolve file symlinks
34487      while test $COUNTER -lt 20; do
34488        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34489        if test "x$ISLINK" == x; then
34490          # This is not a symbolic link! We are done!
34491          break
34492        fi
34493        # Again resolve directory symlinks since the target of the just found
34494        # link could be in a different directory
34495        cd `$DIRNAME $ISLINK`
34496        sym_link_dir=`$THEPWDCMD -P`
34497        sym_link_file=`$BASENAME $ISLINK`
34498        let COUNTER=COUNTER+1
34499      done
34500      cd $STARTDIR
34501      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34502    fi
34503  fi
34504
34505  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34507$as_echo "no symlink" >&6; }
34508  else
34509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34510$as_echo "$SYMLINK_ORIGINAL" >&6; }
34511
34512    # We can't handle ccache by gcc wrappers, since we need to know if we're
34513    # using ccache. Instead ccache usage must be controlled by a configure option.
34514    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34515    if test "x$COMPILER_BASENAME" = "xccache"; then
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34517$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34518      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34519    fi
34520  fi
34521
34522
34523  COMPILER=$CC
34524  COMPILER_NAME=$COMPILER_NAME
34525
34526  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34527    # cc -V output typically looks like
34528    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34529    # or
34530    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34531    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34532    # Check that this is likely to be the Solaris Studio cc.
34533    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34534    if test $? -ne 0; then
34535      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34536      { $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
34537$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34538      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34539$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34540      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34541$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34542      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34543    fi
34544    # Remove usage instructions (if present), and
34545    # collapse compiler output into a single line
34546    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34547        $SED -e 's/ *[Uu]sage:.*//'`
34548    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34549        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34550  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34551    # xlc -qversion output typically looks like
34552    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34553    #     Version: 11.01.0000.0015
34554    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34555    # Check that this is likely to be the IBM XL C compiler.
34556    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34557    if test $? -ne 0; then
34558      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34559      { $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
34560$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34561      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34562$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34564$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34565      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34566    fi
34567    # Collapse compiler output into a single line
34568    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34569    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34570        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34571  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34572    # There is no specific version flag, but all output starts with a version string.
34573    # First line typically looks something like:
34574    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34575    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34576    # Check that this is likely to be Microsoft CL.EXE.
34577    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34578    if test $? -ne 0; then
34579      { $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
34580$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34581      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34582$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34583      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34584    fi
34585    # Collapse compiler output into a single line
34586    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34587    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34588        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34589  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34590    # gcc --version output typically looks like
34591    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34592    #     Copyright (C) 2013 Free Software Foundation, Inc.
34593    #     This is free software; see the source for copying conditions.  There is NO
34594    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34595    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34596    # Check that this is likely to be GCC.
34597    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34598    if test $? -ne 0; then
34599      { $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
34600$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34601      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34602$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34603      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34604    fi
34605    # Remove Copyright and legalese from version string, and
34606    # collapse into a single line
34607    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34608        $SED -e 's/ *Copyright .*//'`
34609    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34610        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34611  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34612    # clang --version output typically looks like
34613    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34614    #    clang version 3.3 (tags/RELEASE_33/final)
34615    # or
34616    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34617    #    Target: x86_64-pc-linux-gnu
34618    #    Thread model: posix
34619    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34620    # Check that this is likely to be clang
34621    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34622    if test $? -ne 0; then
34623      { $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
34624$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34626$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34628    fi
34629    # Collapse compiler output into a single line
34630    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34631    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34632        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34633  else
34634      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34635  fi
34636  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34637  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34638  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34639  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34640
34641  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34642$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34643
34644
34645  # Now that we have resolved CC ourself, let autoconf have its go at it
34646  ac_ext=c
34647ac_cpp='$CPP $CPPFLAGS'
34648ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34649ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34650ac_compiler_gnu=$ac_cv_c_compiler_gnu
34651if test -n "$ac_tool_prefix"; then
34652  for ac_prog in $CC
34653  do
34654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34657$as_echo_n "checking for $ac_word... " >&6; }
34658if ${ac_cv_prog_CC+:} false; then :
34659  $as_echo_n "(cached) " >&6
34660else
34661  if test -n "$CC"; then
34662  ac_cv_prog_CC="$CC" # Let the user override the test.
34663else
34664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34665for as_dir in $PATH
34666do
34667  IFS=$as_save_IFS
34668  test -z "$as_dir" && as_dir=.
34669    for ac_exec_ext in '' $ac_executable_extensions; do
34670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34671    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34673    break 2
34674  fi
34675done
34676  done
34677IFS=$as_save_IFS
34678
34679fi
34680fi
34681CC=$ac_cv_prog_CC
34682if test -n "$CC"; then
34683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34684$as_echo "$CC" >&6; }
34685else
34686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34687$as_echo "no" >&6; }
34688fi
34689
34690
34691    test -n "$CC" && break
34692  done
34693fi
34694if test -z "$CC"; then
34695  ac_ct_CC=$CC
34696  for ac_prog in $CC
34697do
34698  # Extract the first word of "$ac_prog", so it can be a program name with args.
34699set dummy $ac_prog; ac_word=$2
34700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34701$as_echo_n "checking for $ac_word... " >&6; }
34702if ${ac_cv_prog_ac_ct_CC+:} false; then :
34703  $as_echo_n "(cached) " >&6
34704else
34705  if test -n "$ac_ct_CC"; then
34706  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34707else
34708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34709for as_dir in $PATH
34710do
34711  IFS=$as_save_IFS
34712  test -z "$as_dir" && as_dir=.
34713    for ac_exec_ext in '' $ac_executable_extensions; do
34714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34715    ac_cv_prog_ac_ct_CC="$ac_prog"
34716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34717    break 2
34718  fi
34719done
34720  done
34721IFS=$as_save_IFS
34722
34723fi
34724fi
34725ac_ct_CC=$ac_cv_prog_ac_ct_CC
34726if test -n "$ac_ct_CC"; then
34727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34728$as_echo "$ac_ct_CC" >&6; }
34729else
34730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34731$as_echo "no" >&6; }
34732fi
34733
34734
34735  test -n "$ac_ct_CC" && break
34736done
34737
34738  if test "x$ac_ct_CC" = x; then
34739    CC=""
34740  else
34741    case $cross_compiling:$ac_tool_warned in
34742yes:)
34743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34745ac_tool_warned=yes ;;
34746esac
34747    CC=$ac_ct_CC
34748  fi
34749fi
34750
34751
34752test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34754as_fn_error $? "no acceptable C compiler found in \$PATH
34755See \`config.log' for more details" "$LINENO" 5; }
34756
34757# Provide some information about the compiler.
34758$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34759set X $ac_compile
34760ac_compiler=$2
34761for ac_option in --version -v -V -qversion; do
34762  { { ac_try="$ac_compiler $ac_option >&5"
34763case "(($ac_try" in
34764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34765  *) ac_try_echo=$ac_try;;
34766esac
34767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34768$as_echo "$ac_try_echo"; } >&5
34769  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34770  ac_status=$?
34771  if test -s conftest.err; then
34772    sed '10a\
34773... rest of stderr output deleted ...
34774         10q' conftest.err >conftest.er1
34775    cat conftest.er1 >&5
34776  fi
34777  rm -f conftest.er1 conftest.err
34778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34779  test $ac_status = 0; }
34780done
34781
34782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34783/* end confdefs.h.  */
34784
34785int
34786main ()
34787{
34788
34789  ;
34790  return 0;
34791}
34792_ACEOF
34793ac_clean_files_save=$ac_clean_files
34794ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34795# Try to create an executable without -o first, disregard a.out.
34796# It will help us diagnose broken compilers, and finding out an intuition
34797# of exeext.
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34799$as_echo_n "checking whether the C compiler works... " >&6; }
34800ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34801
34802# The possible output files:
34803ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34804
34805ac_rmfiles=
34806for ac_file in $ac_files
34807do
34808  case $ac_file in
34809    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34810    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34811  esac
34812done
34813rm -f $ac_rmfiles
34814
34815if { { ac_try="$ac_link_default"
34816case "(($ac_try" in
34817  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34818  *) ac_try_echo=$ac_try;;
34819esac
34820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34821$as_echo "$ac_try_echo"; } >&5
34822  (eval "$ac_link_default") 2>&5
34823  ac_status=$?
34824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34825  test $ac_status = 0; }; then :
34826  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34827# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34828# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34829# so that the user can short-circuit this test for compilers unknown to
34830# Autoconf.
34831for ac_file in $ac_files ''
34832do
34833  test -f "$ac_file" || continue
34834  case $ac_file in
34835    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34836	;;
34837    [ab].out )
34838	# We found the default executable, but exeext='' is most
34839	# certainly right.
34840	break;;
34841    *.* )
34842	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34843	then :; else
34844	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34845	fi
34846	# We set ac_cv_exeext here because the later test for it is not
34847	# safe: cross compilers may not add the suffix if given an `-o'
34848	# argument, so we may need to know it at that point already.
34849	# Even if this section looks crufty: it has the advantage of
34850	# actually working.
34851	break;;
34852    * )
34853	break;;
34854  esac
34855done
34856test "$ac_cv_exeext" = no && ac_cv_exeext=
34857
34858else
34859  ac_file=''
34860fi
34861if test -z "$ac_file"; then :
34862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34863$as_echo "no" >&6; }
34864$as_echo "$as_me: failed program was:" >&5
34865sed 's/^/| /' conftest.$ac_ext >&5
34866
34867{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34869as_fn_error 77 "C compiler cannot create executables
34870See \`config.log' for more details" "$LINENO" 5; }
34871else
34872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34873$as_echo "yes" >&6; }
34874fi
34875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34876$as_echo_n "checking for C compiler default output file name... " >&6; }
34877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34878$as_echo "$ac_file" >&6; }
34879ac_exeext=$ac_cv_exeext
34880
34881rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34882ac_clean_files=$ac_clean_files_save
34883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34884$as_echo_n "checking for suffix of executables... " >&6; }
34885if { { ac_try="$ac_link"
34886case "(($ac_try" in
34887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34888  *) ac_try_echo=$ac_try;;
34889esac
34890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34891$as_echo "$ac_try_echo"; } >&5
34892  (eval "$ac_link") 2>&5
34893  ac_status=$?
34894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34895  test $ac_status = 0; }; then :
34896  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34897# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34898# work properly (i.e., refer to `conftest.exe'), while it won't with
34899# `rm'.
34900for ac_file in conftest.exe conftest conftest.*; do
34901  test -f "$ac_file" || continue
34902  case $ac_file in
34903    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34904    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34905	  break;;
34906    * ) break;;
34907  esac
34908done
34909else
34910  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34912as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34913See \`config.log' for more details" "$LINENO" 5; }
34914fi
34915rm -f conftest conftest$ac_cv_exeext
34916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34917$as_echo "$ac_cv_exeext" >&6; }
34918
34919rm -f conftest.$ac_ext
34920EXEEXT=$ac_cv_exeext
34921ac_exeext=$EXEEXT
34922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34923/* end confdefs.h.  */
34924#include <stdio.h>
34925int
34926main ()
34927{
34928FILE *f = fopen ("conftest.out", "w");
34929 return ferror (f) || fclose (f) != 0;
34930
34931  ;
34932  return 0;
34933}
34934_ACEOF
34935ac_clean_files="$ac_clean_files conftest.out"
34936# Check that the compiler produces executables we can run.  If not, either
34937# the compiler is broken, or we cross compile.
34938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34939$as_echo_n "checking whether we are cross compiling... " >&6; }
34940if test "$cross_compiling" != yes; then
34941  { { ac_try="$ac_link"
34942case "(($ac_try" in
34943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34944  *) ac_try_echo=$ac_try;;
34945esac
34946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34947$as_echo "$ac_try_echo"; } >&5
34948  (eval "$ac_link") 2>&5
34949  ac_status=$?
34950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34951  test $ac_status = 0; }
34952  if { ac_try='./conftest$ac_cv_exeext'
34953  { { case "(($ac_try" in
34954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34955  *) ac_try_echo=$ac_try;;
34956esac
34957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34958$as_echo "$ac_try_echo"; } >&5
34959  (eval "$ac_try") 2>&5
34960  ac_status=$?
34961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34962  test $ac_status = 0; }; }; then
34963    cross_compiling=no
34964  else
34965    if test "$cross_compiling" = maybe; then
34966	cross_compiling=yes
34967    else
34968	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34970as_fn_error $? "cannot run C compiled programs.
34971If you meant to cross compile, use \`--host'.
34972See \`config.log' for more details" "$LINENO" 5; }
34973    fi
34974  fi
34975fi
34976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34977$as_echo "$cross_compiling" >&6; }
34978
34979rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34980ac_clean_files=$ac_clean_files_save
34981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34982$as_echo_n "checking for suffix of object files... " >&6; }
34983if ${ac_cv_objext+:} false; then :
34984  $as_echo_n "(cached) " >&6
34985else
34986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34987/* end confdefs.h.  */
34988
34989int
34990main ()
34991{
34992
34993  ;
34994  return 0;
34995}
34996_ACEOF
34997rm -f conftest.o conftest.obj
34998if { { ac_try="$ac_compile"
34999case "(($ac_try" in
35000  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35001  *) ac_try_echo=$ac_try;;
35002esac
35003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35004$as_echo "$ac_try_echo"; } >&5
35005  (eval "$ac_compile") 2>&5
35006  ac_status=$?
35007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35008  test $ac_status = 0; }; then :
35009  for ac_file in conftest.o conftest.obj conftest.*; do
35010  test -f "$ac_file" || continue;
35011  case $ac_file in
35012    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
35013    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
35014       break;;
35015  esac
35016done
35017else
35018  $as_echo "$as_me: failed program was:" >&5
35019sed 's/^/| /' conftest.$ac_ext >&5
35020
35021{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35023as_fn_error $? "cannot compute suffix of object files: cannot compile
35024See \`config.log' for more details" "$LINENO" 5; }
35025fi
35026rm -f conftest.$ac_cv_objext conftest.$ac_ext
35027fi
35028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
35029$as_echo "$ac_cv_objext" >&6; }
35030OBJEXT=$ac_cv_objext
35031ac_objext=$OBJEXT
35032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
35033$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
35034if ${ac_cv_c_compiler_gnu+:} false; then :
35035  $as_echo_n "(cached) " >&6
35036else
35037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35038/* end confdefs.h.  */
35039
35040int
35041main ()
35042{
35043#ifndef __GNUC__
35044       choke me
35045#endif
35046
35047  ;
35048  return 0;
35049}
35050_ACEOF
35051if ac_fn_c_try_compile "$LINENO"; then :
35052  ac_compiler_gnu=yes
35053else
35054  ac_compiler_gnu=no
35055fi
35056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35057ac_cv_c_compiler_gnu=$ac_compiler_gnu
35058
35059fi
35060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
35061$as_echo "$ac_cv_c_compiler_gnu" >&6; }
35062if test $ac_compiler_gnu = yes; then
35063  GCC=yes
35064else
35065  GCC=
35066fi
35067ac_test_CFLAGS=${CFLAGS+set}
35068ac_save_CFLAGS=$CFLAGS
35069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35070$as_echo_n "checking whether $CC accepts -g... " >&6; }
35071if ${ac_cv_prog_cc_g+:} false; then :
35072  $as_echo_n "(cached) " >&6
35073else
35074  ac_save_c_werror_flag=$ac_c_werror_flag
35075   ac_c_werror_flag=yes
35076   ac_cv_prog_cc_g=no
35077   CFLAGS="-g"
35078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35079/* end confdefs.h.  */
35080
35081int
35082main ()
35083{
35084
35085  ;
35086  return 0;
35087}
35088_ACEOF
35089if ac_fn_c_try_compile "$LINENO"; then :
35090  ac_cv_prog_cc_g=yes
35091else
35092  CFLAGS=""
35093      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35094/* end confdefs.h.  */
35095
35096int
35097main ()
35098{
35099
35100  ;
35101  return 0;
35102}
35103_ACEOF
35104if ac_fn_c_try_compile "$LINENO"; then :
35105
35106else
35107  ac_c_werror_flag=$ac_save_c_werror_flag
35108	 CFLAGS="-g"
35109	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35110/* end confdefs.h.  */
35111
35112int
35113main ()
35114{
35115
35116  ;
35117  return 0;
35118}
35119_ACEOF
35120if ac_fn_c_try_compile "$LINENO"; then :
35121  ac_cv_prog_cc_g=yes
35122fi
35123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35124fi
35125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35126fi
35127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35128   ac_c_werror_flag=$ac_save_c_werror_flag
35129fi
35130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35131$as_echo "$ac_cv_prog_cc_g" >&6; }
35132if test "$ac_test_CFLAGS" = set; then
35133  CFLAGS=$ac_save_CFLAGS
35134elif test $ac_cv_prog_cc_g = yes; then
35135  if test "$GCC" = yes; then
35136    CFLAGS="-g -O2"
35137  else
35138    CFLAGS="-g"
35139  fi
35140else
35141  if test "$GCC" = yes; then
35142    CFLAGS="-O2"
35143  else
35144    CFLAGS=
35145  fi
35146fi
35147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35148$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35149if ${ac_cv_prog_cc_c89+:} false; then :
35150  $as_echo_n "(cached) " >&6
35151else
35152  ac_cv_prog_cc_c89=no
35153ac_save_CC=$CC
35154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35155/* end confdefs.h.  */
35156#include <stdarg.h>
35157#include <stdio.h>
35158struct stat;
35159/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35160struct buf { int x; };
35161FILE * (*rcsopen) (struct buf *, struct stat *, int);
35162static char *e (p, i)
35163     char **p;
35164     int i;
35165{
35166  return p[i];
35167}
35168static char *f (char * (*g) (char **, int), char **p, ...)
35169{
35170  char *s;
35171  va_list v;
35172  va_start (v,p);
35173  s = g (p, va_arg (v,int));
35174  va_end (v);
35175  return s;
35176}
35177
35178/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35179   function prototypes and stuff, but not '\xHH' hex character constants.
35180   These don't provoke an error unfortunately, instead are silently treated
35181   as 'x'.  The following induces an error, until -std is added to get
35182   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35183   array size at least.  It's necessary to write '\x00'==0 to get something
35184   that's true only with -std.  */
35185int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35186
35187/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35188   inside strings and character constants.  */
35189#define FOO(x) 'x'
35190int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35191
35192int test (int i, double x);
35193struct s1 {int (*f) (int a);};
35194struct s2 {int (*f) (double a);};
35195int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35196int argc;
35197char **argv;
35198int
35199main ()
35200{
35201return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35202  ;
35203  return 0;
35204}
35205_ACEOF
35206for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35207	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35208do
35209  CC="$ac_save_CC $ac_arg"
35210  if ac_fn_c_try_compile "$LINENO"; then :
35211  ac_cv_prog_cc_c89=$ac_arg
35212fi
35213rm -f core conftest.err conftest.$ac_objext
35214  test "x$ac_cv_prog_cc_c89" != "xno" && break
35215done
35216rm -f conftest.$ac_ext
35217CC=$ac_save_CC
35218
35219fi
35220# AC_CACHE_VAL
35221case "x$ac_cv_prog_cc_c89" in
35222  x)
35223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35224$as_echo "none needed" >&6; } ;;
35225  xno)
35226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35227$as_echo "unsupported" >&6; } ;;
35228  *)
35229    CC="$CC $ac_cv_prog_cc_c89"
35230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35231$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35232esac
35233if test "x$ac_cv_prog_cc_c89" != xno; then :
35234
35235fi
35236
35237ac_ext=cpp
35238ac_cpp='$CXXCPP $CPPFLAGS'
35239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35242
35243
35244
35245  COMPILER_NAME=C++
35246  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35247
35248  if test "x$CXX" != x; then
35249    # User has supplied compiler name already, always let that override.
35250    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35251$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35252    if test "x`basename $CXX`" = "x$CXX"; then
35253      # A command without a complete path is provided, search $PATH.
35254
35255      for ac_prog in $CXX
35256do
35257  # Extract the first word of "$ac_prog", so it can be a program name with args.
35258set dummy $ac_prog; ac_word=$2
35259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35260$as_echo_n "checking for $ac_word... " >&6; }
35261if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35262  $as_echo_n "(cached) " >&6
35263else
35264  case $POTENTIAL_CXX in
35265  [\\/]* | ?:[\\/]*)
35266  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35267  ;;
35268  *)
35269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35270for as_dir in $PATH
35271do
35272  IFS=$as_save_IFS
35273  test -z "$as_dir" && as_dir=.
35274    for ac_exec_ext in '' $ac_executable_extensions; do
35275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35276    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35278    break 2
35279  fi
35280done
35281  done
35282IFS=$as_save_IFS
35283
35284  ;;
35285esac
35286fi
35287POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35288if test -n "$POTENTIAL_CXX"; then
35289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35290$as_echo "$POTENTIAL_CXX" >&6; }
35291else
35292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35293$as_echo "no" >&6; }
35294fi
35295
35296
35297  test -n "$POTENTIAL_CXX" && break
35298done
35299
35300      if test "x$POTENTIAL_CXX" != x; then
35301        CXX=$POTENTIAL_CXX
35302      else
35303        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35304      fi
35305    else
35306      # Otherwise it might already be a complete path
35307      if test ! -x "$CXX"; then
35308        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35309      fi
35310    fi
35311  else
35312    # No user supplied value. Locate compiler ourselves.
35313
35314    # If we are cross compiling, assume cross compilation tools follows the
35315    # cross compilation standard where they are prefixed with the autoconf
35316    # standard name for the target. For example the binary
35317    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35318    # If we are not cross compiling, then the default compiler name will be
35319    # used.
35320
35321    CXX=
35322    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35323    # before checking the rest of the PATH.
35324    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35325    # step, this should not be necessary.
35326    if test -n "$TOOLCHAIN_PATH"; then
35327      PATH_save="$PATH"
35328      PATH="$TOOLCHAIN_PATH"
35329      if test -n "$ac_tool_prefix"; then
35330  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35331set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35333$as_echo_n "checking for $ac_word... " >&6; }
35334if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35335  $as_echo_n "(cached) " >&6
35336else
35337  case $TOOLCHAIN_PATH_CXX in
35338  [\\/]* | ?:[\\/]*)
35339  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35340  ;;
35341  *)
35342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35343for as_dir in $PATH
35344do
35345  IFS=$as_save_IFS
35346  test -z "$as_dir" && as_dir=.
35347    for ac_exec_ext in '' $ac_executable_extensions; do
35348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35349    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35351    break 2
35352  fi
35353done
35354  done
35355IFS=$as_save_IFS
35356
35357  ;;
35358esac
35359fi
35360TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35361if test -n "$TOOLCHAIN_PATH_CXX"; then
35362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35363$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35364else
35365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35366$as_echo "no" >&6; }
35367fi
35368
35369
35370fi
35371if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35372  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35373  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35374set dummy $SEARCH_LIST; ac_word=$2
35375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35376$as_echo_n "checking for $ac_word... " >&6; }
35377if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35378  $as_echo_n "(cached) " >&6
35379else
35380  case $ac_pt_TOOLCHAIN_PATH_CXX in
35381  [\\/]* | ?:[\\/]*)
35382  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35383  ;;
35384  *)
35385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35386for as_dir in $PATH
35387do
35388  IFS=$as_save_IFS
35389  test -z "$as_dir" && as_dir=.
35390    for ac_exec_ext in '' $ac_executable_extensions; do
35391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35392    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35394    break 2
35395  fi
35396done
35397  done
35398IFS=$as_save_IFS
35399
35400  ;;
35401esac
35402fi
35403ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35404if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35406$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35407else
35408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35409$as_echo "no" >&6; }
35410fi
35411
35412  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35413    TOOLCHAIN_PATH_CXX=""
35414  else
35415    case $cross_compiling:$ac_tool_warned in
35416yes:)
35417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35419ac_tool_warned=yes ;;
35420esac
35421    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35422  fi
35423else
35424  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35425fi
35426
35427      CXX=$TOOLCHAIN_PATH_CXX
35428      PATH="$PATH_save"
35429    fi
35430
35431    # AC_PATH_TOOL can't be run multiple times with the same variable,
35432    # so create a new name for this run.
35433    if test "x$CXX" = x; then
35434      if test -n "$ac_tool_prefix"; then
35435  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35436set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35438$as_echo_n "checking for $ac_word... " >&6; }
35439if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35440  $as_echo_n "(cached) " >&6
35441else
35442  case $POTENTIAL_CXX in
35443  [\\/]* | ?:[\\/]*)
35444  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35445  ;;
35446  *)
35447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35448for as_dir in $PATH
35449do
35450  IFS=$as_save_IFS
35451  test -z "$as_dir" && as_dir=.
35452    for ac_exec_ext in '' $ac_executable_extensions; do
35453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35454    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35456    break 2
35457  fi
35458done
35459  done
35460IFS=$as_save_IFS
35461
35462  ;;
35463esac
35464fi
35465POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35466if test -n "$POTENTIAL_CXX"; then
35467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35468$as_echo "$POTENTIAL_CXX" >&6; }
35469else
35470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35471$as_echo "no" >&6; }
35472fi
35473
35474
35475fi
35476if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35477  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35478  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35479set dummy $SEARCH_LIST; ac_word=$2
35480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35481$as_echo_n "checking for $ac_word... " >&6; }
35482if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35483  $as_echo_n "(cached) " >&6
35484else
35485  case $ac_pt_POTENTIAL_CXX in
35486  [\\/]* | ?:[\\/]*)
35487  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35488  ;;
35489  *)
35490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35491for as_dir in $PATH
35492do
35493  IFS=$as_save_IFS
35494  test -z "$as_dir" && as_dir=.
35495    for ac_exec_ext in '' $ac_executable_extensions; do
35496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35497    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35499    break 2
35500  fi
35501done
35502  done
35503IFS=$as_save_IFS
35504
35505  ;;
35506esac
35507fi
35508ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35509if test -n "$ac_pt_POTENTIAL_CXX"; then
35510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35511$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35512else
35513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35514$as_echo "no" >&6; }
35515fi
35516
35517  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35518    POTENTIAL_CXX=""
35519  else
35520    case $cross_compiling:$ac_tool_warned in
35521yes:)
35522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35524ac_tool_warned=yes ;;
35525esac
35526    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35527  fi
35528else
35529  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35530fi
35531
35532      CXX=$POTENTIAL_CXX
35533    fi
35534
35535    if test "x$CXX" = x; then
35536
35537  # Print a helpful message on how to acquire the necessary build dependency.
35538  # devkit is the help tag: freetype, cups, alsa etc
35539  MISSING_DEPENDENCY=devkit
35540
35541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35542    cygwin_help $MISSING_DEPENDENCY
35543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35544    msys_help $MISSING_DEPENDENCY
35545  else
35546    PKGHANDLER_COMMAND=
35547
35548    case $PKGHANDLER in
35549      apt-get)
35550        apt_help     $MISSING_DEPENDENCY ;;
35551      yum)
35552        yum_help     $MISSING_DEPENDENCY ;;
35553      brew)
35554        brew_help    $MISSING_DEPENDENCY ;;
35555      port)
35556        port_help    $MISSING_DEPENDENCY ;;
35557      pkgutil)
35558        pkgutil_help $MISSING_DEPENDENCY ;;
35559      pkgadd)
35560        pkgadd_help  $MISSING_DEPENDENCY ;;
35561    esac
35562
35563    if test "x$PKGHANDLER_COMMAND" != x; then
35564      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35565    fi
35566  fi
35567
35568      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35569    fi
35570  fi
35571
35572  # Now we have a compiler binary in CXX. Make sure it's okay.
35573
35574  # Only process if variable expands to non-empty
35575
35576  if test "x$CXX" != x; then
35577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35578
35579  # First separate the path from the arguments. This will split at the first
35580  # space.
35581  complete="$CXX"
35582  path="${complete%% *}"
35583  tmp="$complete EOL"
35584  arguments="${tmp#* }"
35585
35586  # Input might be given as Windows format, start by converting to
35587  # unix format.
35588  new_path=`$CYGPATH -u "$path"`
35589
35590  # Now try to locate executable using which
35591  new_path=`$WHICH "$new_path" 2> /dev/null`
35592  # bat and cmd files are not always considered executable in cygwin causing which
35593  # to not find them
35594  if test "x$new_path" = x \
35595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35597    new_path=`$CYGPATH -u "$path"`
35598  fi
35599  if test "x$new_path" = x; then
35600    # Oops. Which didn't find the executable.
35601    # The splitting of arguments from the executable at a space might have been incorrect,
35602    # since paths with space are more likely in Windows. Give it another try with the whole
35603    # argument.
35604    path="$complete"
35605    arguments="EOL"
35606    new_path=`$CYGPATH -u "$path"`
35607    new_path=`$WHICH "$new_path" 2> /dev/null`
35608    # bat and cmd files are not always considered executable in cygwin causing which
35609    # to not find them
35610    if test "x$new_path" = x \
35611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35613      new_path=`$CYGPATH -u "$path"`
35614    fi
35615    if test "x$new_path" = x; then
35616      # It's still not found. Now this is an unrecoverable error.
35617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35618$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35619      has_space=`$ECHO "$complete" | $GREP " "`
35620      if test "x$has_space" != x; then
35621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35623      fi
35624      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35625    fi
35626  fi
35627
35628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35631  # "foo.exe" is OK but "foo" is an error.
35632  #
35633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35634  # It is also a way to make sure we got the proper file name for the real test later on.
35635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35636  if test "x$test_shortpath" = x; then
35637    # Short path failed, file does not exist as specified.
35638    # Try adding .exe or .cmd
35639    if test -f "${new_path}.exe"; then
35640      input_to_shortpath="${new_path}.exe"
35641    elif test -f "${new_path}.cmd"; then
35642      input_to_shortpath="${new_path}.cmd"
35643    else
35644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35645$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35648      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35649    fi
35650  else
35651    input_to_shortpath="$new_path"
35652  fi
35653
35654  # Call helper function which possibly converts this using DOS-style short mode.
35655  # If so, the updated path is stored in $new_path.
35656  new_path="$input_to_shortpath"
35657
35658  input_path="$input_to_shortpath"
35659  # Check if we need to convert this using DOS-style short mode. If the path
35660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35661  # take no chances and rewrite it.
35662  # Note: m4 eats our [], so we need to use [ and ] instead.
35663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35664  if test "x$has_forbidden_chars" != x; then
35665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35669      # Going to short mode and back again did indeed matter. Since short mode is
35670      # case insensitive, let's make it lowercase to improve readability.
35671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35672      # Now convert it back to Unix-style (cygpath)
35673      input_path=`$CYGPATH -u "$shortmode_path"`
35674      new_path="$input_path"
35675    fi
35676  fi
35677
35678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35679  if test "x$test_cygdrive_prefix" = x; then
35680    # As a simple fix, exclude /usr/bin since it's not a real path.
35681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35683      # a path prefixed by /cygdrive for fixpath to work.
35684      new_path="$CYGWIN_ROOT_PATH$input_path"
35685    fi
35686  fi
35687
35688  # remove trailing .exe if any
35689  new_path="${new_path/%.exe/}"
35690
35691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35692
35693  # First separate the path from the arguments. This will split at the first
35694  # space.
35695  complete="$CXX"
35696  path="${complete%% *}"
35697  tmp="$complete EOL"
35698  arguments="${tmp#* }"
35699
35700  # Input might be given as Windows format, start by converting to
35701  # unix format.
35702  new_path="$path"
35703
35704  windows_path="$new_path"
35705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35706    unix_path=`$CYGPATH -u "$windows_path"`
35707    new_path="$unix_path"
35708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35710    new_path="$unix_path"
35711  fi
35712
35713
35714  # Now try to locate executable using which
35715  new_path=`$WHICH "$new_path" 2> /dev/null`
35716
35717  if test "x$new_path" = x; then
35718    # Oops. Which didn't find the executable.
35719    # The splitting of arguments from the executable at a space might have been incorrect,
35720    # since paths with space are more likely in Windows. Give it another try with the whole
35721    # argument.
35722    path="$complete"
35723    arguments="EOL"
35724    new_path="$path"
35725
35726  windows_path="$new_path"
35727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35728    unix_path=`$CYGPATH -u "$windows_path"`
35729    new_path="$unix_path"
35730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35732    new_path="$unix_path"
35733  fi
35734
35735
35736    new_path=`$WHICH "$new_path" 2> /dev/null`
35737    # bat and cmd files are not always considered executable in MSYS causing which
35738    # to not find them
35739    if test "x$new_path" = x \
35740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35742      new_path="$path"
35743
35744  windows_path="$new_path"
35745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35746    unix_path=`$CYGPATH -u "$windows_path"`
35747    new_path="$unix_path"
35748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35750    new_path="$unix_path"
35751  fi
35752
35753    fi
35754
35755    if test "x$new_path" = x; then
35756      # It's still not found. Now this is an unrecoverable error.
35757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35758$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35759      has_space=`$ECHO "$complete" | $GREP " "`
35760      if test "x$has_space" != x; then
35761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35763      fi
35764      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35765    fi
35766  fi
35767
35768  # Now new_path has a complete unix path to the binary
35769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35770    # Keep paths in /bin as-is, but remove trailing .exe if any
35771    new_path="${new_path/%.exe/}"
35772    # Do not save /bin paths to all_fixpath_prefixes!
35773  else
35774    # Not in mixed or Windows style, start by that.
35775    new_path=`cmd //c echo $new_path`
35776
35777  input_path="$new_path"
35778  # Check if we need to convert this using DOS-style short mode. If the path
35779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35780  # take no chances and rewrite it.
35781  # Note: m4 eats our [], so we need to use [ and ] instead.
35782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35783  if test "x$has_forbidden_chars" != x; then
35784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35786  fi
35787
35788    # Output is in $new_path
35789
35790  windows_path="$new_path"
35791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35792    unix_path=`$CYGPATH -u "$windows_path"`
35793    new_path="$unix_path"
35794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35796    new_path="$unix_path"
35797  fi
35798
35799    # remove trailing .exe if any
35800    new_path="${new_path/%.exe/}"
35801
35802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35804  fi
35805
35806    else
35807      # We're on a unix platform. Hooray! :)
35808      # First separate the path from the arguments. This will split at the first
35809      # space.
35810      complete="$CXX"
35811      path="${complete%% *}"
35812      tmp="$complete EOL"
35813      arguments="${tmp#* }"
35814
35815      # Cannot rely on the command "which" here since it doesn't always work.
35816      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35817      if test -z "$is_absolute_path"; then
35818        # Path to executable is not absolute. Find it.
35819        IFS_save="$IFS"
35820        IFS=:
35821        for p in $PATH; do
35822          if test -f "$p/$path" && test -x "$p/$path"; then
35823            new_path="$p/$path"
35824            break
35825          fi
35826        done
35827        IFS="$IFS_save"
35828      else
35829        # This is an absolute path, we can use it without further modifications.
35830        new_path="$path"
35831      fi
35832
35833      if test "x$new_path" = x; then
35834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35835$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35836        has_space=`$ECHO "$complete" | $GREP " "`
35837        if test "x$has_space" != x; then
35838          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35840        fi
35841        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35842      fi
35843    fi
35844
35845    # Now join together the path and the arguments once again
35846    if test "x$arguments" != xEOL; then
35847      new_complete="$new_path ${arguments% *}"
35848    else
35849      new_complete="$new_path"
35850    fi
35851
35852    if test "x$complete" != "x$new_complete"; then
35853      CXX="$new_complete"
35854      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35855$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35856    fi
35857  fi
35858
35859  TEST_COMPILER="$CXX"
35860
35861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35862$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35863  SYMLINK_ORIGINAL="$TEST_COMPILER"
35864
35865  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35866    # Follow a chain of symbolic links. Use readlink
35867    # where it exists, else fall back to horribly
35868    # complicated shell code.
35869    if test "x$READLINK_TESTED" != yes; then
35870      # On MacOSX there is a readlink tool with a different
35871      # purpose than the GNU readlink tool. Check the found readlink.
35872      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35873      if test "x$ISGNU" = x; then
35874        # A readlink that we do not know how to use.
35875        # Are there other non-GNU readlinks out there?
35876        READLINK_TESTED=yes
35877        READLINK=
35878      fi
35879    fi
35880
35881    if test "x$READLINK" != x; then
35882      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35883    else
35884      # Save the current directory for restoring afterwards
35885      STARTDIR=$PWD
35886      COUNTER=0
35887      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35888      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35889      cd $sym_link_dir
35890      # Use -P flag to resolve symlinks in directories.
35891      cd `$THEPWDCMD -P`
35892      sym_link_dir=`$THEPWDCMD -P`
35893      # Resolve file symlinks
35894      while test $COUNTER -lt 20; do
35895        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35896        if test "x$ISLINK" == x; then
35897          # This is not a symbolic link! We are done!
35898          break
35899        fi
35900        # Again resolve directory symlinks since the target of the just found
35901        # link could be in a different directory
35902        cd `$DIRNAME $ISLINK`
35903        sym_link_dir=`$THEPWDCMD -P`
35904        sym_link_file=`$BASENAME $ISLINK`
35905        let COUNTER=COUNTER+1
35906      done
35907      cd $STARTDIR
35908      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35909    fi
35910  fi
35911
35912  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35914$as_echo "no symlink" >&6; }
35915  else
35916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35917$as_echo "$SYMLINK_ORIGINAL" >&6; }
35918
35919    # We can't handle ccache by gcc wrappers, since we need to know if we're
35920    # using ccache. Instead ccache usage must be controlled by a configure option.
35921    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35922    if test "x$COMPILER_BASENAME" = "xccache"; then
35923      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35924$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35925      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35926    fi
35927  fi
35928
35929
35930  COMPILER=$CXX
35931  COMPILER_NAME=$COMPILER_NAME
35932
35933  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35934    # cc -V output typically looks like
35935    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35936    # or
35937    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35938    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35939    # Check that this is likely to be the Solaris Studio cc.
35940    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35941    if test $? -ne 0; then
35942      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35943      { $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
35944$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35945      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35946$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35947      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35948$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35949      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35950    fi
35951    # Remove usage instructions (if present), and
35952    # collapse compiler output into a single line
35953    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35954        $SED -e 's/ *[Uu]sage:.*//'`
35955    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35956        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35957  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35958    # xlc -qversion output typically looks like
35959    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35960    #     Version: 11.01.0000.0015
35961    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35962    # Check that this is likely to be the IBM XL C compiler.
35963    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35964    if test $? -ne 0; then
35965      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35966      { $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
35967$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35969$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35971$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35973    fi
35974    # Collapse compiler output into a single line
35975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35977        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35978  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35979    # There is no specific version flag, but all output starts with a version string.
35980    # First line typically looks something like:
35981    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35982    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35983    # Check that this is likely to be Microsoft CL.EXE.
35984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35985    if test $? -ne 0; then
35986      { $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
35987$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35988      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35989$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35990      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35991    fi
35992    # Collapse compiler output into a single line
35993    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35994    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35995        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35996  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35997    # gcc --version output typically looks like
35998    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35999    #     Copyright (C) 2013 Free Software Foundation, Inc.
36000    #     This is free software; see the source for copying conditions.  There is NO
36001    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36002    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36003    # Check that this is likely to be GCC.
36004    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
36005    if test $? -ne 0; then
36006      { $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
36007$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
36009$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
36010      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36011    fi
36012    # Remove Copyright and legalese from version string, and
36013    # collapse into a single line
36014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
36015        $SED -e 's/ *Copyright .*//'`
36016    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36017        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
36018  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
36019    # clang --version output typically looks like
36020    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
36021    #    clang version 3.3 (tags/RELEASE_33/final)
36022    # or
36023    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
36024    #    Target: x86_64-pc-linux-gnu
36025    #    Thread model: posix
36026    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36027    # Check that this is likely to be clang
36028    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
36029    if test $? -ne 0; then
36030      { $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
36031$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36032      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36033$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36034      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36035    fi
36036    # Collapse compiler output into a single line
36037    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36038    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36039        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
36040  else
36041      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
36042  fi
36043  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
36044  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
36045  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
36046  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
36047
36048  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
36049$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
36050
36051
36052  # Now that we have resolved CXX ourself, let autoconf have its go at it
36053  ac_ext=cpp
36054ac_cpp='$CXXCPP $CPPFLAGS'
36055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36058if test -z "$CXX"; then
36059  if test -n "$CCC"; then
36060    CXX=$CCC
36061  else
36062    if test -n "$ac_tool_prefix"; then
36063  for ac_prog in $CXX
36064  do
36065    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36068$as_echo_n "checking for $ac_word... " >&6; }
36069if ${ac_cv_prog_CXX+:} false; then :
36070  $as_echo_n "(cached) " >&6
36071else
36072  if test -n "$CXX"; then
36073  ac_cv_prog_CXX="$CXX" # Let the user override the test.
36074else
36075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36076for as_dir in $PATH
36077do
36078  IFS=$as_save_IFS
36079  test -z "$as_dir" && as_dir=.
36080    for ac_exec_ext in '' $ac_executable_extensions; do
36081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36082    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36084    break 2
36085  fi
36086done
36087  done
36088IFS=$as_save_IFS
36089
36090fi
36091fi
36092CXX=$ac_cv_prog_CXX
36093if test -n "$CXX"; then
36094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36095$as_echo "$CXX" >&6; }
36096else
36097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36098$as_echo "no" >&6; }
36099fi
36100
36101
36102    test -n "$CXX" && break
36103  done
36104fi
36105if test -z "$CXX"; then
36106  ac_ct_CXX=$CXX
36107  for ac_prog in $CXX
36108do
36109  # Extract the first word of "$ac_prog", so it can be a program name with args.
36110set dummy $ac_prog; ac_word=$2
36111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36112$as_echo_n "checking for $ac_word... " >&6; }
36113if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36114  $as_echo_n "(cached) " >&6
36115else
36116  if test -n "$ac_ct_CXX"; then
36117  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36118else
36119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36120for as_dir in $PATH
36121do
36122  IFS=$as_save_IFS
36123  test -z "$as_dir" && as_dir=.
36124    for ac_exec_ext in '' $ac_executable_extensions; do
36125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36126    ac_cv_prog_ac_ct_CXX="$ac_prog"
36127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36128    break 2
36129  fi
36130done
36131  done
36132IFS=$as_save_IFS
36133
36134fi
36135fi
36136ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36137if test -n "$ac_ct_CXX"; then
36138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36139$as_echo "$ac_ct_CXX" >&6; }
36140else
36141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36142$as_echo "no" >&6; }
36143fi
36144
36145
36146  test -n "$ac_ct_CXX" && break
36147done
36148
36149  if test "x$ac_ct_CXX" = x; then
36150    CXX="g++"
36151  else
36152    case $cross_compiling:$ac_tool_warned in
36153yes:)
36154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36156ac_tool_warned=yes ;;
36157esac
36158    CXX=$ac_ct_CXX
36159  fi
36160fi
36161
36162  fi
36163fi
36164# Provide some information about the compiler.
36165$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36166set X $ac_compile
36167ac_compiler=$2
36168for ac_option in --version -v -V -qversion; do
36169  { { ac_try="$ac_compiler $ac_option >&5"
36170case "(($ac_try" in
36171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36172  *) ac_try_echo=$ac_try;;
36173esac
36174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36175$as_echo "$ac_try_echo"; } >&5
36176  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36177  ac_status=$?
36178  if test -s conftest.err; then
36179    sed '10a\
36180... rest of stderr output deleted ...
36181         10q' conftest.err >conftest.er1
36182    cat conftest.er1 >&5
36183  fi
36184  rm -f conftest.er1 conftest.err
36185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36186  test $ac_status = 0; }
36187done
36188
36189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36190$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36191if ${ac_cv_cxx_compiler_gnu+:} false; then :
36192  $as_echo_n "(cached) " >&6
36193else
36194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36195/* end confdefs.h.  */
36196
36197int
36198main ()
36199{
36200#ifndef __GNUC__
36201       choke me
36202#endif
36203
36204  ;
36205  return 0;
36206}
36207_ACEOF
36208if ac_fn_cxx_try_compile "$LINENO"; then :
36209  ac_compiler_gnu=yes
36210else
36211  ac_compiler_gnu=no
36212fi
36213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36214ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36215
36216fi
36217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36218$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36219if test $ac_compiler_gnu = yes; then
36220  GXX=yes
36221else
36222  GXX=
36223fi
36224ac_test_CXXFLAGS=${CXXFLAGS+set}
36225ac_save_CXXFLAGS=$CXXFLAGS
36226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36227$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36228if ${ac_cv_prog_cxx_g+:} false; then :
36229  $as_echo_n "(cached) " >&6
36230else
36231  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36232   ac_cxx_werror_flag=yes
36233   ac_cv_prog_cxx_g=no
36234   CXXFLAGS="-g"
36235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36236/* end confdefs.h.  */
36237
36238int
36239main ()
36240{
36241
36242  ;
36243  return 0;
36244}
36245_ACEOF
36246if ac_fn_cxx_try_compile "$LINENO"; then :
36247  ac_cv_prog_cxx_g=yes
36248else
36249  CXXFLAGS=""
36250      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36251/* end confdefs.h.  */
36252
36253int
36254main ()
36255{
36256
36257  ;
36258  return 0;
36259}
36260_ACEOF
36261if ac_fn_cxx_try_compile "$LINENO"; then :
36262
36263else
36264  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36265	 CXXFLAGS="-g"
36266	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36267/* end confdefs.h.  */
36268
36269int
36270main ()
36271{
36272
36273  ;
36274  return 0;
36275}
36276_ACEOF
36277if ac_fn_cxx_try_compile "$LINENO"; then :
36278  ac_cv_prog_cxx_g=yes
36279fi
36280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36281fi
36282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36283fi
36284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36285   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36286fi
36287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36288$as_echo "$ac_cv_prog_cxx_g" >&6; }
36289if test "$ac_test_CXXFLAGS" = set; then
36290  CXXFLAGS=$ac_save_CXXFLAGS
36291elif test $ac_cv_prog_cxx_g = yes; then
36292  if test "$GXX" = yes; then
36293    CXXFLAGS="-g -O2"
36294  else
36295    CXXFLAGS="-g"
36296  fi
36297else
36298  if test "$GXX" = yes; then
36299    CXXFLAGS="-O2"
36300  else
36301    CXXFLAGS=
36302  fi
36303fi
36304ac_ext=cpp
36305ac_cpp='$CXXCPP $CPPFLAGS'
36306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36309
36310
36311  # This is the compiler version number on the form X.Y[.Z]
36312
36313
36314
36315
36316  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36317    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36318$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36320$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36321  fi
36322
36323  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36324  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36325    { $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
36326$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;}
36327  fi
36328
36329  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36330    { $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
36331$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36332  fi
36333
36334  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36335
36336
36337  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387    # Execute function body
36388
36389  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36390  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36391
36392  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36393    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36394  fi
36395
36396  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36397    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36398  fi
36399
36400  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36401  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36402
36403  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36404    :
36405
36406  else
36407    :
36408
36409          { $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
36410$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36411
36412
36413  fi
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428  fi
36429
36430  #
36431  # Setup the preprocessor (CPP and CXXCPP)
36432  #
36433  ac_ext=c
36434ac_cpp='$CPP $CPPFLAGS'
36435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36437ac_compiler_gnu=$ac_cv_c_compiler_gnu
36438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36439$as_echo_n "checking how to run the C preprocessor... " >&6; }
36440# On Suns, sometimes $CPP names a directory.
36441if test -n "$CPP" && test -d "$CPP"; then
36442  CPP=
36443fi
36444if test -z "$CPP"; then
36445  if ${ac_cv_prog_CPP+:} false; then :
36446  $as_echo_n "(cached) " >&6
36447else
36448      # Double quotes because CPP needs to be expanded
36449    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36450    do
36451      ac_preproc_ok=false
36452for ac_c_preproc_warn_flag in '' yes
36453do
36454  # Use a header file that comes with gcc, so configuring glibc
36455  # with a fresh cross-compiler works.
36456  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36457  # <limits.h> exists even on freestanding compilers.
36458  # On the NeXT, cc -E runs the code through the compiler's parser,
36459  # not just through cpp. "Syntax error" is here to catch this case.
36460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36461/* end confdefs.h.  */
36462#ifdef __STDC__
36463# include <limits.h>
36464#else
36465# include <assert.h>
36466#endif
36467		     Syntax error
36468_ACEOF
36469if ac_fn_c_try_cpp "$LINENO"; then :
36470
36471else
36472  # Broken: fails on valid input.
36473continue
36474fi
36475rm -f conftest.err conftest.i conftest.$ac_ext
36476
36477  # OK, works on sane cases.  Now check whether nonexistent headers
36478  # can be detected and how.
36479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36480/* end confdefs.h.  */
36481#include <ac_nonexistent.h>
36482_ACEOF
36483if ac_fn_c_try_cpp "$LINENO"; then :
36484  # Broken: success on invalid input.
36485continue
36486else
36487  # Passes both tests.
36488ac_preproc_ok=:
36489break
36490fi
36491rm -f conftest.err conftest.i conftest.$ac_ext
36492
36493done
36494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36495rm -f conftest.i conftest.err conftest.$ac_ext
36496if $ac_preproc_ok; then :
36497  break
36498fi
36499
36500    done
36501    ac_cv_prog_CPP=$CPP
36502
36503fi
36504  CPP=$ac_cv_prog_CPP
36505else
36506  ac_cv_prog_CPP=$CPP
36507fi
36508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36509$as_echo "$CPP" >&6; }
36510ac_preproc_ok=false
36511for ac_c_preproc_warn_flag in '' yes
36512do
36513  # Use a header file that comes with gcc, so configuring glibc
36514  # with a fresh cross-compiler works.
36515  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36516  # <limits.h> exists even on freestanding compilers.
36517  # On the NeXT, cc -E runs the code through the compiler's parser,
36518  # not just through cpp. "Syntax error" is here to catch this case.
36519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36520/* end confdefs.h.  */
36521#ifdef __STDC__
36522# include <limits.h>
36523#else
36524# include <assert.h>
36525#endif
36526		     Syntax error
36527_ACEOF
36528if ac_fn_c_try_cpp "$LINENO"; then :
36529
36530else
36531  # Broken: fails on valid input.
36532continue
36533fi
36534rm -f conftest.err conftest.i conftest.$ac_ext
36535
36536  # OK, works on sane cases.  Now check whether nonexistent headers
36537  # can be detected and how.
36538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36539/* end confdefs.h.  */
36540#include <ac_nonexistent.h>
36541_ACEOF
36542if ac_fn_c_try_cpp "$LINENO"; then :
36543  # Broken: success on invalid input.
36544continue
36545else
36546  # Passes both tests.
36547ac_preproc_ok=:
36548break
36549fi
36550rm -f conftest.err conftest.i conftest.$ac_ext
36551
36552done
36553# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36554rm -f conftest.i conftest.err conftest.$ac_ext
36555if $ac_preproc_ok; then :
36556
36557else
36558  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36560as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36561See \`config.log' for more details" "$LINENO" 5; }
36562fi
36563
36564ac_ext=cpp
36565ac_cpp='$CXXCPP $CPPFLAGS'
36566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36569
36570
36571  # Only process if variable expands to non-empty
36572
36573  if test "x$CPP" != x; then
36574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36575
36576  # First separate the path from the arguments. This will split at the first
36577  # space.
36578  complete="$CPP"
36579  path="${complete%% *}"
36580  tmp="$complete EOL"
36581  arguments="${tmp#* }"
36582
36583  # Input might be given as Windows format, start by converting to
36584  # unix format.
36585  new_path=`$CYGPATH -u "$path"`
36586
36587  # Now try to locate executable using which
36588  new_path=`$WHICH "$new_path" 2> /dev/null`
36589  # bat and cmd files are not always considered executable in cygwin causing which
36590  # to not find them
36591  if test "x$new_path" = x \
36592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36594    new_path=`$CYGPATH -u "$path"`
36595  fi
36596  if test "x$new_path" = x; then
36597    # Oops. Which didn't find the executable.
36598    # The splitting of arguments from the executable at a space might have been incorrect,
36599    # since paths with space are more likely in Windows. Give it another try with the whole
36600    # argument.
36601    path="$complete"
36602    arguments="EOL"
36603    new_path=`$CYGPATH -u "$path"`
36604    new_path=`$WHICH "$new_path" 2> /dev/null`
36605    # bat and cmd files are not always considered executable in cygwin causing which
36606    # to not find them
36607    if test "x$new_path" = x \
36608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36610      new_path=`$CYGPATH -u "$path"`
36611    fi
36612    if test "x$new_path" = x; then
36613      # It's still not found. Now this is an unrecoverable error.
36614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36615$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36616      has_space=`$ECHO "$complete" | $GREP " "`
36617      if test "x$has_space" != x; then
36618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36620      fi
36621      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36622    fi
36623  fi
36624
36625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36628  # "foo.exe" is OK but "foo" is an error.
36629  #
36630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36631  # It is also a way to make sure we got the proper file name for the real test later on.
36632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36633  if test "x$test_shortpath" = x; then
36634    # Short path failed, file does not exist as specified.
36635    # Try adding .exe or .cmd
36636    if test -f "${new_path}.exe"; then
36637      input_to_shortpath="${new_path}.exe"
36638    elif test -f "${new_path}.cmd"; then
36639      input_to_shortpath="${new_path}.cmd"
36640    else
36641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36642$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36645      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36646    fi
36647  else
36648    input_to_shortpath="$new_path"
36649  fi
36650
36651  # Call helper function which possibly converts this using DOS-style short mode.
36652  # If so, the updated path is stored in $new_path.
36653  new_path="$input_to_shortpath"
36654
36655  input_path="$input_to_shortpath"
36656  # Check if we need to convert this using DOS-style short mode. If the path
36657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36658  # take no chances and rewrite it.
36659  # Note: m4 eats our [], so we need to use [ and ] instead.
36660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36661  if test "x$has_forbidden_chars" != x; then
36662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36666      # Going to short mode and back again did indeed matter. Since short mode is
36667      # case insensitive, let's make it lowercase to improve readability.
36668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36669      # Now convert it back to Unix-style (cygpath)
36670      input_path=`$CYGPATH -u "$shortmode_path"`
36671      new_path="$input_path"
36672    fi
36673  fi
36674
36675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36676  if test "x$test_cygdrive_prefix" = x; then
36677    # As a simple fix, exclude /usr/bin since it's not a real path.
36678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36680      # a path prefixed by /cygdrive for fixpath to work.
36681      new_path="$CYGWIN_ROOT_PATH$input_path"
36682    fi
36683  fi
36684
36685  # remove trailing .exe if any
36686  new_path="${new_path/%.exe/}"
36687
36688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36689
36690  # First separate the path from the arguments. This will split at the first
36691  # space.
36692  complete="$CPP"
36693  path="${complete%% *}"
36694  tmp="$complete EOL"
36695  arguments="${tmp#* }"
36696
36697  # Input might be given as Windows format, start by converting to
36698  # unix format.
36699  new_path="$path"
36700
36701  windows_path="$new_path"
36702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36703    unix_path=`$CYGPATH -u "$windows_path"`
36704    new_path="$unix_path"
36705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36707    new_path="$unix_path"
36708  fi
36709
36710
36711  # Now try to locate executable using which
36712  new_path=`$WHICH "$new_path" 2> /dev/null`
36713
36714  if test "x$new_path" = x; then
36715    # Oops. Which didn't find the executable.
36716    # The splitting of arguments from the executable at a space might have been incorrect,
36717    # since paths with space are more likely in Windows. Give it another try with the whole
36718    # argument.
36719    path="$complete"
36720    arguments="EOL"
36721    new_path="$path"
36722
36723  windows_path="$new_path"
36724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36725    unix_path=`$CYGPATH -u "$windows_path"`
36726    new_path="$unix_path"
36727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36729    new_path="$unix_path"
36730  fi
36731
36732
36733    new_path=`$WHICH "$new_path" 2> /dev/null`
36734    # bat and cmd files are not always considered executable in MSYS causing which
36735    # to not find them
36736    if test "x$new_path" = x \
36737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36739      new_path="$path"
36740
36741  windows_path="$new_path"
36742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36743    unix_path=`$CYGPATH -u "$windows_path"`
36744    new_path="$unix_path"
36745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36747    new_path="$unix_path"
36748  fi
36749
36750    fi
36751
36752    if test "x$new_path" = x; then
36753      # It's still not found. Now this is an unrecoverable error.
36754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36755$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36756      has_space=`$ECHO "$complete" | $GREP " "`
36757      if test "x$has_space" != x; then
36758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36760      fi
36761      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36762    fi
36763  fi
36764
36765  # Now new_path has a complete unix path to the binary
36766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36767    # Keep paths in /bin as-is, but remove trailing .exe if any
36768    new_path="${new_path/%.exe/}"
36769    # Do not save /bin paths to all_fixpath_prefixes!
36770  else
36771    # Not in mixed or Windows style, start by that.
36772    new_path=`cmd //c echo $new_path`
36773
36774  input_path="$new_path"
36775  # Check if we need to convert this using DOS-style short mode. If the path
36776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36777  # take no chances and rewrite it.
36778  # Note: m4 eats our [], so we need to use [ and ] instead.
36779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36780  if test "x$has_forbidden_chars" != x; then
36781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36783  fi
36784
36785    # Output is in $new_path
36786
36787  windows_path="$new_path"
36788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36789    unix_path=`$CYGPATH -u "$windows_path"`
36790    new_path="$unix_path"
36791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36793    new_path="$unix_path"
36794  fi
36795
36796    # remove trailing .exe if any
36797    new_path="${new_path/%.exe/}"
36798
36799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36801  fi
36802
36803    else
36804      # We're on a unix platform. Hooray! :)
36805      # First separate the path from the arguments. This will split at the first
36806      # space.
36807      complete="$CPP"
36808      path="${complete%% *}"
36809      tmp="$complete EOL"
36810      arguments="${tmp#* }"
36811
36812      # Cannot rely on the command "which" here since it doesn't always work.
36813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36814      if test -z "$is_absolute_path"; then
36815        # Path to executable is not absolute. Find it.
36816        IFS_save="$IFS"
36817        IFS=:
36818        for p in $PATH; do
36819          if test -f "$p/$path" && test -x "$p/$path"; then
36820            new_path="$p/$path"
36821            break
36822          fi
36823        done
36824        IFS="$IFS_save"
36825      else
36826        # This is an absolute path, we can use it without further modifications.
36827        new_path="$path"
36828      fi
36829
36830      if test "x$new_path" = x; then
36831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36832$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36833        has_space=`$ECHO "$complete" | $GREP " "`
36834        if test "x$has_space" != x; then
36835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36837        fi
36838        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36839      fi
36840    fi
36841
36842    # Now join together the path and the arguments once again
36843    if test "x$arguments" != xEOL; then
36844      new_complete="$new_path ${arguments% *}"
36845    else
36846      new_complete="$new_path"
36847    fi
36848
36849    if test "x$complete" != "x$new_complete"; then
36850      CPP="$new_complete"
36851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36852$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36853    fi
36854  fi
36855
36856  ac_ext=cpp
36857ac_cpp='$CXXCPP $CPPFLAGS'
36858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36862$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36863if test -z "$CXXCPP"; then
36864  if ${ac_cv_prog_CXXCPP+:} false; then :
36865  $as_echo_n "(cached) " >&6
36866else
36867      # Double quotes because CXXCPP needs to be expanded
36868    for CXXCPP in "$CXX -E" "/lib/cpp"
36869    do
36870      ac_preproc_ok=false
36871for ac_cxx_preproc_warn_flag in '' yes
36872do
36873  # Use a header file that comes with gcc, so configuring glibc
36874  # with a fresh cross-compiler works.
36875  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36876  # <limits.h> exists even on freestanding compilers.
36877  # On the NeXT, cc -E runs the code through the compiler's parser,
36878  # not just through cpp. "Syntax error" is here to catch this case.
36879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36880/* end confdefs.h.  */
36881#ifdef __STDC__
36882# include <limits.h>
36883#else
36884# include <assert.h>
36885#endif
36886		     Syntax error
36887_ACEOF
36888if ac_fn_cxx_try_cpp "$LINENO"; then :
36889
36890else
36891  # Broken: fails on valid input.
36892continue
36893fi
36894rm -f conftest.err conftest.i conftest.$ac_ext
36895
36896  # OK, works on sane cases.  Now check whether nonexistent headers
36897  # can be detected and how.
36898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36899/* end confdefs.h.  */
36900#include <ac_nonexistent.h>
36901_ACEOF
36902if ac_fn_cxx_try_cpp "$LINENO"; then :
36903  # Broken: success on invalid input.
36904continue
36905else
36906  # Passes both tests.
36907ac_preproc_ok=:
36908break
36909fi
36910rm -f conftest.err conftest.i conftest.$ac_ext
36911
36912done
36913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36914rm -f conftest.i conftest.err conftest.$ac_ext
36915if $ac_preproc_ok; then :
36916  break
36917fi
36918
36919    done
36920    ac_cv_prog_CXXCPP=$CXXCPP
36921
36922fi
36923  CXXCPP=$ac_cv_prog_CXXCPP
36924else
36925  ac_cv_prog_CXXCPP=$CXXCPP
36926fi
36927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36928$as_echo "$CXXCPP" >&6; }
36929ac_preproc_ok=false
36930for ac_cxx_preproc_warn_flag in '' yes
36931do
36932  # Use a header file that comes with gcc, so configuring glibc
36933  # with a fresh cross-compiler works.
36934  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36935  # <limits.h> exists even on freestanding compilers.
36936  # On the NeXT, cc -E runs the code through the compiler's parser,
36937  # not just through cpp. "Syntax error" is here to catch this case.
36938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36939/* end confdefs.h.  */
36940#ifdef __STDC__
36941# include <limits.h>
36942#else
36943# include <assert.h>
36944#endif
36945		     Syntax error
36946_ACEOF
36947if ac_fn_cxx_try_cpp "$LINENO"; then :
36948
36949else
36950  # Broken: fails on valid input.
36951continue
36952fi
36953rm -f conftest.err conftest.i conftest.$ac_ext
36954
36955  # OK, works on sane cases.  Now check whether nonexistent headers
36956  # can be detected and how.
36957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36958/* end confdefs.h.  */
36959#include <ac_nonexistent.h>
36960_ACEOF
36961if ac_fn_cxx_try_cpp "$LINENO"; then :
36962  # Broken: success on invalid input.
36963continue
36964else
36965  # Passes both tests.
36966ac_preproc_ok=:
36967break
36968fi
36969rm -f conftest.err conftest.i conftest.$ac_ext
36970
36971done
36972# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36973rm -f conftest.i conftest.err conftest.$ac_ext
36974if $ac_preproc_ok; then :
36975
36976else
36977  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36979as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36980See \`config.log' for more details" "$LINENO" 5; }
36981fi
36982
36983ac_ext=cpp
36984ac_cpp='$CXXCPP $CPPFLAGS'
36985ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36986ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36987ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36988
36989
36990  # Only process if variable expands to non-empty
36991
36992  if test "x$CXXCPP" != x; then
36993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994
36995  # First separate the path from the arguments. This will split at the first
36996  # space.
36997  complete="$CXXCPP"
36998  path="${complete%% *}"
36999  tmp="$complete EOL"
37000  arguments="${tmp#* }"
37001
37002  # Input might be given as Windows format, start by converting to
37003  # unix format.
37004  new_path=`$CYGPATH -u "$path"`
37005
37006  # Now try to locate executable using which
37007  new_path=`$WHICH "$new_path" 2> /dev/null`
37008  # bat and cmd files are not always considered executable in cygwin causing which
37009  # to not find them
37010  if test "x$new_path" = x \
37011      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37012      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37013    new_path=`$CYGPATH -u "$path"`
37014  fi
37015  if test "x$new_path" = x; then
37016    # Oops. Which didn't find the executable.
37017    # The splitting of arguments from the executable at a space might have been incorrect,
37018    # since paths with space are more likely in Windows. Give it another try with the whole
37019    # argument.
37020    path="$complete"
37021    arguments="EOL"
37022    new_path=`$CYGPATH -u "$path"`
37023    new_path=`$WHICH "$new_path" 2> /dev/null`
37024    # bat and cmd files are not always considered executable in cygwin causing which
37025    # to not find them
37026    if test "x$new_path" = x \
37027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37029      new_path=`$CYGPATH -u "$path"`
37030    fi
37031    if test "x$new_path" = x; then
37032      # It's still not found. Now this is an unrecoverable error.
37033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37034$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37035      has_space=`$ECHO "$complete" | $GREP " "`
37036      if test "x$has_space" != x; then
37037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37039      fi
37040      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37041    fi
37042  fi
37043
37044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37047  # "foo.exe" is OK but "foo" is an error.
37048  #
37049  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37050  # It is also a way to make sure we got the proper file name for the real test later on.
37051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37052  if test "x$test_shortpath" = x; then
37053    # Short path failed, file does not exist as specified.
37054    # Try adding .exe or .cmd
37055    if test -f "${new_path}.exe"; then
37056      input_to_shortpath="${new_path}.exe"
37057    elif test -f "${new_path}.cmd"; then
37058      input_to_shortpath="${new_path}.cmd"
37059    else
37060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
37061$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
37062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37064      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37065    fi
37066  else
37067    input_to_shortpath="$new_path"
37068  fi
37069
37070  # Call helper function which possibly converts this using DOS-style short mode.
37071  # If so, the updated path is stored in $new_path.
37072  new_path="$input_to_shortpath"
37073
37074  input_path="$input_to_shortpath"
37075  # Check if we need to convert this using DOS-style short mode. If the path
37076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37077  # take no chances and rewrite it.
37078  # Note: m4 eats our [], so we need to use [ and ] instead.
37079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37080  if test "x$has_forbidden_chars" != x; then
37081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37085      # Going to short mode and back again did indeed matter. Since short mode is
37086      # case insensitive, let's make it lowercase to improve readability.
37087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37088      # Now convert it back to Unix-style (cygpath)
37089      input_path=`$CYGPATH -u "$shortmode_path"`
37090      new_path="$input_path"
37091    fi
37092  fi
37093
37094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37095  if test "x$test_cygdrive_prefix" = x; then
37096    # As a simple fix, exclude /usr/bin since it's not a real path.
37097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37099      # a path prefixed by /cygdrive for fixpath to work.
37100      new_path="$CYGWIN_ROOT_PATH$input_path"
37101    fi
37102  fi
37103
37104  # remove trailing .exe if any
37105  new_path="${new_path/%.exe/}"
37106
37107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37108
37109  # First separate the path from the arguments. This will split at the first
37110  # space.
37111  complete="$CXXCPP"
37112  path="${complete%% *}"
37113  tmp="$complete EOL"
37114  arguments="${tmp#* }"
37115
37116  # Input might be given as Windows format, start by converting to
37117  # unix format.
37118  new_path="$path"
37119
37120  windows_path="$new_path"
37121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37122    unix_path=`$CYGPATH -u "$windows_path"`
37123    new_path="$unix_path"
37124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37126    new_path="$unix_path"
37127  fi
37128
37129
37130  # Now try to locate executable using which
37131  new_path=`$WHICH "$new_path" 2> /dev/null`
37132
37133  if test "x$new_path" = x; then
37134    # Oops. Which didn't find the executable.
37135    # The splitting of arguments from the executable at a space might have been incorrect,
37136    # since paths with space are more likely in Windows. Give it another try with the whole
37137    # argument.
37138    path="$complete"
37139    arguments="EOL"
37140    new_path="$path"
37141
37142  windows_path="$new_path"
37143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37144    unix_path=`$CYGPATH -u "$windows_path"`
37145    new_path="$unix_path"
37146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37148    new_path="$unix_path"
37149  fi
37150
37151
37152    new_path=`$WHICH "$new_path" 2> /dev/null`
37153    # bat and cmd files are not always considered executable in MSYS causing which
37154    # to not find them
37155    if test "x$new_path" = x \
37156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37158      new_path="$path"
37159
37160  windows_path="$new_path"
37161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37162    unix_path=`$CYGPATH -u "$windows_path"`
37163    new_path="$unix_path"
37164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37166    new_path="$unix_path"
37167  fi
37168
37169    fi
37170
37171    if test "x$new_path" = x; then
37172      # It's still not found. Now this is an unrecoverable error.
37173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37174$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37175      has_space=`$ECHO "$complete" | $GREP " "`
37176      if test "x$has_space" != x; then
37177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37179      fi
37180      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37181    fi
37182  fi
37183
37184  # Now new_path has a complete unix path to the binary
37185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37186    # Keep paths in /bin as-is, but remove trailing .exe if any
37187    new_path="${new_path/%.exe/}"
37188    # Do not save /bin paths to all_fixpath_prefixes!
37189  else
37190    # Not in mixed or Windows style, start by that.
37191    new_path=`cmd //c echo $new_path`
37192
37193  input_path="$new_path"
37194  # Check if we need to convert this using DOS-style short mode. If the path
37195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37196  # take no chances and rewrite it.
37197  # Note: m4 eats our [], so we need to use [ and ] instead.
37198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37199  if test "x$has_forbidden_chars" != x; then
37200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37202  fi
37203
37204    # Output is in $new_path
37205
37206  windows_path="$new_path"
37207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37208    unix_path=`$CYGPATH -u "$windows_path"`
37209    new_path="$unix_path"
37210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37212    new_path="$unix_path"
37213  fi
37214
37215    # remove trailing .exe if any
37216    new_path="${new_path/%.exe/}"
37217
37218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37220  fi
37221
37222    else
37223      # We're on a unix platform. Hooray! :)
37224      # First separate the path from the arguments. This will split at the first
37225      # space.
37226      complete="$CXXCPP"
37227      path="${complete%% *}"
37228      tmp="$complete EOL"
37229      arguments="${tmp#* }"
37230
37231      # Cannot rely on the command "which" here since it doesn't always work.
37232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37233      if test -z "$is_absolute_path"; then
37234        # Path to executable is not absolute. Find it.
37235        IFS_save="$IFS"
37236        IFS=:
37237        for p in $PATH; do
37238          if test -f "$p/$path" && test -x "$p/$path"; then
37239            new_path="$p/$path"
37240            break
37241          fi
37242        done
37243        IFS="$IFS_save"
37244      else
37245        # This is an absolute path, we can use it without further modifications.
37246        new_path="$path"
37247      fi
37248
37249      if test "x$new_path" = x; then
37250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37251$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37252        has_space=`$ECHO "$complete" | $GREP " "`
37253        if test "x$has_space" != x; then
37254          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37256        fi
37257        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37258      fi
37259    fi
37260
37261    # Now join together the path and the arguments once again
37262    if test "x$arguments" != xEOL; then
37263      new_complete="$new_path ${arguments% *}"
37264    else
37265      new_complete="$new_path"
37266    fi
37267
37268    if test "x$complete" != "x$new_complete"; then
37269      CXXCPP="$new_complete"
37270      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37271$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37272    fi
37273  fi
37274
37275
37276  #
37277  # Setup the linker (LD)
37278  #
37279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37280    # In the Microsoft toolchain we have a separate LD command "link".
37281    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37282    # a cygwin program for something completely different.
37283    # Extract the first word of "link", so it can be a program name with args.
37284set dummy link; ac_word=$2
37285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37286$as_echo_n "checking for $ac_word... " >&6; }
37287if ${ac_cv_prog_LD+:} false; then :
37288  $as_echo_n "(cached) " >&6
37289else
37290  if test -n "$LD"; then
37291  ac_cv_prog_LD="$LD" # Let the user override the test.
37292else
37293  ac_prog_rejected=no
37294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37295for as_dir in $PATH
37296do
37297  IFS=$as_save_IFS
37298  test -z "$as_dir" && as_dir=.
37299    for ac_exec_ext in '' $ac_executable_extensions; do
37300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37301    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37302       ac_prog_rejected=yes
37303       continue
37304     fi
37305    ac_cv_prog_LD="link"
37306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37307    break 2
37308  fi
37309done
37310  done
37311IFS=$as_save_IFS
37312
37313if test $ac_prog_rejected = yes; then
37314  # We found a bogon in the path, so make sure we never use it.
37315  set dummy $ac_cv_prog_LD
37316  shift
37317  if test $# != 0; then
37318    # We chose a different compiler from the bogus one.
37319    # However, it has the same basename, so the bogon will be chosen
37320    # first if we set LD to just the basename; use the full file name.
37321    shift
37322    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37323  fi
37324fi
37325fi
37326fi
37327LD=$ac_cv_prog_LD
37328if test -n "$LD"; then
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37330$as_echo "$LD" >&6; }
37331else
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37333$as_echo "no" >&6; }
37334fi
37335
37336
37337
37338  # Only process if variable expands to non-empty
37339
37340  if test "x$LD" != x; then
37341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37342
37343  # First separate the path from the arguments. This will split at the first
37344  # space.
37345  complete="$LD"
37346  path="${complete%% *}"
37347  tmp="$complete EOL"
37348  arguments="${tmp#* }"
37349
37350  # Input might be given as Windows format, start by converting to
37351  # unix format.
37352  new_path=`$CYGPATH -u "$path"`
37353
37354  # Now try to locate executable using which
37355  new_path=`$WHICH "$new_path" 2> /dev/null`
37356  # bat and cmd files are not always considered executable in cygwin causing which
37357  # to not find them
37358  if test "x$new_path" = x \
37359      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37360      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37361    new_path=`$CYGPATH -u "$path"`
37362  fi
37363  if test "x$new_path" = x; then
37364    # Oops. Which didn't find the executable.
37365    # The splitting of arguments from the executable at a space might have been incorrect,
37366    # since paths with space are more likely in Windows. Give it another try with the whole
37367    # argument.
37368    path="$complete"
37369    arguments="EOL"
37370    new_path=`$CYGPATH -u "$path"`
37371    new_path=`$WHICH "$new_path" 2> /dev/null`
37372    # bat and cmd files are not always considered executable in cygwin causing which
37373    # to not find them
37374    if test "x$new_path" = x \
37375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37377      new_path=`$CYGPATH -u "$path"`
37378    fi
37379    if test "x$new_path" = x; then
37380      # It's still not found. Now this is an unrecoverable error.
37381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37382$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37383      has_space=`$ECHO "$complete" | $GREP " "`
37384      if test "x$has_space" != x; then
37385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37387      fi
37388      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37389    fi
37390  fi
37391
37392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37395  # "foo.exe" is OK but "foo" is an error.
37396  #
37397  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37398  # It is also a way to make sure we got the proper file name for the real test later on.
37399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37400  if test "x$test_shortpath" = x; then
37401    # Short path failed, file does not exist as specified.
37402    # Try adding .exe or .cmd
37403    if test -f "${new_path}.exe"; then
37404      input_to_shortpath="${new_path}.exe"
37405    elif test -f "${new_path}.cmd"; then
37406      input_to_shortpath="${new_path}.cmd"
37407    else
37408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37409$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37412      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37413    fi
37414  else
37415    input_to_shortpath="$new_path"
37416  fi
37417
37418  # Call helper function which possibly converts this using DOS-style short mode.
37419  # If so, the updated path is stored in $new_path.
37420  new_path="$input_to_shortpath"
37421
37422  input_path="$input_to_shortpath"
37423  # Check if we need to convert this using DOS-style short mode. If the path
37424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37425  # take no chances and rewrite it.
37426  # Note: m4 eats our [], so we need to use [ and ] instead.
37427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37428  if test "x$has_forbidden_chars" != x; then
37429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37433      # Going to short mode and back again did indeed matter. Since short mode is
37434      # case insensitive, let's make it lowercase to improve readability.
37435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37436      # Now convert it back to Unix-style (cygpath)
37437      input_path=`$CYGPATH -u "$shortmode_path"`
37438      new_path="$input_path"
37439    fi
37440  fi
37441
37442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37443  if test "x$test_cygdrive_prefix" = x; then
37444    # As a simple fix, exclude /usr/bin since it's not a real path.
37445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37447      # a path prefixed by /cygdrive for fixpath to work.
37448      new_path="$CYGWIN_ROOT_PATH$input_path"
37449    fi
37450  fi
37451
37452  # remove trailing .exe if any
37453  new_path="${new_path/%.exe/}"
37454
37455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37456
37457  # First separate the path from the arguments. This will split at the first
37458  # space.
37459  complete="$LD"
37460  path="${complete%% *}"
37461  tmp="$complete EOL"
37462  arguments="${tmp#* }"
37463
37464  # Input might be given as Windows format, start by converting to
37465  # unix format.
37466  new_path="$path"
37467
37468  windows_path="$new_path"
37469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37470    unix_path=`$CYGPATH -u "$windows_path"`
37471    new_path="$unix_path"
37472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37474    new_path="$unix_path"
37475  fi
37476
37477
37478  # Now try to locate executable using which
37479  new_path=`$WHICH "$new_path" 2> /dev/null`
37480
37481  if test "x$new_path" = x; then
37482    # Oops. Which didn't find the executable.
37483    # The splitting of arguments from the executable at a space might have been incorrect,
37484    # since paths with space are more likely in Windows. Give it another try with the whole
37485    # argument.
37486    path="$complete"
37487    arguments="EOL"
37488    new_path="$path"
37489
37490  windows_path="$new_path"
37491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37492    unix_path=`$CYGPATH -u "$windows_path"`
37493    new_path="$unix_path"
37494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37496    new_path="$unix_path"
37497  fi
37498
37499
37500    new_path=`$WHICH "$new_path" 2> /dev/null`
37501    # bat and cmd files are not always considered executable in MSYS causing which
37502    # to not find them
37503    if test "x$new_path" = x \
37504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37506      new_path="$path"
37507
37508  windows_path="$new_path"
37509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37510    unix_path=`$CYGPATH -u "$windows_path"`
37511    new_path="$unix_path"
37512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37514    new_path="$unix_path"
37515  fi
37516
37517    fi
37518
37519    if test "x$new_path" = x; then
37520      # It's still not found. Now this is an unrecoverable error.
37521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37522$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37523      has_space=`$ECHO "$complete" | $GREP " "`
37524      if test "x$has_space" != x; then
37525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37527      fi
37528      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37529    fi
37530  fi
37531
37532  # Now new_path has a complete unix path to the binary
37533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37534    # Keep paths in /bin as-is, but remove trailing .exe if any
37535    new_path="${new_path/%.exe/}"
37536    # Do not save /bin paths to all_fixpath_prefixes!
37537  else
37538    # Not in mixed or Windows style, start by that.
37539    new_path=`cmd //c echo $new_path`
37540
37541  input_path="$new_path"
37542  # Check if we need to convert this using DOS-style short mode. If the path
37543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37544  # take no chances and rewrite it.
37545  # Note: m4 eats our [], so we need to use [ and ] instead.
37546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37547  if test "x$has_forbidden_chars" != x; then
37548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37550  fi
37551
37552    # Output is in $new_path
37553
37554  windows_path="$new_path"
37555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37556    unix_path=`$CYGPATH -u "$windows_path"`
37557    new_path="$unix_path"
37558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37560    new_path="$unix_path"
37561  fi
37562
37563    # remove trailing .exe if any
37564    new_path="${new_path/%.exe/}"
37565
37566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37568  fi
37569
37570    else
37571      # We're on a unix platform. Hooray! :)
37572      # First separate the path from the arguments. This will split at the first
37573      # space.
37574      complete="$LD"
37575      path="${complete%% *}"
37576      tmp="$complete EOL"
37577      arguments="${tmp#* }"
37578
37579      # Cannot rely on the command "which" here since it doesn't always work.
37580      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37581      if test -z "$is_absolute_path"; then
37582        # Path to executable is not absolute. Find it.
37583        IFS_save="$IFS"
37584        IFS=:
37585        for p in $PATH; do
37586          if test -f "$p/$path" && test -x "$p/$path"; then
37587            new_path="$p/$path"
37588            break
37589          fi
37590        done
37591        IFS="$IFS_save"
37592      else
37593        # This is an absolute path, we can use it without further modifications.
37594        new_path="$path"
37595      fi
37596
37597      if test "x$new_path" = x; then
37598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37599$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37600        has_space=`$ECHO "$complete" | $GREP " "`
37601        if test "x$has_space" != x; then
37602          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37604        fi
37605        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37606      fi
37607    fi
37608
37609    # Now join together the path and the arguments once again
37610    if test "x$arguments" != xEOL; then
37611      new_complete="$new_path ${arguments% *}"
37612    else
37613      new_complete="$new_path"
37614    fi
37615
37616    if test "x$complete" != "x$new_complete"; then
37617      LD="$new_complete"
37618      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37619$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37620    fi
37621  fi
37622
37623    # Verify that we indeed succeeded with this trick.
37624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37625$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37626    "$LD" --version > /dev/null
37627    if test $? -eq 0 ; then
37628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37629$as_echo "no" >&6; }
37630      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37631    else
37632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37633$as_echo "yes" >&6; }
37634    fi
37635    LDCXX="$LD"
37636  else
37637    # All other toolchains use the compiler to link.
37638    LD="$CC"
37639    LDCXX="$CXX"
37640  fi
37641
37642  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37643
37644
37645  #
37646  # Setup the assembler (AS)
37647  #
37648  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37649
37650
37651  # Publish this variable in the help.
37652
37653
37654  if [ -z "${AS+x}" ]; then
37655    # The variable is not set by user, try to locate tool using the code snippet
37656    for ac_prog in as
37657do
37658  # Extract the first word of "$ac_prog", so it can be a program name with args.
37659set dummy $ac_prog; ac_word=$2
37660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37661$as_echo_n "checking for $ac_word... " >&6; }
37662if ${ac_cv_path_AS+:} false; then :
37663  $as_echo_n "(cached) " >&6
37664else
37665  case $AS in
37666  [\\/]* | ?:[\\/]*)
37667  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37668  ;;
37669  *)
37670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37671for as_dir in $PATH
37672do
37673  IFS=$as_save_IFS
37674  test -z "$as_dir" && as_dir=.
37675    for ac_exec_ext in '' $ac_executable_extensions; do
37676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37677    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37679    break 2
37680  fi
37681done
37682  done
37683IFS=$as_save_IFS
37684
37685  ;;
37686esac
37687fi
37688AS=$ac_cv_path_AS
37689if test -n "$AS"; then
37690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37691$as_echo "$AS" >&6; }
37692else
37693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37694$as_echo "no" >&6; }
37695fi
37696
37697
37698  test -n "$AS" && break
37699done
37700
37701  else
37702    # The variable is set, but is it from the command line or the environment?
37703
37704    # Try to remove the string !AS! from our list.
37705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37707      # If it failed, the variable was not from the command line. Ignore it,
37708      # but warn the user (except for BASH, which is always set by the calling BASH).
37709      if test "xAS" != xBASH; then
37710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37711$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37712      fi
37713      # Try to locate tool using the code snippet
37714      for ac_prog in as
37715do
37716  # Extract the first word of "$ac_prog", so it can be a program name with args.
37717set dummy $ac_prog; ac_word=$2
37718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37719$as_echo_n "checking for $ac_word... " >&6; }
37720if ${ac_cv_path_AS+:} false; then :
37721  $as_echo_n "(cached) " >&6
37722else
37723  case $AS in
37724  [\\/]* | ?:[\\/]*)
37725  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37726  ;;
37727  *)
37728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37729for as_dir in $PATH
37730do
37731  IFS=$as_save_IFS
37732  test -z "$as_dir" && as_dir=.
37733    for ac_exec_ext in '' $ac_executable_extensions; do
37734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37735    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37737    break 2
37738  fi
37739done
37740  done
37741IFS=$as_save_IFS
37742
37743  ;;
37744esac
37745fi
37746AS=$ac_cv_path_AS
37747if test -n "$AS"; then
37748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37749$as_echo "$AS" >&6; }
37750else
37751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37752$as_echo "no" >&6; }
37753fi
37754
37755
37756  test -n "$AS" && break
37757done
37758
37759    else
37760      # If it succeeded, then it was overridden by the user. We will use it
37761      # for the tool.
37762
37763      # First remove it from the list of overridden variables, so we can test
37764      # for unknown variables in the end.
37765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37766
37767      # Check if we try to supply an empty value
37768      if test "x$AS" = x; then
37769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37770$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37772$as_echo_n "checking for AS... " >&6; }
37773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37774$as_echo "disabled" >&6; }
37775      else
37776        # Check if the provided tool contains a complete path.
37777        tool_specified="$AS"
37778        tool_basename="${tool_specified##*/}"
37779        if test "x$tool_basename" = "x$tool_specified"; then
37780          # A command without a complete path is provided, search $PATH.
37781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37782$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37783          # Extract the first word of "$tool_basename", so it can be a program name with args.
37784set dummy $tool_basename; ac_word=$2
37785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37786$as_echo_n "checking for $ac_word... " >&6; }
37787if ${ac_cv_path_AS+:} false; then :
37788  $as_echo_n "(cached) " >&6
37789else
37790  case $AS in
37791  [\\/]* | ?:[\\/]*)
37792  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37793  ;;
37794  *)
37795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37796for as_dir in $PATH
37797do
37798  IFS=$as_save_IFS
37799  test -z "$as_dir" && as_dir=.
37800    for ac_exec_ext in '' $ac_executable_extensions; do
37801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37802    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37804    break 2
37805  fi
37806done
37807  done
37808IFS=$as_save_IFS
37809
37810  ;;
37811esac
37812fi
37813AS=$ac_cv_path_AS
37814if test -n "$AS"; then
37815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37816$as_echo "$AS" >&6; }
37817else
37818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37819$as_echo "no" >&6; }
37820fi
37821
37822
37823          if test "x$AS" = x; then
37824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37825          fi
37826        else
37827          # Otherwise we believe it is a complete path. Use it as it is.
37828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37829$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37831$as_echo_n "checking for AS... " >&6; }
37832          if test ! -x "$tool_specified"; then
37833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37834$as_echo "not found" >&6; }
37835            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37836          fi
37837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37838$as_echo "$tool_specified" >&6; }
37839        fi
37840      fi
37841    fi
37842
37843  fi
37844
37845
37846
37847  # Only process if variable expands to non-empty
37848
37849  if test "x$AS" != x; then
37850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37851
37852  # First separate the path from the arguments. This will split at the first
37853  # space.
37854  complete="$AS"
37855  path="${complete%% *}"
37856  tmp="$complete EOL"
37857  arguments="${tmp#* }"
37858
37859  # Input might be given as Windows format, start by converting to
37860  # unix format.
37861  new_path=`$CYGPATH -u "$path"`
37862
37863  # Now try to locate executable using which
37864  new_path=`$WHICH "$new_path" 2> /dev/null`
37865  # bat and cmd files are not always considered executable in cygwin causing which
37866  # to not find them
37867  if test "x$new_path" = x \
37868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37870    new_path=`$CYGPATH -u "$path"`
37871  fi
37872  if test "x$new_path" = x; then
37873    # Oops. Which didn't find the executable.
37874    # The splitting of arguments from the executable at a space might have been incorrect,
37875    # since paths with space are more likely in Windows. Give it another try with the whole
37876    # argument.
37877    path="$complete"
37878    arguments="EOL"
37879    new_path=`$CYGPATH -u "$path"`
37880    new_path=`$WHICH "$new_path" 2> /dev/null`
37881    # bat and cmd files are not always considered executable in cygwin causing which
37882    # to not find them
37883    if test "x$new_path" = x \
37884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37886      new_path=`$CYGPATH -u "$path"`
37887    fi
37888    if test "x$new_path" = x; then
37889      # It's still not found. Now this is an unrecoverable error.
37890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37891$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37892      has_space=`$ECHO "$complete" | $GREP " "`
37893      if test "x$has_space" != x; then
37894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37896      fi
37897      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37898    fi
37899  fi
37900
37901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37904  # "foo.exe" is OK but "foo" is an error.
37905  #
37906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37907  # It is also a way to make sure we got the proper file name for the real test later on.
37908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37909  if test "x$test_shortpath" = x; then
37910    # Short path failed, file does not exist as specified.
37911    # Try adding .exe or .cmd
37912    if test -f "${new_path}.exe"; then
37913      input_to_shortpath="${new_path}.exe"
37914    elif test -f "${new_path}.cmd"; then
37915      input_to_shortpath="${new_path}.cmd"
37916    else
37917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37918$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37921      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37922    fi
37923  else
37924    input_to_shortpath="$new_path"
37925  fi
37926
37927  # Call helper function which possibly converts this using DOS-style short mode.
37928  # If so, the updated path is stored in $new_path.
37929  new_path="$input_to_shortpath"
37930
37931  input_path="$input_to_shortpath"
37932  # Check if we need to convert this using DOS-style short mode. If the path
37933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37934  # take no chances and rewrite it.
37935  # Note: m4 eats our [], so we need to use [ and ] instead.
37936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37937  if test "x$has_forbidden_chars" != x; then
37938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37942      # Going to short mode and back again did indeed matter. Since short mode is
37943      # case insensitive, let's make it lowercase to improve readability.
37944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37945      # Now convert it back to Unix-style (cygpath)
37946      input_path=`$CYGPATH -u "$shortmode_path"`
37947      new_path="$input_path"
37948    fi
37949  fi
37950
37951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37952  if test "x$test_cygdrive_prefix" = x; then
37953    # As a simple fix, exclude /usr/bin since it's not a real path.
37954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37956      # a path prefixed by /cygdrive for fixpath to work.
37957      new_path="$CYGWIN_ROOT_PATH$input_path"
37958    fi
37959  fi
37960
37961  # remove trailing .exe if any
37962  new_path="${new_path/%.exe/}"
37963
37964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37965
37966  # First separate the path from the arguments. This will split at the first
37967  # space.
37968  complete="$AS"
37969  path="${complete%% *}"
37970  tmp="$complete EOL"
37971  arguments="${tmp#* }"
37972
37973  # Input might be given as Windows format, start by converting to
37974  # unix format.
37975  new_path="$path"
37976
37977  windows_path="$new_path"
37978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37979    unix_path=`$CYGPATH -u "$windows_path"`
37980    new_path="$unix_path"
37981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37983    new_path="$unix_path"
37984  fi
37985
37986
37987  # Now try to locate executable using which
37988  new_path=`$WHICH "$new_path" 2> /dev/null`
37989
37990  if test "x$new_path" = x; then
37991    # Oops. Which didn't find the executable.
37992    # The splitting of arguments from the executable at a space might have been incorrect,
37993    # since paths with space are more likely in Windows. Give it another try with the whole
37994    # argument.
37995    path="$complete"
37996    arguments="EOL"
37997    new_path="$path"
37998
37999  windows_path="$new_path"
38000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38001    unix_path=`$CYGPATH -u "$windows_path"`
38002    new_path="$unix_path"
38003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38005    new_path="$unix_path"
38006  fi
38007
38008
38009    new_path=`$WHICH "$new_path" 2> /dev/null`
38010    # bat and cmd files are not always considered executable in MSYS causing which
38011    # to not find them
38012    if test "x$new_path" = x \
38013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38015      new_path="$path"
38016
38017  windows_path="$new_path"
38018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38019    unix_path=`$CYGPATH -u "$windows_path"`
38020    new_path="$unix_path"
38021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38023    new_path="$unix_path"
38024  fi
38025
38026    fi
38027
38028    if test "x$new_path" = x; then
38029      # It's still not found. Now this is an unrecoverable error.
38030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38031$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38032      has_space=`$ECHO "$complete" | $GREP " "`
38033      if test "x$has_space" != x; then
38034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38036      fi
38037      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38038    fi
38039  fi
38040
38041  # Now new_path has a complete unix path to the binary
38042  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38043    # Keep paths in /bin as-is, but remove trailing .exe if any
38044    new_path="${new_path/%.exe/}"
38045    # Do not save /bin paths to all_fixpath_prefixes!
38046  else
38047    # Not in mixed or Windows style, start by that.
38048    new_path=`cmd //c echo $new_path`
38049
38050  input_path="$new_path"
38051  # Check if we need to convert this using DOS-style short mode. If the path
38052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38053  # take no chances and rewrite it.
38054  # Note: m4 eats our [], so we need to use [ and ] instead.
38055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38056  if test "x$has_forbidden_chars" != x; then
38057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38059  fi
38060
38061    # Output is in $new_path
38062
38063  windows_path="$new_path"
38064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38065    unix_path=`$CYGPATH -u "$windows_path"`
38066    new_path="$unix_path"
38067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38069    new_path="$unix_path"
38070  fi
38071
38072    # remove trailing .exe if any
38073    new_path="${new_path/%.exe/}"
38074
38075    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38076    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38077  fi
38078
38079    else
38080      # We're on a unix platform. Hooray! :)
38081      # First separate the path from the arguments. This will split at the first
38082      # space.
38083      complete="$AS"
38084      path="${complete%% *}"
38085      tmp="$complete EOL"
38086      arguments="${tmp#* }"
38087
38088      # Cannot rely on the command "which" here since it doesn't always work.
38089      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38090      if test -z "$is_absolute_path"; then
38091        # Path to executable is not absolute. Find it.
38092        IFS_save="$IFS"
38093        IFS=:
38094        for p in $PATH; do
38095          if test -f "$p/$path" && test -x "$p/$path"; then
38096            new_path="$p/$path"
38097            break
38098          fi
38099        done
38100        IFS="$IFS_save"
38101      else
38102        # This is an absolute path, we can use it without further modifications.
38103        new_path="$path"
38104      fi
38105
38106      if test "x$new_path" = x; then
38107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38108$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38109        has_space=`$ECHO "$complete" | $GREP " "`
38110        if test "x$has_space" != x; then
38111          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38113        fi
38114        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38115      fi
38116    fi
38117
38118    # Now join together the path and the arguments once again
38119    if test "x$arguments" != xEOL; then
38120      new_complete="$new_path ${arguments% *}"
38121    else
38122      new_complete="$new_path"
38123    fi
38124
38125    if test "x$complete" != "x$new_complete"; then
38126      AS="$new_complete"
38127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38128$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38129    fi
38130  fi
38131
38132    if test "x$AS" = x; then
38133      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38134    fi
38135  else
38136    # FIXME: is this correct for microsoft?
38137    AS="$CC -c"
38138  fi
38139
38140
38141  #
38142  # Setup the archiver (AR)
38143  #
38144  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38145    # The corresponding ar tool is lib.exe (used to create static libraries)
38146    # Extract the first word of "lib", so it can be a program name with args.
38147set dummy lib; ac_word=$2
38148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38149$as_echo_n "checking for $ac_word... " >&6; }
38150if ${ac_cv_prog_AR+:} false; then :
38151  $as_echo_n "(cached) " >&6
38152else
38153  if test -n "$AR"; then
38154  ac_cv_prog_AR="$AR" # Let the user override the test.
38155else
38156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38157for as_dir in $PATH
38158do
38159  IFS=$as_save_IFS
38160  test -z "$as_dir" && as_dir=.
38161    for ac_exec_ext in '' $ac_executable_extensions; do
38162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38163    ac_cv_prog_AR="lib"
38164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38165    break 2
38166  fi
38167done
38168  done
38169IFS=$as_save_IFS
38170
38171fi
38172fi
38173AR=$ac_cv_prog_AR
38174if test -n "$AR"; then
38175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38176$as_echo "$AR" >&6; }
38177else
38178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38179$as_echo "no" >&6; }
38180fi
38181
38182
38183  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38184
38185
38186  # Publish this variable in the help.
38187
38188
38189  if [ -z "${AR+x}" ]; then
38190    # The variable is not set by user, try to locate tool using the code snippet
38191    if test -n "$ac_tool_prefix"; then
38192  for ac_prog in ar gcc-ar
38193  do
38194    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38197$as_echo_n "checking for $ac_word... " >&6; }
38198if ${ac_cv_prog_AR+:} false; then :
38199  $as_echo_n "(cached) " >&6
38200else
38201  if test -n "$AR"; then
38202  ac_cv_prog_AR="$AR" # Let the user override the test.
38203else
38204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38205for as_dir in $PATH
38206do
38207  IFS=$as_save_IFS
38208  test -z "$as_dir" && as_dir=.
38209    for ac_exec_ext in '' $ac_executable_extensions; do
38210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38211    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38213    break 2
38214  fi
38215done
38216  done
38217IFS=$as_save_IFS
38218
38219fi
38220fi
38221AR=$ac_cv_prog_AR
38222if test -n "$AR"; then
38223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38224$as_echo "$AR" >&6; }
38225else
38226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38227$as_echo "no" >&6; }
38228fi
38229
38230
38231    test -n "$AR" && break
38232  done
38233fi
38234if test -z "$AR"; then
38235  ac_ct_AR=$AR
38236  for ac_prog in ar gcc-ar
38237do
38238  # Extract the first word of "$ac_prog", so it can be a program name with args.
38239set dummy $ac_prog; ac_word=$2
38240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38241$as_echo_n "checking for $ac_word... " >&6; }
38242if ${ac_cv_prog_ac_ct_AR+:} false; then :
38243  $as_echo_n "(cached) " >&6
38244else
38245  if test -n "$ac_ct_AR"; then
38246  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38247else
38248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38249for as_dir in $PATH
38250do
38251  IFS=$as_save_IFS
38252  test -z "$as_dir" && as_dir=.
38253    for ac_exec_ext in '' $ac_executable_extensions; do
38254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38255    ac_cv_prog_ac_ct_AR="$ac_prog"
38256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38257    break 2
38258  fi
38259done
38260  done
38261IFS=$as_save_IFS
38262
38263fi
38264fi
38265ac_ct_AR=$ac_cv_prog_ac_ct_AR
38266if test -n "$ac_ct_AR"; then
38267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38268$as_echo "$ac_ct_AR" >&6; }
38269else
38270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38271$as_echo "no" >&6; }
38272fi
38273
38274
38275  test -n "$ac_ct_AR" && break
38276done
38277
38278  if test "x$ac_ct_AR" = x; then
38279    AR=""
38280  else
38281    case $cross_compiling:$ac_tool_warned in
38282yes:)
38283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38285ac_tool_warned=yes ;;
38286esac
38287    AR=$ac_ct_AR
38288  fi
38289fi
38290
38291  else
38292    # The variable is set, but is it from the command line or the environment?
38293
38294    # Try to remove the string !AR! from our list.
38295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38297      # If it failed, the variable was not from the command line. Ignore it,
38298      # but warn the user (except for BASH, which is always set by the calling BASH).
38299      if test "xAR" != xBASH; then
38300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38301$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38302      fi
38303      # Try to locate tool using the code snippet
38304      if test -n "$ac_tool_prefix"; then
38305  for ac_prog in ar gcc-ar
38306  do
38307    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38308set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38310$as_echo_n "checking for $ac_word... " >&6; }
38311if ${ac_cv_prog_AR+:} false; then :
38312  $as_echo_n "(cached) " >&6
38313else
38314  if test -n "$AR"; then
38315  ac_cv_prog_AR="$AR" # Let the user override the test.
38316else
38317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38318for as_dir in $PATH
38319do
38320  IFS=$as_save_IFS
38321  test -z "$as_dir" && as_dir=.
38322    for ac_exec_ext in '' $ac_executable_extensions; do
38323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38324    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38326    break 2
38327  fi
38328done
38329  done
38330IFS=$as_save_IFS
38331
38332fi
38333fi
38334AR=$ac_cv_prog_AR
38335if test -n "$AR"; then
38336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38337$as_echo "$AR" >&6; }
38338else
38339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38340$as_echo "no" >&6; }
38341fi
38342
38343
38344    test -n "$AR" && break
38345  done
38346fi
38347if test -z "$AR"; then
38348  ac_ct_AR=$AR
38349  for ac_prog in ar gcc-ar
38350do
38351  # Extract the first word of "$ac_prog", so it can be a program name with args.
38352set dummy $ac_prog; ac_word=$2
38353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38354$as_echo_n "checking for $ac_word... " >&6; }
38355if ${ac_cv_prog_ac_ct_AR+:} false; then :
38356  $as_echo_n "(cached) " >&6
38357else
38358  if test -n "$ac_ct_AR"; then
38359  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38360else
38361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38362for as_dir in $PATH
38363do
38364  IFS=$as_save_IFS
38365  test -z "$as_dir" && as_dir=.
38366    for ac_exec_ext in '' $ac_executable_extensions; do
38367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38368    ac_cv_prog_ac_ct_AR="$ac_prog"
38369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38370    break 2
38371  fi
38372done
38373  done
38374IFS=$as_save_IFS
38375
38376fi
38377fi
38378ac_ct_AR=$ac_cv_prog_ac_ct_AR
38379if test -n "$ac_ct_AR"; then
38380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38381$as_echo "$ac_ct_AR" >&6; }
38382else
38383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38384$as_echo "no" >&6; }
38385fi
38386
38387
38388  test -n "$ac_ct_AR" && break
38389done
38390
38391  if test "x$ac_ct_AR" = x; then
38392    AR=""
38393  else
38394    case $cross_compiling:$ac_tool_warned in
38395yes:)
38396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38398ac_tool_warned=yes ;;
38399esac
38400    AR=$ac_ct_AR
38401  fi
38402fi
38403
38404    else
38405      # If it succeeded, then it was overridden by the user. We will use it
38406      # for the tool.
38407
38408      # First remove it from the list of overridden variables, so we can test
38409      # for unknown variables in the end.
38410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38411
38412      # Check if we try to supply an empty value
38413      if test "x$AR" = x; then
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38415$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38417$as_echo_n "checking for AR... " >&6; }
38418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38419$as_echo "disabled" >&6; }
38420      else
38421        # Check if the provided tool contains a complete path.
38422        tool_specified="$AR"
38423        tool_basename="${tool_specified##*/}"
38424        if test "x$tool_basename" = "x$tool_specified"; then
38425          # A command without a complete path is provided, search $PATH.
38426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38427$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38428          # Extract the first word of "$tool_basename", so it can be a program name with args.
38429set dummy $tool_basename; ac_word=$2
38430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38431$as_echo_n "checking for $ac_word... " >&6; }
38432if ${ac_cv_path_AR+:} false; then :
38433  $as_echo_n "(cached) " >&6
38434else
38435  case $AR in
38436  [\\/]* | ?:[\\/]*)
38437  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38438  ;;
38439  *)
38440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38441for as_dir in $PATH
38442do
38443  IFS=$as_save_IFS
38444  test -z "$as_dir" && as_dir=.
38445    for ac_exec_ext in '' $ac_executable_extensions; do
38446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38447    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38449    break 2
38450  fi
38451done
38452  done
38453IFS=$as_save_IFS
38454
38455  ;;
38456esac
38457fi
38458AR=$ac_cv_path_AR
38459if test -n "$AR"; then
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38461$as_echo "$AR" >&6; }
38462else
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38464$as_echo "no" >&6; }
38465fi
38466
38467
38468          if test "x$AR" = x; then
38469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38470          fi
38471        else
38472          # Otherwise we believe it is a complete path. Use it as it is.
38473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38474$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38476$as_echo_n "checking for AR... " >&6; }
38477          if test ! -x "$tool_specified"; then
38478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38479$as_echo "not found" >&6; }
38480            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38481          fi
38482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38483$as_echo "$tool_specified" >&6; }
38484        fi
38485      fi
38486    fi
38487
38488  fi
38489
38490
38491  else
38492
38493
38494  # Publish this variable in the help.
38495
38496
38497  if [ -z "${AR+x}" ]; then
38498    # The variable is not set by user, try to locate tool using the code snippet
38499    if test -n "$ac_tool_prefix"; then
38500  for ac_prog in ar
38501  do
38502    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38503set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38505$as_echo_n "checking for $ac_word... " >&6; }
38506if ${ac_cv_prog_AR+:} false; then :
38507  $as_echo_n "(cached) " >&6
38508else
38509  if test -n "$AR"; then
38510  ac_cv_prog_AR="$AR" # Let the user override the test.
38511else
38512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38513for as_dir in $PATH
38514do
38515  IFS=$as_save_IFS
38516  test -z "$as_dir" && as_dir=.
38517    for ac_exec_ext in '' $ac_executable_extensions; do
38518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38519    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38521    break 2
38522  fi
38523done
38524  done
38525IFS=$as_save_IFS
38526
38527fi
38528fi
38529AR=$ac_cv_prog_AR
38530if test -n "$AR"; then
38531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38532$as_echo "$AR" >&6; }
38533else
38534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38535$as_echo "no" >&6; }
38536fi
38537
38538
38539    test -n "$AR" && break
38540  done
38541fi
38542if test -z "$AR"; then
38543  ac_ct_AR=$AR
38544  for ac_prog in ar
38545do
38546  # Extract the first word of "$ac_prog", so it can be a program name with args.
38547set dummy $ac_prog; ac_word=$2
38548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38549$as_echo_n "checking for $ac_word... " >&6; }
38550if ${ac_cv_prog_ac_ct_AR+:} false; then :
38551  $as_echo_n "(cached) " >&6
38552else
38553  if test -n "$ac_ct_AR"; then
38554  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38555else
38556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38557for as_dir in $PATH
38558do
38559  IFS=$as_save_IFS
38560  test -z "$as_dir" && as_dir=.
38561    for ac_exec_ext in '' $ac_executable_extensions; do
38562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38563    ac_cv_prog_ac_ct_AR="$ac_prog"
38564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38565    break 2
38566  fi
38567done
38568  done
38569IFS=$as_save_IFS
38570
38571fi
38572fi
38573ac_ct_AR=$ac_cv_prog_ac_ct_AR
38574if test -n "$ac_ct_AR"; then
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38576$as_echo "$ac_ct_AR" >&6; }
38577else
38578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38579$as_echo "no" >&6; }
38580fi
38581
38582
38583  test -n "$ac_ct_AR" && break
38584done
38585
38586  if test "x$ac_ct_AR" = x; then
38587    AR=""
38588  else
38589    case $cross_compiling:$ac_tool_warned in
38590yes:)
38591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38593ac_tool_warned=yes ;;
38594esac
38595    AR=$ac_ct_AR
38596  fi
38597fi
38598
38599  else
38600    # The variable is set, but is it from the command line or the environment?
38601
38602    # Try to remove the string !AR! from our list.
38603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38605      # If it failed, the variable was not from the command line. Ignore it,
38606      # but warn the user (except for BASH, which is always set by the calling BASH).
38607      if test "xAR" != xBASH; then
38608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38609$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38610      fi
38611      # Try to locate tool using the code snippet
38612      if test -n "$ac_tool_prefix"; then
38613  for ac_prog in ar
38614  do
38615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38618$as_echo_n "checking for $ac_word... " >&6; }
38619if ${ac_cv_prog_AR+:} false; then :
38620  $as_echo_n "(cached) " >&6
38621else
38622  if test -n "$AR"; then
38623  ac_cv_prog_AR="$AR" # Let the user override the test.
38624else
38625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38626for as_dir in $PATH
38627do
38628  IFS=$as_save_IFS
38629  test -z "$as_dir" && as_dir=.
38630    for ac_exec_ext in '' $ac_executable_extensions; do
38631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38632    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38634    break 2
38635  fi
38636done
38637  done
38638IFS=$as_save_IFS
38639
38640fi
38641fi
38642AR=$ac_cv_prog_AR
38643if test -n "$AR"; then
38644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38645$as_echo "$AR" >&6; }
38646else
38647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38648$as_echo "no" >&6; }
38649fi
38650
38651
38652    test -n "$AR" && break
38653  done
38654fi
38655if test -z "$AR"; then
38656  ac_ct_AR=$AR
38657  for ac_prog in ar
38658do
38659  # Extract the first word of "$ac_prog", so it can be a program name with args.
38660set dummy $ac_prog; ac_word=$2
38661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38662$as_echo_n "checking for $ac_word... " >&6; }
38663if ${ac_cv_prog_ac_ct_AR+:} false; then :
38664  $as_echo_n "(cached) " >&6
38665else
38666  if test -n "$ac_ct_AR"; then
38667  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38668else
38669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38670for as_dir in $PATH
38671do
38672  IFS=$as_save_IFS
38673  test -z "$as_dir" && as_dir=.
38674    for ac_exec_ext in '' $ac_executable_extensions; do
38675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38676    ac_cv_prog_ac_ct_AR="$ac_prog"
38677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38678    break 2
38679  fi
38680done
38681  done
38682IFS=$as_save_IFS
38683
38684fi
38685fi
38686ac_ct_AR=$ac_cv_prog_ac_ct_AR
38687if test -n "$ac_ct_AR"; then
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38689$as_echo "$ac_ct_AR" >&6; }
38690else
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38692$as_echo "no" >&6; }
38693fi
38694
38695
38696  test -n "$ac_ct_AR" && break
38697done
38698
38699  if test "x$ac_ct_AR" = x; then
38700    AR=""
38701  else
38702    case $cross_compiling:$ac_tool_warned in
38703yes:)
38704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38706ac_tool_warned=yes ;;
38707esac
38708    AR=$ac_ct_AR
38709  fi
38710fi
38711
38712    else
38713      # If it succeeded, then it was overridden by the user. We will use it
38714      # for the tool.
38715
38716      # First remove it from the list of overridden variables, so we can test
38717      # for unknown variables in the end.
38718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38719
38720      # Check if we try to supply an empty value
38721      if test "x$AR" = x; then
38722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38723$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38725$as_echo_n "checking for AR... " >&6; }
38726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38727$as_echo "disabled" >&6; }
38728      else
38729        # Check if the provided tool contains a complete path.
38730        tool_specified="$AR"
38731        tool_basename="${tool_specified##*/}"
38732        if test "x$tool_basename" = "x$tool_specified"; then
38733          # A command without a complete path is provided, search $PATH.
38734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38735$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38736          # Extract the first word of "$tool_basename", so it can be a program name with args.
38737set dummy $tool_basename; ac_word=$2
38738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38739$as_echo_n "checking for $ac_word... " >&6; }
38740if ${ac_cv_path_AR+:} false; then :
38741  $as_echo_n "(cached) " >&6
38742else
38743  case $AR in
38744  [\\/]* | ?:[\\/]*)
38745  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38746  ;;
38747  *)
38748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38749for as_dir in $PATH
38750do
38751  IFS=$as_save_IFS
38752  test -z "$as_dir" && as_dir=.
38753    for ac_exec_ext in '' $ac_executable_extensions; do
38754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38755    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38757    break 2
38758  fi
38759done
38760  done
38761IFS=$as_save_IFS
38762
38763  ;;
38764esac
38765fi
38766AR=$ac_cv_path_AR
38767if test -n "$AR"; then
38768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38769$as_echo "$AR" >&6; }
38770else
38771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38772$as_echo "no" >&6; }
38773fi
38774
38775
38776          if test "x$AR" = x; then
38777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38778          fi
38779        else
38780          # Otherwise we believe it is a complete path. Use it as it is.
38781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38782$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38784$as_echo_n "checking for AR... " >&6; }
38785          if test ! -x "$tool_specified"; then
38786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38787$as_echo "not found" >&6; }
38788            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38789          fi
38790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38791$as_echo "$tool_specified" >&6; }
38792        fi
38793      fi
38794    fi
38795
38796  fi
38797
38798
38799  fi
38800
38801  # Only process if variable expands to non-empty
38802
38803  if test "x$AR" != x; then
38804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38805
38806  # First separate the path from the arguments. This will split at the first
38807  # space.
38808  complete="$AR"
38809  path="${complete%% *}"
38810  tmp="$complete EOL"
38811  arguments="${tmp#* }"
38812
38813  # Input might be given as Windows format, start by converting to
38814  # unix format.
38815  new_path=`$CYGPATH -u "$path"`
38816
38817  # Now try to locate executable using which
38818  new_path=`$WHICH "$new_path" 2> /dev/null`
38819  # bat and cmd files are not always considered executable in cygwin causing which
38820  # to not find them
38821  if test "x$new_path" = x \
38822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38824    new_path=`$CYGPATH -u "$path"`
38825  fi
38826  if test "x$new_path" = x; then
38827    # Oops. Which didn't find the executable.
38828    # The splitting of arguments from the executable at a space might have been incorrect,
38829    # since paths with space are more likely in Windows. Give it another try with the whole
38830    # argument.
38831    path="$complete"
38832    arguments="EOL"
38833    new_path=`$CYGPATH -u "$path"`
38834    new_path=`$WHICH "$new_path" 2> /dev/null`
38835    # bat and cmd files are not always considered executable in cygwin causing which
38836    # to not find them
38837    if test "x$new_path" = x \
38838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38840      new_path=`$CYGPATH -u "$path"`
38841    fi
38842    if test "x$new_path" = x; then
38843      # It's still not found. Now this is an unrecoverable error.
38844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38845$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38846      has_space=`$ECHO "$complete" | $GREP " "`
38847      if test "x$has_space" != x; then
38848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38850      fi
38851      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38852    fi
38853  fi
38854
38855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38858  # "foo.exe" is OK but "foo" is an error.
38859  #
38860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38861  # It is also a way to make sure we got the proper file name for the real test later on.
38862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38863  if test "x$test_shortpath" = x; then
38864    # Short path failed, file does not exist as specified.
38865    # Try adding .exe or .cmd
38866    if test -f "${new_path}.exe"; then
38867      input_to_shortpath="${new_path}.exe"
38868    elif test -f "${new_path}.cmd"; then
38869      input_to_shortpath="${new_path}.cmd"
38870    else
38871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38872$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38875      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38876    fi
38877  else
38878    input_to_shortpath="$new_path"
38879  fi
38880
38881  # Call helper function which possibly converts this using DOS-style short mode.
38882  # If so, the updated path is stored in $new_path.
38883  new_path="$input_to_shortpath"
38884
38885  input_path="$input_to_shortpath"
38886  # Check if we need to convert this using DOS-style short mode. If the path
38887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38888  # take no chances and rewrite it.
38889  # Note: m4 eats our [], so we need to use [ and ] instead.
38890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38891  if test "x$has_forbidden_chars" != x; then
38892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38896      # Going to short mode and back again did indeed matter. Since short mode is
38897      # case insensitive, let's make it lowercase to improve readability.
38898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38899      # Now convert it back to Unix-style (cygpath)
38900      input_path=`$CYGPATH -u "$shortmode_path"`
38901      new_path="$input_path"
38902    fi
38903  fi
38904
38905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38906  if test "x$test_cygdrive_prefix" = x; then
38907    # As a simple fix, exclude /usr/bin since it's not a real path.
38908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38910      # a path prefixed by /cygdrive for fixpath to work.
38911      new_path="$CYGWIN_ROOT_PATH$input_path"
38912    fi
38913  fi
38914
38915  # remove trailing .exe if any
38916  new_path="${new_path/%.exe/}"
38917
38918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38919
38920  # First separate the path from the arguments. This will split at the first
38921  # space.
38922  complete="$AR"
38923  path="${complete%% *}"
38924  tmp="$complete EOL"
38925  arguments="${tmp#* }"
38926
38927  # Input might be given as Windows format, start by converting to
38928  # unix format.
38929  new_path="$path"
38930
38931  windows_path="$new_path"
38932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38933    unix_path=`$CYGPATH -u "$windows_path"`
38934    new_path="$unix_path"
38935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38937    new_path="$unix_path"
38938  fi
38939
38940
38941  # Now try to locate executable using which
38942  new_path=`$WHICH "$new_path" 2> /dev/null`
38943
38944  if test "x$new_path" = x; then
38945    # Oops. Which didn't find the executable.
38946    # The splitting of arguments from the executable at a space might have been incorrect,
38947    # since paths with space are more likely in Windows. Give it another try with the whole
38948    # argument.
38949    path="$complete"
38950    arguments="EOL"
38951    new_path="$path"
38952
38953  windows_path="$new_path"
38954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38955    unix_path=`$CYGPATH -u "$windows_path"`
38956    new_path="$unix_path"
38957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38959    new_path="$unix_path"
38960  fi
38961
38962
38963    new_path=`$WHICH "$new_path" 2> /dev/null`
38964    # bat and cmd files are not always considered executable in MSYS causing which
38965    # to not find them
38966    if test "x$new_path" = x \
38967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38969      new_path="$path"
38970
38971  windows_path="$new_path"
38972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38973    unix_path=`$CYGPATH -u "$windows_path"`
38974    new_path="$unix_path"
38975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38977    new_path="$unix_path"
38978  fi
38979
38980    fi
38981
38982    if test "x$new_path" = x; then
38983      # It's still not found. Now this is an unrecoverable error.
38984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38985$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38986      has_space=`$ECHO "$complete" | $GREP " "`
38987      if test "x$has_space" != x; then
38988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38990      fi
38991      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38992    fi
38993  fi
38994
38995  # Now new_path has a complete unix path to the binary
38996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38997    # Keep paths in /bin as-is, but remove trailing .exe if any
38998    new_path="${new_path/%.exe/}"
38999    # Do not save /bin paths to all_fixpath_prefixes!
39000  else
39001    # Not in mixed or Windows style, start by that.
39002    new_path=`cmd //c echo $new_path`
39003
39004  input_path="$new_path"
39005  # Check if we need to convert this using DOS-style short mode. If the path
39006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39007  # take no chances and rewrite it.
39008  # Note: m4 eats our [], so we need to use [ and ] instead.
39009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39010  if test "x$has_forbidden_chars" != x; then
39011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39013  fi
39014
39015    # Output is in $new_path
39016
39017  windows_path="$new_path"
39018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39019    unix_path=`$CYGPATH -u "$windows_path"`
39020    new_path="$unix_path"
39021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39023    new_path="$unix_path"
39024  fi
39025
39026    # remove trailing .exe if any
39027    new_path="${new_path/%.exe/}"
39028
39029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39031  fi
39032
39033    else
39034      # We're on a unix platform. Hooray! :)
39035      # First separate the path from the arguments. This will split at the first
39036      # space.
39037      complete="$AR"
39038      path="${complete%% *}"
39039      tmp="$complete EOL"
39040      arguments="${tmp#* }"
39041
39042      # Cannot rely on the command "which" here since it doesn't always work.
39043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39044      if test -z "$is_absolute_path"; then
39045        # Path to executable is not absolute. Find it.
39046        IFS_save="$IFS"
39047        IFS=:
39048        for p in $PATH; do
39049          if test -f "$p/$path" && test -x "$p/$path"; then
39050            new_path="$p/$path"
39051            break
39052          fi
39053        done
39054        IFS="$IFS_save"
39055      else
39056        # This is an absolute path, we can use it without further modifications.
39057        new_path="$path"
39058      fi
39059
39060      if test "x$new_path" = x; then
39061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39062$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39063        has_space=`$ECHO "$complete" | $GREP " "`
39064        if test "x$has_space" != x; then
39065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39067        fi
39068        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39069      fi
39070    fi
39071
39072    # Now join together the path and the arguments once again
39073    if test "x$arguments" != xEOL; then
39074      new_complete="$new_path ${arguments% *}"
39075    else
39076      new_complete="$new_path"
39077    fi
39078
39079    if test "x$complete" != "x$new_complete"; then
39080      AR="$new_complete"
39081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39082$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39083    fi
39084  fi
39085
39086
39087
39088  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39089
39090
39091  # Publish this variable in the help.
39092
39093
39094  if [ -z "${LIPO+x}" ]; then
39095    # The variable is not set by user, try to locate tool using the code snippet
39096    for ac_prog in lipo
39097do
39098  # Extract the first word of "$ac_prog", so it can be a program name with args.
39099set dummy $ac_prog; ac_word=$2
39100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39101$as_echo_n "checking for $ac_word... " >&6; }
39102if ${ac_cv_path_LIPO+:} false; then :
39103  $as_echo_n "(cached) " >&6
39104else
39105  case $LIPO in
39106  [\\/]* | ?:[\\/]*)
39107  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39108  ;;
39109  *)
39110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39111for as_dir in $PATH
39112do
39113  IFS=$as_save_IFS
39114  test -z "$as_dir" && as_dir=.
39115    for ac_exec_ext in '' $ac_executable_extensions; do
39116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39117    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39119    break 2
39120  fi
39121done
39122  done
39123IFS=$as_save_IFS
39124
39125  ;;
39126esac
39127fi
39128LIPO=$ac_cv_path_LIPO
39129if test -n "$LIPO"; then
39130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39131$as_echo "$LIPO" >&6; }
39132else
39133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39134$as_echo "no" >&6; }
39135fi
39136
39137
39138  test -n "$LIPO" && break
39139done
39140
39141  else
39142    # The variable is set, but is it from the command line or the environment?
39143
39144    # Try to remove the string !LIPO! from our list.
39145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39147      # If it failed, the variable was not from the command line. Ignore it,
39148      # but warn the user (except for BASH, which is always set by the calling BASH).
39149      if test "xLIPO" != xBASH; then
39150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39151$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39152      fi
39153      # Try to locate tool using the code snippet
39154      for ac_prog in lipo
39155do
39156  # Extract the first word of "$ac_prog", so it can be a program name with args.
39157set dummy $ac_prog; ac_word=$2
39158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39159$as_echo_n "checking for $ac_word... " >&6; }
39160if ${ac_cv_path_LIPO+:} false; then :
39161  $as_echo_n "(cached) " >&6
39162else
39163  case $LIPO in
39164  [\\/]* | ?:[\\/]*)
39165  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39166  ;;
39167  *)
39168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39169for as_dir in $PATH
39170do
39171  IFS=$as_save_IFS
39172  test -z "$as_dir" && as_dir=.
39173    for ac_exec_ext in '' $ac_executable_extensions; do
39174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39175    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39177    break 2
39178  fi
39179done
39180  done
39181IFS=$as_save_IFS
39182
39183  ;;
39184esac
39185fi
39186LIPO=$ac_cv_path_LIPO
39187if test -n "$LIPO"; then
39188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39189$as_echo "$LIPO" >&6; }
39190else
39191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39192$as_echo "no" >&6; }
39193fi
39194
39195
39196  test -n "$LIPO" && break
39197done
39198
39199    else
39200      # If it succeeded, then it was overridden by the user. We will use it
39201      # for the tool.
39202
39203      # First remove it from the list of overridden variables, so we can test
39204      # for unknown variables in the end.
39205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39206
39207      # Check if we try to supply an empty value
39208      if test "x$LIPO" = x; then
39209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39210$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39212$as_echo_n "checking for LIPO... " >&6; }
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39214$as_echo "disabled" >&6; }
39215      else
39216        # Check if the provided tool contains a complete path.
39217        tool_specified="$LIPO"
39218        tool_basename="${tool_specified##*/}"
39219        if test "x$tool_basename" = "x$tool_specified"; then
39220          # A command without a complete path is provided, search $PATH.
39221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39222$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39223          # Extract the first word of "$tool_basename", so it can be a program name with args.
39224set dummy $tool_basename; ac_word=$2
39225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39226$as_echo_n "checking for $ac_word... " >&6; }
39227if ${ac_cv_path_LIPO+:} false; then :
39228  $as_echo_n "(cached) " >&6
39229else
39230  case $LIPO in
39231  [\\/]* | ?:[\\/]*)
39232  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39233  ;;
39234  *)
39235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39236for as_dir in $PATH
39237do
39238  IFS=$as_save_IFS
39239  test -z "$as_dir" && as_dir=.
39240    for ac_exec_ext in '' $ac_executable_extensions; do
39241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39242    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39244    break 2
39245  fi
39246done
39247  done
39248IFS=$as_save_IFS
39249
39250  ;;
39251esac
39252fi
39253LIPO=$ac_cv_path_LIPO
39254if test -n "$LIPO"; then
39255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39256$as_echo "$LIPO" >&6; }
39257else
39258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39259$as_echo "no" >&6; }
39260fi
39261
39262
39263          if test "x$LIPO" = x; then
39264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39265          fi
39266        else
39267          # Otherwise we believe it is a complete path. Use it as it is.
39268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39269$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39271$as_echo_n "checking for LIPO... " >&6; }
39272          if test ! -x "$tool_specified"; then
39273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39274$as_echo "not found" >&6; }
39275            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39276          fi
39277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39278$as_echo "$tool_specified" >&6; }
39279        fi
39280      fi
39281    fi
39282
39283  fi
39284
39285
39286
39287  # Only process if variable expands to non-empty
39288
39289  if test "x$LIPO" != x; then
39290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39291
39292  # First separate the path from the arguments. This will split at the first
39293  # space.
39294  complete="$LIPO"
39295  path="${complete%% *}"
39296  tmp="$complete EOL"
39297  arguments="${tmp#* }"
39298
39299  # Input might be given as Windows format, start by converting to
39300  # unix format.
39301  new_path=`$CYGPATH -u "$path"`
39302
39303  # Now try to locate executable using which
39304  new_path=`$WHICH "$new_path" 2> /dev/null`
39305  # bat and cmd files are not always considered executable in cygwin causing which
39306  # to not find them
39307  if test "x$new_path" = x \
39308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39310    new_path=`$CYGPATH -u "$path"`
39311  fi
39312  if test "x$new_path" = x; then
39313    # Oops. Which didn't find the executable.
39314    # The splitting of arguments from the executable at a space might have been incorrect,
39315    # since paths with space are more likely in Windows. Give it another try with the whole
39316    # argument.
39317    path="$complete"
39318    arguments="EOL"
39319    new_path=`$CYGPATH -u "$path"`
39320    new_path=`$WHICH "$new_path" 2> /dev/null`
39321    # bat and cmd files are not always considered executable in cygwin causing which
39322    # to not find them
39323    if test "x$new_path" = x \
39324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39326      new_path=`$CYGPATH -u "$path"`
39327    fi
39328    if test "x$new_path" = x; then
39329      # It's still not found. Now this is an unrecoverable error.
39330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39331$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39332      has_space=`$ECHO "$complete" | $GREP " "`
39333      if test "x$has_space" != x; then
39334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39336      fi
39337      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39338    fi
39339  fi
39340
39341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39344  # "foo.exe" is OK but "foo" is an error.
39345  #
39346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39347  # It is also a way to make sure we got the proper file name for the real test later on.
39348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39349  if test "x$test_shortpath" = x; then
39350    # Short path failed, file does not exist as specified.
39351    # Try adding .exe or .cmd
39352    if test -f "${new_path}.exe"; then
39353      input_to_shortpath="${new_path}.exe"
39354    elif test -f "${new_path}.cmd"; then
39355      input_to_shortpath="${new_path}.cmd"
39356    else
39357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39358$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39361      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39362    fi
39363  else
39364    input_to_shortpath="$new_path"
39365  fi
39366
39367  # Call helper function which possibly converts this using DOS-style short mode.
39368  # If so, the updated path is stored in $new_path.
39369  new_path="$input_to_shortpath"
39370
39371  input_path="$input_to_shortpath"
39372  # Check if we need to convert this using DOS-style short mode. If the path
39373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39374  # take no chances and rewrite it.
39375  # Note: m4 eats our [], so we need to use [ and ] instead.
39376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39377  if test "x$has_forbidden_chars" != x; then
39378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39382      # Going to short mode and back again did indeed matter. Since short mode is
39383      # case insensitive, let's make it lowercase to improve readability.
39384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39385      # Now convert it back to Unix-style (cygpath)
39386      input_path=`$CYGPATH -u "$shortmode_path"`
39387      new_path="$input_path"
39388    fi
39389  fi
39390
39391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39392  if test "x$test_cygdrive_prefix" = x; then
39393    # As a simple fix, exclude /usr/bin since it's not a real path.
39394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39396      # a path prefixed by /cygdrive for fixpath to work.
39397      new_path="$CYGWIN_ROOT_PATH$input_path"
39398    fi
39399  fi
39400
39401  # remove trailing .exe if any
39402  new_path="${new_path/%.exe/}"
39403
39404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39405
39406  # First separate the path from the arguments. This will split at the first
39407  # space.
39408  complete="$LIPO"
39409  path="${complete%% *}"
39410  tmp="$complete EOL"
39411  arguments="${tmp#* }"
39412
39413  # Input might be given as Windows format, start by converting to
39414  # unix format.
39415  new_path="$path"
39416
39417  windows_path="$new_path"
39418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39419    unix_path=`$CYGPATH -u "$windows_path"`
39420    new_path="$unix_path"
39421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39423    new_path="$unix_path"
39424  fi
39425
39426
39427  # Now try to locate executable using which
39428  new_path=`$WHICH "$new_path" 2> /dev/null`
39429
39430  if test "x$new_path" = x; then
39431    # Oops. Which didn't find the executable.
39432    # The splitting of arguments from the executable at a space might have been incorrect,
39433    # since paths with space are more likely in Windows. Give it another try with the whole
39434    # argument.
39435    path="$complete"
39436    arguments="EOL"
39437    new_path="$path"
39438
39439  windows_path="$new_path"
39440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39441    unix_path=`$CYGPATH -u "$windows_path"`
39442    new_path="$unix_path"
39443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39445    new_path="$unix_path"
39446  fi
39447
39448
39449    new_path=`$WHICH "$new_path" 2> /dev/null`
39450    # bat and cmd files are not always considered executable in MSYS causing which
39451    # to not find them
39452    if test "x$new_path" = x \
39453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39455      new_path="$path"
39456
39457  windows_path="$new_path"
39458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459    unix_path=`$CYGPATH -u "$windows_path"`
39460    new_path="$unix_path"
39461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39463    new_path="$unix_path"
39464  fi
39465
39466    fi
39467
39468    if test "x$new_path" = x; then
39469      # It's still not found. Now this is an unrecoverable error.
39470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39471$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39472      has_space=`$ECHO "$complete" | $GREP " "`
39473      if test "x$has_space" != x; then
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39476      fi
39477      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39478    fi
39479  fi
39480
39481  # Now new_path has a complete unix path to the binary
39482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39483    # Keep paths in /bin as-is, but remove trailing .exe if any
39484    new_path="${new_path/%.exe/}"
39485    # Do not save /bin paths to all_fixpath_prefixes!
39486  else
39487    # Not in mixed or Windows style, start by that.
39488    new_path=`cmd //c echo $new_path`
39489
39490  input_path="$new_path"
39491  # Check if we need to convert this using DOS-style short mode. If the path
39492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39493  # take no chances and rewrite it.
39494  # Note: m4 eats our [], so we need to use [ and ] instead.
39495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39496  if test "x$has_forbidden_chars" != x; then
39497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39499  fi
39500
39501    # Output is in $new_path
39502
39503  windows_path="$new_path"
39504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39505    unix_path=`$CYGPATH -u "$windows_path"`
39506    new_path="$unix_path"
39507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39509    new_path="$unix_path"
39510  fi
39511
39512    # remove trailing .exe if any
39513    new_path="${new_path/%.exe/}"
39514
39515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39517  fi
39518
39519    else
39520      # We're on a unix platform. Hooray! :)
39521      # First separate the path from the arguments. This will split at the first
39522      # space.
39523      complete="$LIPO"
39524      path="${complete%% *}"
39525      tmp="$complete EOL"
39526      arguments="${tmp#* }"
39527
39528      # Cannot rely on the command "which" here since it doesn't always work.
39529      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39530      if test -z "$is_absolute_path"; then
39531        # Path to executable is not absolute. Find it.
39532        IFS_save="$IFS"
39533        IFS=:
39534        for p in $PATH; do
39535          if test -f "$p/$path" && test -x "$p/$path"; then
39536            new_path="$p/$path"
39537            break
39538          fi
39539        done
39540        IFS="$IFS_save"
39541      else
39542        # This is an absolute path, we can use it without further modifications.
39543        new_path="$path"
39544      fi
39545
39546      if test "x$new_path" = x; then
39547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39548$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39549        has_space=`$ECHO "$complete" | $GREP " "`
39550        if test "x$has_space" != x; then
39551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39553        fi
39554        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39555      fi
39556    fi
39557
39558    # Now join together the path and the arguments once again
39559    if test "x$arguments" != xEOL; then
39560      new_complete="$new_path ${arguments% *}"
39561    else
39562      new_complete="$new_path"
39563    fi
39564
39565    if test "x$complete" != "x$new_complete"; then
39566      LIPO="$new_complete"
39567      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39568$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39569    fi
39570  fi
39571
39572  fi
39573
39574  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39575    # Extract the first word of "mt", so it can be a program name with args.
39576set dummy mt; ac_word=$2
39577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39578$as_echo_n "checking for $ac_word... " >&6; }
39579if ${ac_cv_prog_MT+:} false; then :
39580  $as_echo_n "(cached) " >&6
39581else
39582  if test -n "$MT"; then
39583  ac_cv_prog_MT="$MT" # Let the user override the test.
39584else
39585  ac_prog_rejected=no
39586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39587for as_dir in $PATH
39588do
39589  IFS=$as_save_IFS
39590  test -z "$as_dir" && as_dir=.
39591    for ac_exec_ext in '' $ac_executable_extensions; do
39592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39593    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39594       ac_prog_rejected=yes
39595       continue
39596     fi
39597    ac_cv_prog_MT="mt"
39598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39599    break 2
39600  fi
39601done
39602  done
39603IFS=$as_save_IFS
39604
39605if test $ac_prog_rejected = yes; then
39606  # We found a bogon in the path, so make sure we never use it.
39607  set dummy $ac_cv_prog_MT
39608  shift
39609  if test $# != 0; then
39610    # We chose a different compiler from the bogus one.
39611    # However, it has the same basename, so the bogon will be chosen
39612    # first if we set MT to just the basename; use the full file name.
39613    shift
39614    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39615  fi
39616fi
39617fi
39618fi
39619MT=$ac_cv_prog_MT
39620if test -n "$MT"; then
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39622$as_echo "$MT" >&6; }
39623else
39624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39625$as_echo "no" >&6; }
39626fi
39627
39628
39629
39630  # Only process if variable expands to non-empty
39631
39632  if test "x$MT" != x; then
39633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39634
39635  # First separate the path from the arguments. This will split at the first
39636  # space.
39637  complete="$MT"
39638  path="${complete%% *}"
39639  tmp="$complete EOL"
39640  arguments="${tmp#* }"
39641
39642  # Input might be given as Windows format, start by converting to
39643  # unix format.
39644  new_path=`$CYGPATH -u "$path"`
39645
39646  # Now try to locate executable using which
39647  new_path=`$WHICH "$new_path" 2> /dev/null`
39648  # bat and cmd files are not always considered executable in cygwin causing which
39649  # to not find them
39650  if test "x$new_path" = x \
39651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39653    new_path=`$CYGPATH -u "$path"`
39654  fi
39655  if test "x$new_path" = x; then
39656    # Oops. Which didn't find the executable.
39657    # The splitting of arguments from the executable at a space might have been incorrect,
39658    # since paths with space are more likely in Windows. Give it another try with the whole
39659    # argument.
39660    path="$complete"
39661    arguments="EOL"
39662    new_path=`$CYGPATH -u "$path"`
39663    new_path=`$WHICH "$new_path" 2> /dev/null`
39664    # bat and cmd files are not always considered executable in cygwin causing which
39665    # to not find them
39666    if test "x$new_path" = x \
39667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39669      new_path=`$CYGPATH -u "$path"`
39670    fi
39671    if test "x$new_path" = x; then
39672      # It's still not found. Now this is an unrecoverable error.
39673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39674$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39675      has_space=`$ECHO "$complete" | $GREP " "`
39676      if test "x$has_space" != x; then
39677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39679      fi
39680      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39681    fi
39682  fi
39683
39684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39687  # "foo.exe" is OK but "foo" is an error.
39688  #
39689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39690  # It is also a way to make sure we got the proper file name for the real test later on.
39691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39692  if test "x$test_shortpath" = x; then
39693    # Short path failed, file does not exist as specified.
39694    # Try adding .exe or .cmd
39695    if test -f "${new_path}.exe"; then
39696      input_to_shortpath="${new_path}.exe"
39697    elif test -f "${new_path}.cmd"; then
39698      input_to_shortpath="${new_path}.cmd"
39699    else
39700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39701$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39704      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39705    fi
39706  else
39707    input_to_shortpath="$new_path"
39708  fi
39709
39710  # Call helper function which possibly converts this using DOS-style short mode.
39711  # If so, the updated path is stored in $new_path.
39712  new_path="$input_to_shortpath"
39713
39714  input_path="$input_to_shortpath"
39715  # Check if we need to convert this using DOS-style short mode. If the path
39716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39717  # take no chances and rewrite it.
39718  # Note: m4 eats our [], so we need to use [ and ] instead.
39719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39720  if test "x$has_forbidden_chars" != x; then
39721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39725      # Going to short mode and back again did indeed matter. Since short mode is
39726      # case insensitive, let's make it lowercase to improve readability.
39727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39728      # Now convert it back to Unix-style (cygpath)
39729      input_path=`$CYGPATH -u "$shortmode_path"`
39730      new_path="$input_path"
39731    fi
39732  fi
39733
39734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39735  if test "x$test_cygdrive_prefix" = x; then
39736    # As a simple fix, exclude /usr/bin since it's not a real path.
39737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39739      # a path prefixed by /cygdrive for fixpath to work.
39740      new_path="$CYGWIN_ROOT_PATH$input_path"
39741    fi
39742  fi
39743
39744  # remove trailing .exe if any
39745  new_path="${new_path/%.exe/}"
39746
39747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39748
39749  # First separate the path from the arguments. This will split at the first
39750  # space.
39751  complete="$MT"
39752  path="${complete%% *}"
39753  tmp="$complete EOL"
39754  arguments="${tmp#* }"
39755
39756  # Input might be given as Windows format, start by converting to
39757  # unix format.
39758  new_path="$path"
39759
39760  windows_path="$new_path"
39761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39762    unix_path=`$CYGPATH -u "$windows_path"`
39763    new_path="$unix_path"
39764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39766    new_path="$unix_path"
39767  fi
39768
39769
39770  # Now try to locate executable using which
39771  new_path=`$WHICH "$new_path" 2> /dev/null`
39772
39773  if test "x$new_path" = x; then
39774    # Oops. Which didn't find the executable.
39775    # The splitting of arguments from the executable at a space might have been incorrect,
39776    # since paths with space are more likely in Windows. Give it another try with the whole
39777    # argument.
39778    path="$complete"
39779    arguments="EOL"
39780    new_path="$path"
39781
39782  windows_path="$new_path"
39783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39784    unix_path=`$CYGPATH -u "$windows_path"`
39785    new_path="$unix_path"
39786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39788    new_path="$unix_path"
39789  fi
39790
39791
39792    new_path=`$WHICH "$new_path" 2> /dev/null`
39793    # bat and cmd files are not always considered executable in MSYS causing which
39794    # to not find them
39795    if test "x$new_path" = x \
39796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798      new_path="$path"
39799
39800  windows_path="$new_path"
39801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39802    unix_path=`$CYGPATH -u "$windows_path"`
39803    new_path="$unix_path"
39804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39806    new_path="$unix_path"
39807  fi
39808
39809    fi
39810
39811    if test "x$new_path" = x; then
39812      # It's still not found. Now this is an unrecoverable error.
39813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39814$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39815      has_space=`$ECHO "$complete" | $GREP " "`
39816      if test "x$has_space" != x; then
39817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39819      fi
39820      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39821    fi
39822  fi
39823
39824  # Now new_path has a complete unix path to the binary
39825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39826    # Keep paths in /bin as-is, but remove trailing .exe if any
39827    new_path="${new_path/%.exe/}"
39828    # Do not save /bin paths to all_fixpath_prefixes!
39829  else
39830    # Not in mixed or Windows style, start by that.
39831    new_path=`cmd //c echo $new_path`
39832
39833  input_path="$new_path"
39834  # Check if we need to convert this using DOS-style short mode. If the path
39835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39836  # take no chances and rewrite it.
39837  # Note: m4 eats our [], so we need to use [ and ] instead.
39838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39839  if test "x$has_forbidden_chars" != x; then
39840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39842  fi
39843
39844    # Output is in $new_path
39845
39846  windows_path="$new_path"
39847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39848    unix_path=`$CYGPATH -u "$windows_path"`
39849    new_path="$unix_path"
39850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39852    new_path="$unix_path"
39853  fi
39854
39855    # remove trailing .exe if any
39856    new_path="${new_path/%.exe/}"
39857
39858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39860  fi
39861
39862    else
39863      # We're on a unix platform. Hooray! :)
39864      # First separate the path from the arguments. This will split at the first
39865      # space.
39866      complete="$MT"
39867      path="${complete%% *}"
39868      tmp="$complete EOL"
39869      arguments="${tmp#* }"
39870
39871      # Cannot rely on the command "which" here since it doesn't always work.
39872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39873      if test -z "$is_absolute_path"; then
39874        # Path to executable is not absolute. Find it.
39875        IFS_save="$IFS"
39876        IFS=:
39877        for p in $PATH; do
39878          if test -f "$p/$path" && test -x "$p/$path"; then
39879            new_path="$p/$path"
39880            break
39881          fi
39882        done
39883        IFS="$IFS_save"
39884      else
39885        # This is an absolute path, we can use it without further modifications.
39886        new_path="$path"
39887      fi
39888
39889      if test "x$new_path" = x; then
39890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39891$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39892        has_space=`$ECHO "$complete" | $GREP " "`
39893        if test "x$has_space" != x; then
39894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39896        fi
39897        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39898      fi
39899    fi
39900
39901    # Now join together the path and the arguments once again
39902    if test "x$arguments" != xEOL; then
39903      new_complete="$new_path ${arguments% *}"
39904    else
39905      new_complete="$new_path"
39906    fi
39907
39908    if test "x$complete" != "x$new_complete"; then
39909      MT="$new_complete"
39910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39911$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39912    fi
39913  fi
39914
39915    # Setup the resource compiler (RC)
39916    # Extract the first word of "rc", so it can be a program name with args.
39917set dummy rc; ac_word=$2
39918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39919$as_echo_n "checking for $ac_word... " >&6; }
39920if ${ac_cv_prog_RC+:} false; then :
39921  $as_echo_n "(cached) " >&6
39922else
39923  if test -n "$RC"; then
39924  ac_cv_prog_RC="$RC" # Let the user override the test.
39925else
39926  ac_prog_rejected=no
39927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39928for as_dir in $PATH
39929do
39930  IFS=$as_save_IFS
39931  test -z "$as_dir" && as_dir=.
39932    for ac_exec_ext in '' $ac_executable_extensions; do
39933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39934    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39935       ac_prog_rejected=yes
39936       continue
39937     fi
39938    ac_cv_prog_RC="rc"
39939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39940    break 2
39941  fi
39942done
39943  done
39944IFS=$as_save_IFS
39945
39946if test $ac_prog_rejected = yes; then
39947  # We found a bogon in the path, so make sure we never use it.
39948  set dummy $ac_cv_prog_RC
39949  shift
39950  if test $# != 0; then
39951    # We chose a different compiler from the bogus one.
39952    # However, it has the same basename, so the bogon will be chosen
39953    # first if we set RC to just the basename; use the full file name.
39954    shift
39955    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39956  fi
39957fi
39958fi
39959fi
39960RC=$ac_cv_prog_RC
39961if test -n "$RC"; then
39962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39963$as_echo "$RC" >&6; }
39964else
39965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39966$as_echo "no" >&6; }
39967fi
39968
39969
39970
39971  # Only process if variable expands to non-empty
39972
39973  if test "x$RC" != x; then
39974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39975
39976  # First separate the path from the arguments. This will split at the first
39977  # space.
39978  complete="$RC"
39979  path="${complete%% *}"
39980  tmp="$complete EOL"
39981  arguments="${tmp#* }"
39982
39983  # Input might be given as Windows format, start by converting to
39984  # unix format.
39985  new_path=`$CYGPATH -u "$path"`
39986
39987  # Now try to locate executable using which
39988  new_path=`$WHICH "$new_path" 2> /dev/null`
39989  # bat and cmd files are not always considered executable in cygwin causing which
39990  # to not find them
39991  if test "x$new_path" = x \
39992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39994    new_path=`$CYGPATH -u "$path"`
39995  fi
39996  if test "x$new_path" = x; then
39997    # Oops. Which didn't find the executable.
39998    # The splitting of arguments from the executable at a space might have been incorrect,
39999    # since paths with space are more likely in Windows. Give it another try with the whole
40000    # argument.
40001    path="$complete"
40002    arguments="EOL"
40003    new_path=`$CYGPATH -u "$path"`
40004    new_path=`$WHICH "$new_path" 2> /dev/null`
40005    # bat and cmd files are not always considered executable in cygwin causing which
40006    # to not find them
40007    if test "x$new_path" = x \
40008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40010      new_path=`$CYGPATH -u "$path"`
40011    fi
40012    if test "x$new_path" = x; then
40013      # It's still not found. Now this is an unrecoverable error.
40014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40015$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40016      has_space=`$ECHO "$complete" | $GREP " "`
40017      if test "x$has_space" != x; then
40018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40020      fi
40021      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40022    fi
40023  fi
40024
40025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40028  # "foo.exe" is OK but "foo" is an error.
40029  #
40030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40031  # It is also a way to make sure we got the proper file name for the real test later on.
40032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40033  if test "x$test_shortpath" = x; then
40034    # Short path failed, file does not exist as specified.
40035    # Try adding .exe or .cmd
40036    if test -f "${new_path}.exe"; then
40037      input_to_shortpath="${new_path}.exe"
40038    elif test -f "${new_path}.cmd"; then
40039      input_to_shortpath="${new_path}.cmd"
40040    else
40041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
40042$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
40043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40045      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40046    fi
40047  else
40048    input_to_shortpath="$new_path"
40049  fi
40050
40051  # Call helper function which possibly converts this using DOS-style short mode.
40052  # If so, the updated path is stored in $new_path.
40053  new_path="$input_to_shortpath"
40054
40055  input_path="$input_to_shortpath"
40056  # Check if we need to convert this using DOS-style short mode. If the path
40057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40058  # take no chances and rewrite it.
40059  # Note: m4 eats our [], so we need to use [ and ] instead.
40060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40061  if test "x$has_forbidden_chars" != x; then
40062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40066      # Going to short mode and back again did indeed matter. Since short mode is
40067      # case insensitive, let's make it lowercase to improve readability.
40068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40069      # Now convert it back to Unix-style (cygpath)
40070      input_path=`$CYGPATH -u "$shortmode_path"`
40071      new_path="$input_path"
40072    fi
40073  fi
40074
40075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40076  if test "x$test_cygdrive_prefix" = x; then
40077    # As a simple fix, exclude /usr/bin since it's not a real path.
40078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40080      # a path prefixed by /cygdrive for fixpath to work.
40081      new_path="$CYGWIN_ROOT_PATH$input_path"
40082    fi
40083  fi
40084
40085  # remove trailing .exe if any
40086  new_path="${new_path/%.exe/}"
40087
40088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40089
40090  # First separate the path from the arguments. This will split at the first
40091  # space.
40092  complete="$RC"
40093  path="${complete%% *}"
40094  tmp="$complete EOL"
40095  arguments="${tmp#* }"
40096
40097  # Input might be given as Windows format, start by converting to
40098  # unix format.
40099  new_path="$path"
40100
40101  windows_path="$new_path"
40102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40103    unix_path=`$CYGPATH -u "$windows_path"`
40104    new_path="$unix_path"
40105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40107    new_path="$unix_path"
40108  fi
40109
40110
40111  # Now try to locate executable using which
40112  new_path=`$WHICH "$new_path" 2> /dev/null`
40113
40114  if test "x$new_path" = x; then
40115    # Oops. Which didn't find the executable.
40116    # The splitting of arguments from the executable at a space might have been incorrect,
40117    # since paths with space are more likely in Windows. Give it another try with the whole
40118    # argument.
40119    path="$complete"
40120    arguments="EOL"
40121    new_path="$path"
40122
40123  windows_path="$new_path"
40124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40125    unix_path=`$CYGPATH -u "$windows_path"`
40126    new_path="$unix_path"
40127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40129    new_path="$unix_path"
40130  fi
40131
40132
40133    new_path=`$WHICH "$new_path" 2> /dev/null`
40134    # bat and cmd files are not always considered executable in MSYS causing which
40135    # to not find them
40136    if test "x$new_path" = x \
40137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40139      new_path="$path"
40140
40141  windows_path="$new_path"
40142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40143    unix_path=`$CYGPATH -u "$windows_path"`
40144    new_path="$unix_path"
40145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40147    new_path="$unix_path"
40148  fi
40149
40150    fi
40151
40152    if test "x$new_path" = x; then
40153      # It's still not found. Now this is an unrecoverable error.
40154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40155$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40156      has_space=`$ECHO "$complete" | $GREP " "`
40157      if test "x$has_space" != x; then
40158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40160      fi
40161      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40162    fi
40163  fi
40164
40165  # Now new_path has a complete unix path to the binary
40166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40167    # Keep paths in /bin as-is, but remove trailing .exe if any
40168    new_path="${new_path/%.exe/}"
40169    # Do not save /bin paths to all_fixpath_prefixes!
40170  else
40171    # Not in mixed or Windows style, start by that.
40172    new_path=`cmd //c echo $new_path`
40173
40174  input_path="$new_path"
40175  # Check if we need to convert this using DOS-style short mode. If the path
40176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40177  # take no chances and rewrite it.
40178  # Note: m4 eats our [], so we need to use [ and ] instead.
40179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40180  if test "x$has_forbidden_chars" != x; then
40181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40183  fi
40184
40185    # Output is in $new_path
40186
40187  windows_path="$new_path"
40188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189    unix_path=`$CYGPATH -u "$windows_path"`
40190    new_path="$unix_path"
40191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40193    new_path="$unix_path"
40194  fi
40195
40196    # remove trailing .exe if any
40197    new_path="${new_path/%.exe/}"
40198
40199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40201  fi
40202
40203    else
40204      # We're on a unix platform. Hooray! :)
40205      # First separate the path from the arguments. This will split at the first
40206      # space.
40207      complete="$RC"
40208      path="${complete%% *}"
40209      tmp="$complete EOL"
40210      arguments="${tmp#* }"
40211
40212      # Cannot rely on the command "which" here since it doesn't always work.
40213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40214      if test -z "$is_absolute_path"; then
40215        # Path to executable is not absolute. Find it.
40216        IFS_save="$IFS"
40217        IFS=:
40218        for p in $PATH; do
40219          if test -f "$p/$path" && test -x "$p/$path"; then
40220            new_path="$p/$path"
40221            break
40222          fi
40223        done
40224        IFS="$IFS_save"
40225      else
40226        # This is an absolute path, we can use it without further modifications.
40227        new_path="$path"
40228      fi
40229
40230      if test "x$new_path" = x; then
40231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40232$as_echo "$as_me: The path of RC, 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}: This might be caused by spaces in the path, which is not allowed." >&5
40236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40237        fi
40238        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40239      fi
40240    fi
40241
40242    # Now join together the path and the arguments once again
40243    if test "x$arguments" != xEOL; then
40244      new_complete="$new_path ${arguments% *}"
40245    else
40246      new_complete="$new_path"
40247    fi
40248
40249    if test "x$complete" != "x$new_complete"; then
40250      RC="$new_complete"
40251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40252$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40253    fi
40254  fi
40255
40256    # Extract the first word of "dumpbin", so it can be a program name with args.
40257set dummy dumpbin; ac_word=$2
40258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40259$as_echo_n "checking for $ac_word... " >&6; }
40260if ${ac_cv_prog_DUMPBIN+:} false; then :
40261  $as_echo_n "(cached) " >&6
40262else
40263  if test -n "$DUMPBIN"; then
40264  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40265else
40266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40267for as_dir in $PATH
40268do
40269  IFS=$as_save_IFS
40270  test -z "$as_dir" && as_dir=.
40271    for ac_exec_ext in '' $ac_executable_extensions; do
40272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40273    ac_cv_prog_DUMPBIN="dumpbin"
40274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40275    break 2
40276  fi
40277done
40278  done
40279IFS=$as_save_IFS
40280
40281fi
40282fi
40283DUMPBIN=$ac_cv_prog_DUMPBIN
40284if test -n "$DUMPBIN"; then
40285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40286$as_echo "$DUMPBIN" >&6; }
40287else
40288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40289$as_echo "no" >&6; }
40290fi
40291
40292
40293
40294  # Only process if variable expands to non-empty
40295
40296  if test "x$DUMPBIN" != x; then
40297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40298
40299  # First separate the path from the arguments. This will split at the first
40300  # space.
40301  complete="$DUMPBIN"
40302  path="${complete%% *}"
40303  tmp="$complete EOL"
40304  arguments="${tmp#* }"
40305
40306  # Input might be given as Windows format, start by converting to
40307  # unix format.
40308  new_path=`$CYGPATH -u "$path"`
40309
40310  # Now try to locate executable using which
40311  new_path=`$WHICH "$new_path" 2> /dev/null`
40312  # bat and cmd files are not always considered executable in cygwin causing which
40313  # to not find them
40314  if test "x$new_path" = x \
40315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40317    new_path=`$CYGPATH -u "$path"`
40318  fi
40319  if test "x$new_path" = x; then
40320    # Oops. Which didn't find the executable.
40321    # The splitting of arguments from the executable at a space might have been incorrect,
40322    # since paths with space are more likely in Windows. Give it another try with the whole
40323    # argument.
40324    path="$complete"
40325    arguments="EOL"
40326    new_path=`$CYGPATH -u "$path"`
40327    new_path=`$WHICH "$new_path" 2> /dev/null`
40328    # bat and cmd files are not always considered executable in cygwin causing which
40329    # to not find them
40330    if test "x$new_path" = x \
40331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40333      new_path=`$CYGPATH -u "$path"`
40334    fi
40335    if test "x$new_path" = x; then
40336      # It's still not found. Now this is an unrecoverable error.
40337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40338$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40339      has_space=`$ECHO "$complete" | $GREP " "`
40340      if test "x$has_space" != x; then
40341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40343      fi
40344      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40345    fi
40346  fi
40347
40348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40351  # "foo.exe" is OK but "foo" is an error.
40352  #
40353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40354  # It is also a way to make sure we got the proper file name for the real test later on.
40355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40356  if test "x$test_shortpath" = x; then
40357    # Short path failed, file does not exist as specified.
40358    # Try adding .exe or .cmd
40359    if test -f "${new_path}.exe"; then
40360      input_to_shortpath="${new_path}.exe"
40361    elif test -f "${new_path}.cmd"; then
40362      input_to_shortpath="${new_path}.cmd"
40363    else
40364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40365$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40368      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40369    fi
40370  else
40371    input_to_shortpath="$new_path"
40372  fi
40373
40374  # Call helper function which possibly converts this using DOS-style short mode.
40375  # If so, the updated path is stored in $new_path.
40376  new_path="$input_to_shortpath"
40377
40378  input_path="$input_to_shortpath"
40379  # Check if we need to convert this using DOS-style short mode. If the path
40380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40381  # take no chances and rewrite it.
40382  # Note: m4 eats our [], so we need to use [ and ] instead.
40383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40384  if test "x$has_forbidden_chars" != x; then
40385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40389      # Going to short mode and back again did indeed matter. Since short mode is
40390      # case insensitive, let's make it lowercase to improve readability.
40391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40392      # Now convert it back to Unix-style (cygpath)
40393      input_path=`$CYGPATH -u "$shortmode_path"`
40394      new_path="$input_path"
40395    fi
40396  fi
40397
40398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40399  if test "x$test_cygdrive_prefix" = x; then
40400    # As a simple fix, exclude /usr/bin since it's not a real path.
40401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40403      # a path prefixed by /cygdrive for fixpath to work.
40404      new_path="$CYGWIN_ROOT_PATH$input_path"
40405    fi
40406  fi
40407
40408  # remove trailing .exe if any
40409  new_path="${new_path/%.exe/}"
40410
40411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40412
40413  # First separate the path from the arguments. This will split at the first
40414  # space.
40415  complete="$DUMPBIN"
40416  path="${complete%% *}"
40417  tmp="$complete EOL"
40418  arguments="${tmp#* }"
40419
40420  # Input might be given as Windows format, start by converting to
40421  # unix format.
40422  new_path="$path"
40423
40424  windows_path="$new_path"
40425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40426    unix_path=`$CYGPATH -u "$windows_path"`
40427    new_path="$unix_path"
40428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40430    new_path="$unix_path"
40431  fi
40432
40433
40434  # Now try to locate executable using which
40435  new_path=`$WHICH "$new_path" 2> /dev/null`
40436
40437  if test "x$new_path" = x; then
40438    # Oops. Which didn't find the executable.
40439    # The splitting of arguments from the executable at a space might have been incorrect,
40440    # since paths with space are more likely in Windows. Give it another try with the whole
40441    # argument.
40442    path="$complete"
40443    arguments="EOL"
40444    new_path="$path"
40445
40446  windows_path="$new_path"
40447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40448    unix_path=`$CYGPATH -u "$windows_path"`
40449    new_path="$unix_path"
40450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40452    new_path="$unix_path"
40453  fi
40454
40455
40456    new_path=`$WHICH "$new_path" 2> /dev/null`
40457    # bat and cmd files are not always considered executable in MSYS causing which
40458    # to not find them
40459    if test "x$new_path" = x \
40460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40462      new_path="$path"
40463
40464  windows_path="$new_path"
40465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466    unix_path=`$CYGPATH -u "$windows_path"`
40467    new_path="$unix_path"
40468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470    new_path="$unix_path"
40471  fi
40472
40473    fi
40474
40475    if test "x$new_path" = x; then
40476      # It's still not found. Now this is an unrecoverable error.
40477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40478$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40479      has_space=`$ECHO "$complete" | $GREP " "`
40480      if test "x$has_space" != x; then
40481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40483      fi
40484      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40485    fi
40486  fi
40487
40488  # Now new_path has a complete unix path to the binary
40489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40490    # Keep paths in /bin as-is, but remove trailing .exe if any
40491    new_path="${new_path/%.exe/}"
40492    # Do not save /bin paths to all_fixpath_prefixes!
40493  else
40494    # Not in mixed or Windows style, start by that.
40495    new_path=`cmd //c echo $new_path`
40496
40497  input_path="$new_path"
40498  # Check if we need to convert this using DOS-style short mode. If the path
40499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40500  # take no chances and rewrite it.
40501  # Note: m4 eats our [], so we need to use [ and ] instead.
40502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40503  if test "x$has_forbidden_chars" != x; then
40504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40506  fi
40507
40508    # Output is in $new_path
40509
40510  windows_path="$new_path"
40511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40512    unix_path=`$CYGPATH -u "$windows_path"`
40513    new_path="$unix_path"
40514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40516    new_path="$unix_path"
40517  fi
40518
40519    # remove trailing .exe if any
40520    new_path="${new_path/%.exe/}"
40521
40522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40524  fi
40525
40526    else
40527      # We're on a unix platform. Hooray! :)
40528      # First separate the path from the arguments. This will split at the first
40529      # space.
40530      complete="$DUMPBIN"
40531      path="${complete%% *}"
40532      tmp="$complete EOL"
40533      arguments="${tmp#* }"
40534
40535      # Cannot rely on the command "which" here since it doesn't always work.
40536      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40537      if test -z "$is_absolute_path"; then
40538        # Path to executable is not absolute. Find it.
40539        IFS_save="$IFS"
40540        IFS=:
40541        for p in $PATH; do
40542          if test -f "$p/$path" && test -x "$p/$path"; then
40543            new_path="$p/$path"
40544            break
40545          fi
40546        done
40547        IFS="$IFS_save"
40548      else
40549        # This is an absolute path, we can use it without further modifications.
40550        new_path="$path"
40551      fi
40552
40553      if test "x$new_path" = x; then
40554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40555$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40556        has_space=`$ECHO "$complete" | $GREP " "`
40557        if test "x$has_space" != x; then
40558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40560        fi
40561        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40562      fi
40563    fi
40564
40565    # Now join together the path and the arguments once again
40566    if test "x$arguments" != xEOL; then
40567      new_complete="$new_path ${arguments% *}"
40568    else
40569      new_complete="$new_path"
40570    fi
40571
40572    if test "x$complete" != "x$new_complete"; then
40573      DUMPBIN="$new_complete"
40574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40575$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40576    fi
40577  fi
40578
40579    # We need to check for 'msbuild.exe' because at the place where we expect to
40580    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40581    # won't find the 'msbuild.exe' executable in that case (and the
40582    # 'ac_executable_extensions' is unusable due to performance reasons).
40583    # Notice that we intentionally don't fix up the path to MSBUILD because we
40584    # will call it in a DOS shell during freetype detection on Windows (see
40585    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40586    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40587set dummy msbuild.exe; ac_word=$2
40588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40589$as_echo_n "checking for $ac_word... " >&6; }
40590if ${ac_cv_prog_MSBUILD+:} false; then :
40591  $as_echo_n "(cached) " >&6
40592else
40593  if test -n "$MSBUILD"; then
40594  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40595else
40596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_prog_MSBUILD="msbuild.exe"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611fi
40612fi
40613MSBUILD=$ac_cv_prog_MSBUILD
40614if test -n "$MSBUILD"; then
40615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40616$as_echo "$MSBUILD" >&6; }
40617else
40618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40619$as_echo "no" >&6; }
40620fi
40621
40622
40623  fi
40624
40625  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40626
40627
40628  # Publish this variable in the help.
40629
40630
40631  if [ -z "${STRIP+x}" ]; then
40632    # The variable is not set by user, try to locate tool using the code snippet
40633    for ac_prog in strip
40634do
40635  # Extract the first word of "$ac_prog", so it can be a program name with args.
40636set dummy $ac_prog; ac_word=$2
40637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40638$as_echo_n "checking for $ac_word... " >&6; }
40639if ${ac_cv_path_STRIP+:} false; then :
40640  $as_echo_n "(cached) " >&6
40641else
40642  case $STRIP in
40643  [\\/]* | ?:[\\/]*)
40644  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40645  ;;
40646  *)
40647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40648for as_dir in $PATH
40649do
40650  IFS=$as_save_IFS
40651  test -z "$as_dir" && as_dir=.
40652    for ac_exec_ext in '' $ac_executable_extensions; do
40653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40654    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40656    break 2
40657  fi
40658done
40659  done
40660IFS=$as_save_IFS
40661
40662  ;;
40663esac
40664fi
40665STRIP=$ac_cv_path_STRIP
40666if test -n "$STRIP"; then
40667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40668$as_echo "$STRIP" >&6; }
40669else
40670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40671$as_echo "no" >&6; }
40672fi
40673
40674
40675  test -n "$STRIP" && break
40676done
40677
40678  else
40679    # The variable is set, but is it from the command line or the environment?
40680
40681    # Try to remove the string !STRIP! from our list.
40682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40684      # If it failed, the variable was not from the command line. Ignore it,
40685      # but warn the user (except for BASH, which is always set by the calling BASH).
40686      if test "xSTRIP" != xBASH; then
40687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40688$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40689      fi
40690      # Try to locate tool using the code snippet
40691      for ac_prog in strip
40692do
40693  # Extract the first word of "$ac_prog", so it can be a program name with args.
40694set dummy $ac_prog; ac_word=$2
40695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40696$as_echo_n "checking for $ac_word... " >&6; }
40697if ${ac_cv_path_STRIP+:} false; then :
40698  $as_echo_n "(cached) " >&6
40699else
40700  case $STRIP in
40701  [\\/]* | ?:[\\/]*)
40702  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40703  ;;
40704  *)
40705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40706for as_dir in $PATH
40707do
40708  IFS=$as_save_IFS
40709  test -z "$as_dir" && as_dir=.
40710    for ac_exec_ext in '' $ac_executable_extensions; do
40711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40712    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40714    break 2
40715  fi
40716done
40717  done
40718IFS=$as_save_IFS
40719
40720  ;;
40721esac
40722fi
40723STRIP=$ac_cv_path_STRIP
40724if test -n "$STRIP"; then
40725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40726$as_echo "$STRIP" >&6; }
40727else
40728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40729$as_echo "no" >&6; }
40730fi
40731
40732
40733  test -n "$STRIP" && break
40734done
40735
40736    else
40737      # If it succeeded, then it was overridden by the user. We will use it
40738      # for the tool.
40739
40740      # First remove it from the list of overridden variables, so we can test
40741      # for unknown variables in the end.
40742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40743
40744      # Check if we try to supply an empty value
40745      if test "x$STRIP" = x; then
40746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40747$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40749$as_echo_n "checking for STRIP... " >&6; }
40750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40751$as_echo "disabled" >&6; }
40752      else
40753        # Check if the provided tool contains a complete path.
40754        tool_specified="$STRIP"
40755        tool_basename="${tool_specified##*/}"
40756        if test "x$tool_basename" = "x$tool_specified"; then
40757          # A command without a complete path is provided, search $PATH.
40758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40759$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40760          # Extract the first word of "$tool_basename", so it can be a program name with args.
40761set dummy $tool_basename; ac_word=$2
40762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40763$as_echo_n "checking for $ac_word... " >&6; }
40764if ${ac_cv_path_STRIP+:} false; then :
40765  $as_echo_n "(cached) " >&6
40766else
40767  case $STRIP in
40768  [\\/]* | ?:[\\/]*)
40769  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40770  ;;
40771  *)
40772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40773for as_dir in $PATH
40774do
40775  IFS=$as_save_IFS
40776  test -z "$as_dir" && as_dir=.
40777    for ac_exec_ext in '' $ac_executable_extensions; do
40778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40779    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40781    break 2
40782  fi
40783done
40784  done
40785IFS=$as_save_IFS
40786
40787  ;;
40788esac
40789fi
40790STRIP=$ac_cv_path_STRIP
40791if test -n "$STRIP"; then
40792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40793$as_echo "$STRIP" >&6; }
40794else
40795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40796$as_echo "no" >&6; }
40797fi
40798
40799
40800          if test "x$STRIP" = x; then
40801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40802          fi
40803        else
40804          # Otherwise we believe it is a complete path. Use it as it is.
40805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40806$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40808$as_echo_n "checking for STRIP... " >&6; }
40809          if test ! -x "$tool_specified"; then
40810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40811$as_echo "not found" >&6; }
40812            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40813          fi
40814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40815$as_echo "$tool_specified" >&6; }
40816        fi
40817      fi
40818    fi
40819
40820  fi
40821
40822
40823
40824  # Only process if variable expands to non-empty
40825
40826  if test "x$STRIP" != x; then
40827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40828
40829  # First separate the path from the arguments. This will split at the first
40830  # space.
40831  complete="$STRIP"
40832  path="${complete%% *}"
40833  tmp="$complete EOL"
40834  arguments="${tmp#* }"
40835
40836  # Input might be given as Windows format, start by converting to
40837  # unix format.
40838  new_path=`$CYGPATH -u "$path"`
40839
40840  # Now try to locate executable using which
40841  new_path=`$WHICH "$new_path" 2> /dev/null`
40842  # bat and cmd files are not always considered executable in cygwin causing which
40843  # to not find them
40844  if test "x$new_path" = x \
40845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40847    new_path=`$CYGPATH -u "$path"`
40848  fi
40849  if test "x$new_path" = x; then
40850    # Oops. Which didn't find the executable.
40851    # The splitting of arguments from the executable at a space might have been incorrect,
40852    # since paths with space are more likely in Windows. Give it another try with the whole
40853    # argument.
40854    path="$complete"
40855    arguments="EOL"
40856    new_path=`$CYGPATH -u "$path"`
40857    new_path=`$WHICH "$new_path" 2> /dev/null`
40858    # bat and cmd files are not always considered executable in cygwin causing which
40859    # to not find them
40860    if test "x$new_path" = x \
40861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40863      new_path=`$CYGPATH -u "$path"`
40864    fi
40865    if test "x$new_path" = x; then
40866      # It's still not found. Now this is an unrecoverable error.
40867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40868$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40869      has_space=`$ECHO "$complete" | $GREP " "`
40870      if test "x$has_space" != x; then
40871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40873      fi
40874      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40875    fi
40876  fi
40877
40878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40881  # "foo.exe" is OK but "foo" is an error.
40882  #
40883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40884  # It is also a way to make sure we got the proper file name for the real test later on.
40885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40886  if test "x$test_shortpath" = x; then
40887    # Short path failed, file does not exist as specified.
40888    # Try adding .exe or .cmd
40889    if test -f "${new_path}.exe"; then
40890      input_to_shortpath="${new_path}.exe"
40891    elif test -f "${new_path}.cmd"; then
40892      input_to_shortpath="${new_path}.cmd"
40893    else
40894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40895$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40898      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40899    fi
40900  else
40901    input_to_shortpath="$new_path"
40902  fi
40903
40904  # Call helper function which possibly converts this using DOS-style short mode.
40905  # If so, the updated path is stored in $new_path.
40906  new_path="$input_to_shortpath"
40907
40908  input_path="$input_to_shortpath"
40909  # Check if we need to convert this using DOS-style short mode. If the path
40910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40911  # take no chances and rewrite it.
40912  # Note: m4 eats our [], so we need to use [ and ] instead.
40913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40914  if test "x$has_forbidden_chars" != x; then
40915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40919      # Going to short mode and back again did indeed matter. Since short mode is
40920      # case insensitive, let's make it lowercase to improve readability.
40921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40922      # Now convert it back to Unix-style (cygpath)
40923      input_path=`$CYGPATH -u "$shortmode_path"`
40924      new_path="$input_path"
40925    fi
40926  fi
40927
40928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40929  if test "x$test_cygdrive_prefix" = x; then
40930    # As a simple fix, exclude /usr/bin since it's not a real path.
40931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40933      # a path prefixed by /cygdrive for fixpath to work.
40934      new_path="$CYGWIN_ROOT_PATH$input_path"
40935    fi
40936  fi
40937
40938  # remove trailing .exe if any
40939  new_path="${new_path/%.exe/}"
40940
40941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40942
40943  # First separate the path from the arguments. This will split at the first
40944  # space.
40945  complete="$STRIP"
40946  path="${complete%% *}"
40947  tmp="$complete EOL"
40948  arguments="${tmp#* }"
40949
40950  # Input might be given as Windows format, start by converting to
40951  # unix format.
40952  new_path="$path"
40953
40954  windows_path="$new_path"
40955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40956    unix_path=`$CYGPATH -u "$windows_path"`
40957    new_path="$unix_path"
40958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40960    new_path="$unix_path"
40961  fi
40962
40963
40964  # Now try to locate executable using which
40965  new_path=`$WHICH "$new_path" 2> /dev/null`
40966
40967  if test "x$new_path" = x; then
40968    # Oops. Which didn't find the executable.
40969    # The splitting of arguments from the executable at a space might have been incorrect,
40970    # since paths with space are more likely in Windows. Give it another try with the whole
40971    # argument.
40972    path="$complete"
40973    arguments="EOL"
40974    new_path="$path"
40975
40976  windows_path="$new_path"
40977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40978    unix_path=`$CYGPATH -u "$windows_path"`
40979    new_path="$unix_path"
40980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40982    new_path="$unix_path"
40983  fi
40984
40985
40986    new_path=`$WHICH "$new_path" 2> /dev/null`
40987    # bat and cmd files are not always considered executable in MSYS causing which
40988    # to not find them
40989    if test "x$new_path" = x \
40990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40992      new_path="$path"
40993
40994  windows_path="$new_path"
40995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40996    unix_path=`$CYGPATH -u "$windows_path"`
40997    new_path="$unix_path"
40998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41000    new_path="$unix_path"
41001  fi
41002
41003    fi
41004
41005    if test "x$new_path" = x; then
41006      # It's still not found. Now this is an unrecoverable error.
41007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41008$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41009      has_space=`$ECHO "$complete" | $GREP " "`
41010      if test "x$has_space" != x; then
41011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41013      fi
41014      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41015    fi
41016  fi
41017
41018  # Now new_path has a complete unix path to the binary
41019  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41020    # Keep paths in /bin as-is, but remove trailing .exe if any
41021    new_path="${new_path/%.exe/}"
41022    # Do not save /bin paths to all_fixpath_prefixes!
41023  else
41024    # Not in mixed or Windows style, start by that.
41025    new_path=`cmd //c echo $new_path`
41026
41027  input_path="$new_path"
41028  # Check if we need to convert this using DOS-style short mode. If the path
41029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41030  # take no chances and rewrite it.
41031  # Note: m4 eats our [], so we need to use [ and ] instead.
41032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41033  if test "x$has_forbidden_chars" != x; then
41034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41036  fi
41037
41038    # Output is in $new_path
41039
41040  windows_path="$new_path"
41041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41042    unix_path=`$CYGPATH -u "$windows_path"`
41043    new_path="$unix_path"
41044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41046    new_path="$unix_path"
41047  fi
41048
41049    # remove trailing .exe if any
41050    new_path="${new_path/%.exe/}"
41051
41052    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41053    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41054  fi
41055
41056    else
41057      # We're on a unix platform. Hooray! :)
41058      # First separate the path from the arguments. This will split at the first
41059      # space.
41060      complete="$STRIP"
41061      path="${complete%% *}"
41062      tmp="$complete EOL"
41063      arguments="${tmp#* }"
41064
41065      # Cannot rely on the command "which" here since it doesn't always work.
41066      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41067      if test -z "$is_absolute_path"; then
41068        # Path to executable is not absolute. Find it.
41069        IFS_save="$IFS"
41070        IFS=:
41071        for p in $PATH; do
41072          if test -f "$p/$path" && test -x "$p/$path"; then
41073            new_path="$p/$path"
41074            break
41075          fi
41076        done
41077        IFS="$IFS_save"
41078      else
41079        # This is an absolute path, we can use it without further modifications.
41080        new_path="$path"
41081      fi
41082
41083      if test "x$new_path" = x; then
41084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41085$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41086        has_space=`$ECHO "$complete" | $GREP " "`
41087        if test "x$has_space" != x; then
41088          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41089$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41090        fi
41091        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41092      fi
41093    fi
41094
41095    # Now join together the path and the arguments once again
41096    if test "x$arguments" != xEOL; then
41097      new_complete="$new_path ${arguments% *}"
41098    else
41099      new_complete="$new_path"
41100    fi
41101
41102    if test "x$complete" != "x$new_complete"; then
41103      STRIP="$new_complete"
41104      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41105$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41106    fi
41107  fi
41108
41109
41110
41111  # Publish this variable in the help.
41112
41113
41114  if [ -z "${NM+x}" ]; then
41115    # The variable is not set by user, try to locate tool using the code snippet
41116    for ac_prog in nm
41117do
41118  # Extract the first word of "$ac_prog", so it can be a program name with args.
41119set dummy $ac_prog; ac_word=$2
41120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41121$as_echo_n "checking for $ac_word... " >&6; }
41122if ${ac_cv_path_NM+:} false; then :
41123  $as_echo_n "(cached) " >&6
41124else
41125  case $NM in
41126  [\\/]* | ?:[\\/]*)
41127  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41128  ;;
41129  *)
41130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41131for as_dir in $PATH
41132do
41133  IFS=$as_save_IFS
41134  test -z "$as_dir" && as_dir=.
41135    for ac_exec_ext in '' $ac_executable_extensions; do
41136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41137    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41139    break 2
41140  fi
41141done
41142  done
41143IFS=$as_save_IFS
41144
41145  ;;
41146esac
41147fi
41148NM=$ac_cv_path_NM
41149if test -n "$NM"; then
41150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41151$as_echo "$NM" >&6; }
41152else
41153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41154$as_echo "no" >&6; }
41155fi
41156
41157
41158  test -n "$NM" && break
41159done
41160
41161  else
41162    # The variable is set, but is it from the command line or the environment?
41163
41164    # Try to remove the string !NM! from our list.
41165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41167      # If it failed, the variable was not from the command line. Ignore it,
41168      # but warn the user (except for BASH, which is always set by the calling BASH).
41169      if test "xNM" != xBASH; then
41170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41171$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41172      fi
41173      # Try to locate tool using the code snippet
41174      for ac_prog in nm
41175do
41176  # Extract the first word of "$ac_prog", so it can be a program name with args.
41177set dummy $ac_prog; ac_word=$2
41178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41179$as_echo_n "checking for $ac_word... " >&6; }
41180if ${ac_cv_path_NM+:} false; then :
41181  $as_echo_n "(cached) " >&6
41182else
41183  case $NM in
41184  [\\/]* | ?:[\\/]*)
41185  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41186  ;;
41187  *)
41188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41189for as_dir in $PATH
41190do
41191  IFS=$as_save_IFS
41192  test -z "$as_dir" && as_dir=.
41193    for ac_exec_ext in '' $ac_executable_extensions; do
41194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41195    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41197    break 2
41198  fi
41199done
41200  done
41201IFS=$as_save_IFS
41202
41203  ;;
41204esac
41205fi
41206NM=$ac_cv_path_NM
41207if test -n "$NM"; then
41208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41209$as_echo "$NM" >&6; }
41210else
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41212$as_echo "no" >&6; }
41213fi
41214
41215
41216  test -n "$NM" && break
41217done
41218
41219    else
41220      # If it succeeded, then it was overridden by the user. We will use it
41221      # for the tool.
41222
41223      # First remove it from the list of overridden variables, so we can test
41224      # for unknown variables in the end.
41225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41226
41227      # Check if we try to supply an empty value
41228      if test "x$NM" = x; then
41229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41230$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41232$as_echo_n "checking for NM... " >&6; }
41233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41234$as_echo "disabled" >&6; }
41235      else
41236        # Check if the provided tool contains a complete path.
41237        tool_specified="$NM"
41238        tool_basename="${tool_specified##*/}"
41239        if test "x$tool_basename" = "x$tool_specified"; then
41240          # A command without a complete path is provided, search $PATH.
41241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41242$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41243          # Extract the first word of "$tool_basename", so it can be a program name with args.
41244set dummy $tool_basename; ac_word=$2
41245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41246$as_echo_n "checking for $ac_word... " >&6; }
41247if ${ac_cv_path_NM+:} false; then :
41248  $as_echo_n "(cached) " >&6
41249else
41250  case $NM in
41251  [\\/]* | ?:[\\/]*)
41252  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41253  ;;
41254  *)
41255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41256for as_dir in $PATH
41257do
41258  IFS=$as_save_IFS
41259  test -z "$as_dir" && as_dir=.
41260    for ac_exec_ext in '' $ac_executable_extensions; do
41261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41262    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41264    break 2
41265  fi
41266done
41267  done
41268IFS=$as_save_IFS
41269
41270  ;;
41271esac
41272fi
41273NM=$ac_cv_path_NM
41274if test -n "$NM"; then
41275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41276$as_echo "$NM" >&6; }
41277else
41278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41279$as_echo "no" >&6; }
41280fi
41281
41282
41283          if test "x$NM" = x; then
41284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41285          fi
41286        else
41287          # Otherwise we believe it is a complete path. Use it as it is.
41288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41289$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41291$as_echo_n "checking for NM... " >&6; }
41292          if test ! -x "$tool_specified"; then
41293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41294$as_echo "not found" >&6; }
41295            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41296          fi
41297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41298$as_echo "$tool_specified" >&6; }
41299        fi
41300      fi
41301    fi
41302
41303  fi
41304
41305
41306
41307  # Only process if variable expands to non-empty
41308
41309  if test "x$NM" != x; then
41310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41311
41312  # First separate the path from the arguments. This will split at the first
41313  # space.
41314  complete="$NM"
41315  path="${complete%% *}"
41316  tmp="$complete EOL"
41317  arguments="${tmp#* }"
41318
41319  # Input might be given as Windows format, start by converting to
41320  # unix format.
41321  new_path=`$CYGPATH -u "$path"`
41322
41323  # Now try to locate executable using which
41324  new_path=`$WHICH "$new_path" 2> /dev/null`
41325  # bat and cmd files are not always considered executable in cygwin causing which
41326  # to not find them
41327  if test "x$new_path" = x \
41328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41330    new_path=`$CYGPATH -u "$path"`
41331  fi
41332  if test "x$new_path" = x; then
41333    # Oops. Which didn't find the executable.
41334    # The splitting of arguments from the executable at a space might have been incorrect,
41335    # since paths with space are more likely in Windows. Give it another try with the whole
41336    # argument.
41337    path="$complete"
41338    arguments="EOL"
41339    new_path=`$CYGPATH -u "$path"`
41340    new_path=`$WHICH "$new_path" 2> /dev/null`
41341    # bat and cmd files are not always considered executable in cygwin causing which
41342    # to not find them
41343    if test "x$new_path" = x \
41344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41346      new_path=`$CYGPATH -u "$path"`
41347    fi
41348    if test "x$new_path" = x; then
41349      # It's still not found. Now this is an unrecoverable error.
41350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41351$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41352      has_space=`$ECHO "$complete" | $GREP " "`
41353      if test "x$has_space" != x; then
41354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41356      fi
41357      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41358    fi
41359  fi
41360
41361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41364  # "foo.exe" is OK but "foo" is an error.
41365  #
41366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41367  # It is also a way to make sure we got the proper file name for the real test later on.
41368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41369  if test "x$test_shortpath" = x; then
41370    # Short path failed, file does not exist as specified.
41371    # Try adding .exe or .cmd
41372    if test -f "${new_path}.exe"; then
41373      input_to_shortpath="${new_path}.exe"
41374    elif test -f "${new_path}.cmd"; then
41375      input_to_shortpath="${new_path}.cmd"
41376    else
41377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41378$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41381      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41382    fi
41383  else
41384    input_to_shortpath="$new_path"
41385  fi
41386
41387  # Call helper function which possibly converts this using DOS-style short mode.
41388  # If so, the updated path is stored in $new_path.
41389  new_path="$input_to_shortpath"
41390
41391  input_path="$input_to_shortpath"
41392  # Check if we need to convert this using DOS-style short mode. If the path
41393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41394  # take no chances and rewrite it.
41395  # Note: m4 eats our [], so we need to use [ and ] instead.
41396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41397  if test "x$has_forbidden_chars" != x; then
41398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41402      # Going to short mode and back again did indeed matter. Since short mode is
41403      # case insensitive, let's make it lowercase to improve readability.
41404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41405      # Now convert it back to Unix-style (cygpath)
41406      input_path=`$CYGPATH -u "$shortmode_path"`
41407      new_path="$input_path"
41408    fi
41409  fi
41410
41411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41412  if test "x$test_cygdrive_prefix" = x; then
41413    # As a simple fix, exclude /usr/bin since it's not a real path.
41414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41416      # a path prefixed by /cygdrive for fixpath to work.
41417      new_path="$CYGWIN_ROOT_PATH$input_path"
41418    fi
41419  fi
41420
41421  # remove trailing .exe if any
41422  new_path="${new_path/%.exe/}"
41423
41424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41425
41426  # First separate the path from the arguments. This will split at the first
41427  # space.
41428  complete="$NM"
41429  path="${complete%% *}"
41430  tmp="$complete EOL"
41431  arguments="${tmp#* }"
41432
41433  # Input might be given as Windows format, start by converting to
41434  # unix format.
41435  new_path="$path"
41436
41437  windows_path="$new_path"
41438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41439    unix_path=`$CYGPATH -u "$windows_path"`
41440    new_path="$unix_path"
41441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41443    new_path="$unix_path"
41444  fi
41445
41446
41447  # Now try to locate executable using which
41448  new_path=`$WHICH "$new_path" 2> /dev/null`
41449
41450  if test "x$new_path" = x; then
41451    # Oops. Which didn't find the executable.
41452    # The splitting of arguments from the executable at a space might have been incorrect,
41453    # since paths with space are more likely in Windows. Give it another try with the whole
41454    # argument.
41455    path="$complete"
41456    arguments="EOL"
41457    new_path="$path"
41458
41459  windows_path="$new_path"
41460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41461    unix_path=`$CYGPATH -u "$windows_path"`
41462    new_path="$unix_path"
41463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41465    new_path="$unix_path"
41466  fi
41467
41468
41469    new_path=`$WHICH "$new_path" 2> /dev/null`
41470    # bat and cmd files are not always considered executable in MSYS causing which
41471    # to not find them
41472    if test "x$new_path" = x \
41473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41475      new_path="$path"
41476
41477  windows_path="$new_path"
41478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41479    unix_path=`$CYGPATH -u "$windows_path"`
41480    new_path="$unix_path"
41481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41483    new_path="$unix_path"
41484  fi
41485
41486    fi
41487
41488    if test "x$new_path" = x; then
41489      # It's still not found. Now this is an unrecoverable error.
41490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41492      has_space=`$ECHO "$complete" | $GREP " "`
41493      if test "x$has_space" != x; then
41494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41496      fi
41497      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41498    fi
41499  fi
41500
41501  # Now new_path has a complete unix path to the binary
41502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41503    # Keep paths in /bin as-is, but remove trailing .exe if any
41504    new_path="${new_path/%.exe/}"
41505    # Do not save /bin paths to all_fixpath_prefixes!
41506  else
41507    # Not in mixed or Windows style, start by that.
41508    new_path=`cmd //c echo $new_path`
41509
41510  input_path="$new_path"
41511  # Check if we need to convert this using DOS-style short mode. If the path
41512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41513  # take no chances and rewrite it.
41514  # Note: m4 eats our [], so we need to use [ and ] instead.
41515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41516  if test "x$has_forbidden_chars" != x; then
41517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41519  fi
41520
41521    # Output is in $new_path
41522
41523  windows_path="$new_path"
41524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41525    unix_path=`$CYGPATH -u "$windows_path"`
41526    new_path="$unix_path"
41527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41529    new_path="$unix_path"
41530  fi
41531
41532    # remove trailing .exe if any
41533    new_path="${new_path/%.exe/}"
41534
41535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41537  fi
41538
41539    else
41540      # We're on a unix platform. Hooray! :)
41541      # First separate the path from the arguments. This will split at the first
41542      # space.
41543      complete="$NM"
41544      path="${complete%% *}"
41545      tmp="$complete EOL"
41546      arguments="${tmp#* }"
41547
41548      # Cannot rely on the command "which" here since it doesn't always work.
41549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41550      if test -z "$is_absolute_path"; then
41551        # Path to executable is not absolute. Find it.
41552        IFS_save="$IFS"
41553        IFS=:
41554        for p in $PATH; do
41555          if test -f "$p/$path" && test -x "$p/$path"; then
41556            new_path="$p/$path"
41557            break
41558          fi
41559        done
41560        IFS="$IFS_save"
41561      else
41562        # This is an absolute path, we can use it without further modifications.
41563        new_path="$path"
41564      fi
41565
41566      if test "x$new_path" = x; then
41567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41568$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41569        has_space=`$ECHO "$complete" | $GREP " "`
41570        if test "x$has_space" != x; then
41571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41573        fi
41574        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41575      fi
41576    fi
41577
41578    # Now join together the path and the arguments once again
41579    if test "x$arguments" != xEOL; then
41580      new_complete="$new_path ${arguments% *}"
41581    else
41582      new_complete="$new_path"
41583    fi
41584
41585    if test "x$complete" != "x$new_complete"; then
41586      NM="$new_complete"
41587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41588$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41589    fi
41590  fi
41591
41592
41593
41594  # Publish this variable in the help.
41595
41596
41597  if [ -z "${GNM+x}" ]; then
41598    # The variable is not set by user, try to locate tool using the code snippet
41599    for ac_prog in gnm
41600do
41601  # Extract the first word of "$ac_prog", so it can be a program name with args.
41602set dummy $ac_prog; ac_word=$2
41603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41604$as_echo_n "checking for $ac_word... " >&6; }
41605if ${ac_cv_path_GNM+:} false; then :
41606  $as_echo_n "(cached) " >&6
41607else
41608  case $GNM in
41609  [\\/]* | ?:[\\/]*)
41610  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41611  ;;
41612  *)
41613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41614for as_dir in $PATH
41615do
41616  IFS=$as_save_IFS
41617  test -z "$as_dir" && as_dir=.
41618    for ac_exec_ext in '' $ac_executable_extensions; do
41619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41620    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41622    break 2
41623  fi
41624done
41625  done
41626IFS=$as_save_IFS
41627
41628  ;;
41629esac
41630fi
41631GNM=$ac_cv_path_GNM
41632if test -n "$GNM"; then
41633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41634$as_echo "$GNM" >&6; }
41635else
41636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41637$as_echo "no" >&6; }
41638fi
41639
41640
41641  test -n "$GNM" && break
41642done
41643
41644  else
41645    # The variable is set, but is it from the command line or the environment?
41646
41647    # Try to remove the string !GNM! from our list.
41648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41650      # If it failed, the variable was not from the command line. Ignore it,
41651      # but warn the user (except for BASH, which is always set by the calling BASH).
41652      if test "xGNM" != xBASH; then
41653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41654$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41655      fi
41656      # Try to locate tool using the code snippet
41657      for ac_prog in gnm
41658do
41659  # Extract the first word of "$ac_prog", so it can be a program name with args.
41660set dummy $ac_prog; ac_word=$2
41661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41662$as_echo_n "checking for $ac_word... " >&6; }
41663if ${ac_cv_path_GNM+:} false; then :
41664  $as_echo_n "(cached) " >&6
41665else
41666  case $GNM in
41667  [\\/]* | ?:[\\/]*)
41668  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41669  ;;
41670  *)
41671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41672for as_dir in $PATH
41673do
41674  IFS=$as_save_IFS
41675  test -z "$as_dir" && as_dir=.
41676    for ac_exec_ext in '' $ac_executable_extensions; do
41677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41678    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41680    break 2
41681  fi
41682done
41683  done
41684IFS=$as_save_IFS
41685
41686  ;;
41687esac
41688fi
41689GNM=$ac_cv_path_GNM
41690if test -n "$GNM"; then
41691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41692$as_echo "$GNM" >&6; }
41693else
41694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41695$as_echo "no" >&6; }
41696fi
41697
41698
41699  test -n "$GNM" && break
41700done
41701
41702    else
41703      # If it succeeded, then it was overridden by the user. We will use it
41704      # for the tool.
41705
41706      # First remove it from the list of overridden variables, so we can test
41707      # for unknown variables in the end.
41708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41709
41710      # Check if we try to supply an empty value
41711      if test "x$GNM" = x; then
41712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41713$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41715$as_echo_n "checking for GNM... " >&6; }
41716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41717$as_echo "disabled" >&6; }
41718      else
41719        # Check if the provided tool contains a complete path.
41720        tool_specified="$GNM"
41721        tool_basename="${tool_specified##*/}"
41722        if test "x$tool_basename" = "x$tool_specified"; then
41723          # A command without a complete path is provided, search $PATH.
41724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41725$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41726          # Extract the first word of "$tool_basename", so it can be a program name with args.
41727set dummy $tool_basename; ac_word=$2
41728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41729$as_echo_n "checking for $ac_word... " >&6; }
41730if ${ac_cv_path_GNM+:} false; then :
41731  $as_echo_n "(cached) " >&6
41732else
41733  case $GNM in
41734  [\\/]* | ?:[\\/]*)
41735  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41736  ;;
41737  *)
41738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41739for as_dir in $PATH
41740do
41741  IFS=$as_save_IFS
41742  test -z "$as_dir" && as_dir=.
41743    for ac_exec_ext in '' $ac_executable_extensions; do
41744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41745    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41747    break 2
41748  fi
41749done
41750  done
41751IFS=$as_save_IFS
41752
41753  ;;
41754esac
41755fi
41756GNM=$ac_cv_path_GNM
41757if test -n "$GNM"; then
41758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41759$as_echo "$GNM" >&6; }
41760else
41761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41762$as_echo "no" >&6; }
41763fi
41764
41765
41766          if test "x$GNM" = x; then
41767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41768          fi
41769        else
41770          # Otherwise we believe it is a complete path. Use it as it is.
41771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41772$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41774$as_echo_n "checking for GNM... " >&6; }
41775          if test ! -x "$tool_specified"; then
41776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41777$as_echo "not found" >&6; }
41778            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41779          fi
41780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41781$as_echo "$tool_specified" >&6; }
41782        fi
41783      fi
41784    fi
41785
41786  fi
41787
41788
41789
41790  # Only process if variable expands to non-empty
41791
41792  if test "x$GNM" != x; then
41793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41794
41795  # First separate the path from the arguments. This will split at the first
41796  # space.
41797  complete="$GNM"
41798  path="${complete%% *}"
41799  tmp="$complete EOL"
41800  arguments="${tmp#* }"
41801
41802  # Input might be given as Windows format, start by converting to
41803  # unix format.
41804  new_path=`$CYGPATH -u "$path"`
41805
41806  # Now try to locate executable using which
41807  new_path=`$WHICH "$new_path" 2> /dev/null`
41808  # bat and cmd files are not always considered executable in cygwin causing which
41809  # to not find them
41810  if test "x$new_path" = x \
41811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41813    new_path=`$CYGPATH -u "$path"`
41814  fi
41815  if test "x$new_path" = x; then
41816    # Oops. Which didn't find the executable.
41817    # The splitting of arguments from the executable at a space might have been incorrect,
41818    # since paths with space are more likely in Windows. Give it another try with the whole
41819    # argument.
41820    path="$complete"
41821    arguments="EOL"
41822    new_path=`$CYGPATH -u "$path"`
41823    new_path=`$WHICH "$new_path" 2> /dev/null`
41824    # bat and cmd files are not always considered executable in cygwin causing which
41825    # to not find them
41826    if test "x$new_path" = x \
41827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41829      new_path=`$CYGPATH -u "$path"`
41830    fi
41831    if test "x$new_path" = x; then
41832      # It's still not found. Now this is an unrecoverable error.
41833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41834$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41835      has_space=`$ECHO "$complete" | $GREP " "`
41836      if test "x$has_space" != x; then
41837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41839      fi
41840      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41841    fi
41842  fi
41843
41844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41847  # "foo.exe" is OK but "foo" is an error.
41848  #
41849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41850  # It is also a way to make sure we got the proper file name for the real test later on.
41851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41852  if test "x$test_shortpath" = x; then
41853    # Short path failed, file does not exist as specified.
41854    # Try adding .exe or .cmd
41855    if test -f "${new_path}.exe"; then
41856      input_to_shortpath="${new_path}.exe"
41857    elif test -f "${new_path}.cmd"; then
41858      input_to_shortpath="${new_path}.cmd"
41859    else
41860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41861$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41864      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41865    fi
41866  else
41867    input_to_shortpath="$new_path"
41868  fi
41869
41870  # Call helper function which possibly converts this using DOS-style short mode.
41871  # If so, the updated path is stored in $new_path.
41872  new_path="$input_to_shortpath"
41873
41874  input_path="$input_to_shortpath"
41875  # Check if we need to convert this using DOS-style short mode. If the path
41876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41877  # take no chances and rewrite it.
41878  # Note: m4 eats our [], so we need to use [ and ] instead.
41879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41880  if test "x$has_forbidden_chars" != x; then
41881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41885      # Going to short mode and back again did indeed matter. Since short mode is
41886      # case insensitive, let's make it lowercase to improve readability.
41887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41888      # Now convert it back to Unix-style (cygpath)
41889      input_path=`$CYGPATH -u "$shortmode_path"`
41890      new_path="$input_path"
41891    fi
41892  fi
41893
41894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41895  if test "x$test_cygdrive_prefix" = x; then
41896    # As a simple fix, exclude /usr/bin since it's not a real path.
41897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41899      # a path prefixed by /cygdrive for fixpath to work.
41900      new_path="$CYGWIN_ROOT_PATH$input_path"
41901    fi
41902  fi
41903
41904  # remove trailing .exe if any
41905  new_path="${new_path/%.exe/}"
41906
41907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41908
41909  # First separate the path from the arguments. This will split at the first
41910  # space.
41911  complete="$GNM"
41912  path="${complete%% *}"
41913  tmp="$complete EOL"
41914  arguments="${tmp#* }"
41915
41916  # Input might be given as Windows format, start by converting to
41917  # unix format.
41918  new_path="$path"
41919
41920  windows_path="$new_path"
41921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41922    unix_path=`$CYGPATH -u "$windows_path"`
41923    new_path="$unix_path"
41924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41926    new_path="$unix_path"
41927  fi
41928
41929
41930  # Now try to locate executable using which
41931  new_path=`$WHICH "$new_path" 2> /dev/null`
41932
41933  if test "x$new_path" = x; then
41934    # Oops. Which didn't find the executable.
41935    # The splitting of arguments from the executable at a space might have been incorrect,
41936    # since paths with space are more likely in Windows. Give it another try with the whole
41937    # argument.
41938    path="$complete"
41939    arguments="EOL"
41940    new_path="$path"
41941
41942  windows_path="$new_path"
41943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41944    unix_path=`$CYGPATH -u "$windows_path"`
41945    new_path="$unix_path"
41946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41948    new_path="$unix_path"
41949  fi
41950
41951
41952    new_path=`$WHICH "$new_path" 2> /dev/null`
41953    # bat and cmd files are not always considered executable in MSYS causing which
41954    # to not find them
41955    if test "x$new_path" = x \
41956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41958      new_path="$path"
41959
41960  windows_path="$new_path"
41961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41962    unix_path=`$CYGPATH -u "$windows_path"`
41963    new_path="$unix_path"
41964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41966    new_path="$unix_path"
41967  fi
41968
41969    fi
41970
41971    if test "x$new_path" = x; then
41972      # It's still not found. Now this is an unrecoverable error.
41973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41974$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41975      has_space=`$ECHO "$complete" | $GREP " "`
41976      if test "x$has_space" != x; then
41977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41979      fi
41980      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41981    fi
41982  fi
41983
41984  # Now new_path has a complete unix path to the binary
41985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41986    # Keep paths in /bin as-is, but remove trailing .exe if any
41987    new_path="${new_path/%.exe/}"
41988    # Do not save /bin paths to all_fixpath_prefixes!
41989  else
41990    # Not in mixed or Windows style, start by that.
41991    new_path=`cmd //c echo $new_path`
41992
41993  input_path="$new_path"
41994  # Check if we need to convert this using DOS-style short mode. If the path
41995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41996  # take no chances and rewrite it.
41997  # Note: m4 eats our [], so we need to use [ and ] instead.
41998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41999  if test "x$has_forbidden_chars" != x; then
42000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42002  fi
42003
42004    # Output is in $new_path
42005
42006  windows_path="$new_path"
42007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42008    unix_path=`$CYGPATH -u "$windows_path"`
42009    new_path="$unix_path"
42010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42012    new_path="$unix_path"
42013  fi
42014
42015    # remove trailing .exe if any
42016    new_path="${new_path/%.exe/}"
42017
42018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42020  fi
42021
42022    else
42023      # We're on a unix platform. Hooray! :)
42024      # First separate the path from the arguments. This will split at the first
42025      # space.
42026      complete="$GNM"
42027      path="${complete%% *}"
42028      tmp="$complete EOL"
42029      arguments="${tmp#* }"
42030
42031      # Cannot rely on the command "which" here since it doesn't always work.
42032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42033      if test -z "$is_absolute_path"; then
42034        # Path to executable is not absolute. Find it.
42035        IFS_save="$IFS"
42036        IFS=:
42037        for p in $PATH; do
42038          if test -f "$p/$path" && test -x "$p/$path"; then
42039            new_path="$p/$path"
42040            break
42041          fi
42042        done
42043        IFS="$IFS_save"
42044      else
42045        # This is an absolute path, we can use it without further modifications.
42046        new_path="$path"
42047      fi
42048
42049      if test "x$new_path" = x; then
42050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42051$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42052        has_space=`$ECHO "$complete" | $GREP " "`
42053        if test "x$has_space" != x; then
42054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42056        fi
42057        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42058      fi
42059    fi
42060
42061    # Now join together the path and the arguments once again
42062    if test "x$arguments" != xEOL; then
42063      new_complete="$new_path ${arguments% *}"
42064    else
42065      new_complete="$new_path"
42066    fi
42067
42068    if test "x$complete" != "x$new_complete"; then
42069      GNM="$new_complete"
42070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42071$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42072    fi
42073  fi
42074
42075  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42076    # FIXME: we should unify this with the solaris case above.
42077
42078
42079  # Publish this variable in the help.
42080
42081
42082  if [ -z "${STRIP+x}" ]; then
42083    # The variable is not set by user, try to locate tool using the code snippet
42084    if test -n "$ac_tool_prefix"; then
42085  for ac_prog in strip
42086  do
42087    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42090$as_echo_n "checking for $ac_word... " >&6; }
42091if ${ac_cv_prog_STRIP+:} false; then :
42092  $as_echo_n "(cached) " >&6
42093else
42094  if test -n "$STRIP"; then
42095  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42096else
42097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42098for as_dir in $PATH
42099do
42100  IFS=$as_save_IFS
42101  test -z "$as_dir" && as_dir=.
42102    for ac_exec_ext in '' $ac_executable_extensions; do
42103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42104    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42106    break 2
42107  fi
42108done
42109  done
42110IFS=$as_save_IFS
42111
42112fi
42113fi
42114STRIP=$ac_cv_prog_STRIP
42115if test -n "$STRIP"; then
42116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42117$as_echo "$STRIP" >&6; }
42118else
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42120$as_echo "no" >&6; }
42121fi
42122
42123
42124    test -n "$STRIP" && break
42125  done
42126fi
42127if test -z "$STRIP"; then
42128  ac_ct_STRIP=$STRIP
42129  for ac_prog in strip
42130do
42131  # Extract the first word of "$ac_prog", so it can be a program name with args.
42132set dummy $ac_prog; ac_word=$2
42133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42134$as_echo_n "checking for $ac_word... " >&6; }
42135if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42136  $as_echo_n "(cached) " >&6
42137else
42138  if test -n "$ac_ct_STRIP"; then
42139  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42140else
42141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42142for as_dir in $PATH
42143do
42144  IFS=$as_save_IFS
42145  test -z "$as_dir" && as_dir=.
42146    for ac_exec_ext in '' $ac_executable_extensions; do
42147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42148    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42150    break 2
42151  fi
42152done
42153  done
42154IFS=$as_save_IFS
42155
42156fi
42157fi
42158ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42159if test -n "$ac_ct_STRIP"; then
42160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42161$as_echo "$ac_ct_STRIP" >&6; }
42162else
42163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42164$as_echo "no" >&6; }
42165fi
42166
42167
42168  test -n "$ac_ct_STRIP" && break
42169done
42170
42171  if test "x$ac_ct_STRIP" = x; then
42172    STRIP=""
42173  else
42174    case $cross_compiling:$ac_tool_warned in
42175yes:)
42176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42178ac_tool_warned=yes ;;
42179esac
42180    STRIP=$ac_ct_STRIP
42181  fi
42182fi
42183
42184  else
42185    # The variable is set, but is it from the command line or the environment?
42186
42187    # Try to remove the string !STRIP! from our list.
42188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42190      # If it failed, the variable was not from the command line. Ignore it,
42191      # but warn the user (except for BASH, which is always set by the calling BASH).
42192      if test "xSTRIP" != xBASH; then
42193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42194$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42195      fi
42196      # Try to locate tool using the code snippet
42197      if test -n "$ac_tool_prefix"; then
42198  for ac_prog in strip
42199  do
42200    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42203$as_echo_n "checking for $ac_word... " >&6; }
42204if ${ac_cv_prog_STRIP+:} false; then :
42205  $as_echo_n "(cached) " >&6
42206else
42207  if test -n "$STRIP"; then
42208  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42209else
42210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42211for as_dir in $PATH
42212do
42213  IFS=$as_save_IFS
42214  test -z "$as_dir" && as_dir=.
42215    for ac_exec_ext in '' $ac_executable_extensions; do
42216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42217    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42219    break 2
42220  fi
42221done
42222  done
42223IFS=$as_save_IFS
42224
42225fi
42226fi
42227STRIP=$ac_cv_prog_STRIP
42228if test -n "$STRIP"; then
42229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42230$as_echo "$STRIP" >&6; }
42231else
42232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42233$as_echo "no" >&6; }
42234fi
42235
42236
42237    test -n "$STRIP" && break
42238  done
42239fi
42240if test -z "$STRIP"; then
42241  ac_ct_STRIP=$STRIP
42242  for ac_prog in strip
42243do
42244  # Extract the first word of "$ac_prog", so it can be a program name with args.
42245set dummy $ac_prog; ac_word=$2
42246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42247$as_echo_n "checking for $ac_word... " >&6; }
42248if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42249  $as_echo_n "(cached) " >&6
42250else
42251  if test -n "$ac_ct_STRIP"; then
42252  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42253else
42254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42255for as_dir in $PATH
42256do
42257  IFS=$as_save_IFS
42258  test -z "$as_dir" && as_dir=.
42259    for ac_exec_ext in '' $ac_executable_extensions; do
42260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42261    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42263    break 2
42264  fi
42265done
42266  done
42267IFS=$as_save_IFS
42268
42269fi
42270fi
42271ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42272if test -n "$ac_ct_STRIP"; then
42273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42274$as_echo "$ac_ct_STRIP" >&6; }
42275else
42276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42277$as_echo "no" >&6; }
42278fi
42279
42280
42281  test -n "$ac_ct_STRIP" && break
42282done
42283
42284  if test "x$ac_ct_STRIP" = x; then
42285    STRIP=""
42286  else
42287    case $cross_compiling:$ac_tool_warned in
42288yes:)
42289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42291ac_tool_warned=yes ;;
42292esac
42293    STRIP=$ac_ct_STRIP
42294  fi
42295fi
42296
42297    else
42298      # If it succeeded, then it was overridden by the user. We will use it
42299      # for the tool.
42300
42301      # First remove it from the list of overridden variables, so we can test
42302      # for unknown variables in the end.
42303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42304
42305      # Check if we try to supply an empty value
42306      if test "x$STRIP" = x; then
42307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42308$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42310$as_echo_n "checking for STRIP... " >&6; }
42311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42312$as_echo "disabled" >&6; }
42313      else
42314        # Check if the provided tool contains a complete path.
42315        tool_specified="$STRIP"
42316        tool_basename="${tool_specified##*/}"
42317        if test "x$tool_basename" = "x$tool_specified"; then
42318          # A command without a complete path is provided, search $PATH.
42319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42320$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42321          # Extract the first word of "$tool_basename", so it can be a program name with args.
42322set dummy $tool_basename; ac_word=$2
42323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42324$as_echo_n "checking for $ac_word... " >&6; }
42325if ${ac_cv_path_STRIP+:} false; then :
42326  $as_echo_n "(cached) " >&6
42327else
42328  case $STRIP in
42329  [\\/]* | ?:[\\/]*)
42330  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42331  ;;
42332  *)
42333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42334for as_dir in $PATH
42335do
42336  IFS=$as_save_IFS
42337  test -z "$as_dir" && as_dir=.
42338    for ac_exec_ext in '' $ac_executable_extensions; do
42339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42340    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42342    break 2
42343  fi
42344done
42345  done
42346IFS=$as_save_IFS
42347
42348  ;;
42349esac
42350fi
42351STRIP=$ac_cv_path_STRIP
42352if test -n "$STRIP"; then
42353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42354$as_echo "$STRIP" >&6; }
42355else
42356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42357$as_echo "no" >&6; }
42358fi
42359
42360
42361          if test "x$STRIP" = x; then
42362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42363          fi
42364        else
42365          # Otherwise we believe it is a complete path. Use it as it is.
42366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42367$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42369$as_echo_n "checking for STRIP... " >&6; }
42370          if test ! -x "$tool_specified"; then
42371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42372$as_echo "not found" >&6; }
42373            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42374          fi
42375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42376$as_echo "$tool_specified" >&6; }
42377        fi
42378      fi
42379    fi
42380
42381  fi
42382
42383
42384
42385  # Only process if variable expands to non-empty
42386
42387  if test "x$STRIP" != x; then
42388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42389
42390  # First separate the path from the arguments. This will split at the first
42391  # space.
42392  complete="$STRIP"
42393  path="${complete%% *}"
42394  tmp="$complete EOL"
42395  arguments="${tmp#* }"
42396
42397  # Input might be given as Windows format, start by converting to
42398  # unix format.
42399  new_path=`$CYGPATH -u "$path"`
42400
42401  # Now try to locate executable using which
42402  new_path=`$WHICH "$new_path" 2> /dev/null`
42403  # bat and cmd files are not always considered executable in cygwin causing which
42404  # to not find them
42405  if test "x$new_path" = x \
42406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42408    new_path=`$CYGPATH -u "$path"`
42409  fi
42410  if test "x$new_path" = x; then
42411    # Oops. Which didn't find the executable.
42412    # The splitting of arguments from the executable at a space might have been incorrect,
42413    # since paths with space are more likely in Windows. Give it another try with the whole
42414    # argument.
42415    path="$complete"
42416    arguments="EOL"
42417    new_path=`$CYGPATH -u "$path"`
42418    new_path=`$WHICH "$new_path" 2> /dev/null`
42419    # bat and cmd files are not always considered executable in cygwin causing which
42420    # to not find them
42421    if test "x$new_path" = x \
42422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42424      new_path=`$CYGPATH -u "$path"`
42425    fi
42426    if test "x$new_path" = x; then
42427      # It's still not found. Now this is an unrecoverable error.
42428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42429$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42430      has_space=`$ECHO "$complete" | $GREP " "`
42431      if test "x$has_space" != x; then
42432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42434      fi
42435      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42436    fi
42437  fi
42438
42439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42442  # "foo.exe" is OK but "foo" is an error.
42443  #
42444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42445  # It is also a way to make sure we got the proper file name for the real test later on.
42446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42447  if test "x$test_shortpath" = x; then
42448    # Short path failed, file does not exist as specified.
42449    # Try adding .exe or .cmd
42450    if test -f "${new_path}.exe"; then
42451      input_to_shortpath="${new_path}.exe"
42452    elif test -f "${new_path}.cmd"; then
42453      input_to_shortpath="${new_path}.cmd"
42454    else
42455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42456$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42459      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42460    fi
42461  else
42462    input_to_shortpath="$new_path"
42463  fi
42464
42465  # Call helper function which possibly converts this using DOS-style short mode.
42466  # If so, the updated path is stored in $new_path.
42467  new_path="$input_to_shortpath"
42468
42469  input_path="$input_to_shortpath"
42470  # Check if we need to convert this using DOS-style short mode. If the path
42471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42472  # take no chances and rewrite it.
42473  # Note: m4 eats our [], so we need to use [ and ] instead.
42474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42475  if test "x$has_forbidden_chars" != x; then
42476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42480      # Going to short mode and back again did indeed matter. Since short mode is
42481      # case insensitive, let's make it lowercase to improve readability.
42482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42483      # Now convert it back to Unix-style (cygpath)
42484      input_path=`$CYGPATH -u "$shortmode_path"`
42485      new_path="$input_path"
42486    fi
42487  fi
42488
42489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42490  if test "x$test_cygdrive_prefix" = x; then
42491    # As a simple fix, exclude /usr/bin since it's not a real path.
42492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42494      # a path prefixed by /cygdrive for fixpath to work.
42495      new_path="$CYGWIN_ROOT_PATH$input_path"
42496    fi
42497  fi
42498
42499  # remove trailing .exe if any
42500  new_path="${new_path/%.exe/}"
42501
42502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42503
42504  # First separate the path from the arguments. This will split at the first
42505  # space.
42506  complete="$STRIP"
42507  path="${complete%% *}"
42508  tmp="$complete EOL"
42509  arguments="${tmp#* }"
42510
42511  # Input might be given as Windows format, start by converting to
42512  # unix format.
42513  new_path="$path"
42514
42515  windows_path="$new_path"
42516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42517    unix_path=`$CYGPATH -u "$windows_path"`
42518    new_path="$unix_path"
42519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42521    new_path="$unix_path"
42522  fi
42523
42524
42525  # Now try to locate executable using which
42526  new_path=`$WHICH "$new_path" 2> /dev/null`
42527
42528  if test "x$new_path" = x; then
42529    # Oops. Which didn't find the executable.
42530    # The splitting of arguments from the executable at a space might have been incorrect,
42531    # since paths with space are more likely in Windows. Give it another try with the whole
42532    # argument.
42533    path="$complete"
42534    arguments="EOL"
42535    new_path="$path"
42536
42537  windows_path="$new_path"
42538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42539    unix_path=`$CYGPATH -u "$windows_path"`
42540    new_path="$unix_path"
42541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42543    new_path="$unix_path"
42544  fi
42545
42546
42547    new_path=`$WHICH "$new_path" 2> /dev/null`
42548    # bat and cmd files are not always considered executable in MSYS causing which
42549    # to not find them
42550    if test "x$new_path" = x \
42551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42553      new_path="$path"
42554
42555  windows_path="$new_path"
42556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42557    unix_path=`$CYGPATH -u "$windows_path"`
42558    new_path="$unix_path"
42559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42561    new_path="$unix_path"
42562  fi
42563
42564    fi
42565
42566    if test "x$new_path" = x; then
42567      # It's still not found. Now this is an unrecoverable error.
42568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42569$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42570      has_space=`$ECHO "$complete" | $GREP " "`
42571      if test "x$has_space" != x; then
42572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42574      fi
42575      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42576    fi
42577  fi
42578
42579  # Now new_path has a complete unix path to the binary
42580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42581    # Keep paths in /bin as-is, but remove trailing .exe if any
42582    new_path="${new_path/%.exe/}"
42583    # Do not save /bin paths to all_fixpath_prefixes!
42584  else
42585    # Not in mixed or Windows style, start by that.
42586    new_path=`cmd //c echo $new_path`
42587
42588  input_path="$new_path"
42589  # Check if we need to convert this using DOS-style short mode. If the path
42590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42591  # take no chances and rewrite it.
42592  # Note: m4 eats our [], so we need to use [ and ] instead.
42593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42594  if test "x$has_forbidden_chars" != x; then
42595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42597  fi
42598
42599    # Output is in $new_path
42600
42601  windows_path="$new_path"
42602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42603    unix_path=`$CYGPATH -u "$windows_path"`
42604    new_path="$unix_path"
42605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42607    new_path="$unix_path"
42608  fi
42609
42610    # remove trailing .exe if any
42611    new_path="${new_path/%.exe/}"
42612
42613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42615  fi
42616
42617    else
42618      # We're on a unix platform. Hooray! :)
42619      # First separate the path from the arguments. This will split at the first
42620      # space.
42621      complete="$STRIP"
42622      path="${complete%% *}"
42623      tmp="$complete EOL"
42624      arguments="${tmp#* }"
42625
42626      # Cannot rely on the command "which" here since it doesn't always work.
42627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42628      if test -z "$is_absolute_path"; then
42629        # Path to executable is not absolute. Find it.
42630        IFS_save="$IFS"
42631        IFS=:
42632        for p in $PATH; do
42633          if test -f "$p/$path" && test -x "$p/$path"; then
42634            new_path="$p/$path"
42635            break
42636          fi
42637        done
42638        IFS="$IFS_save"
42639      else
42640        # This is an absolute path, we can use it without further modifications.
42641        new_path="$path"
42642      fi
42643
42644      if test "x$new_path" = x; then
42645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42646$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42647        has_space=`$ECHO "$complete" | $GREP " "`
42648        if test "x$has_space" != x; then
42649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42651        fi
42652        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42653      fi
42654    fi
42655
42656    # Now join together the path and the arguments once again
42657    if test "x$arguments" != xEOL; then
42658      new_complete="$new_path ${arguments% *}"
42659    else
42660      new_complete="$new_path"
42661    fi
42662
42663    if test "x$complete" != "x$new_complete"; then
42664      STRIP="$new_complete"
42665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42666$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42667    fi
42668  fi
42669
42670    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42671
42672
42673  # Publish this variable in the help.
42674
42675
42676  if [ -z "${NM+x}" ]; then
42677    # The variable is not set by user, try to locate tool using the code snippet
42678    if test -n "$ac_tool_prefix"; then
42679  for ac_prog in nm gcc-nm
42680  do
42681    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42682set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42684$as_echo_n "checking for $ac_word... " >&6; }
42685if ${ac_cv_prog_NM+:} false; then :
42686  $as_echo_n "(cached) " >&6
42687else
42688  if test -n "$NM"; then
42689  ac_cv_prog_NM="$NM" # Let the user override the test.
42690else
42691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42692for as_dir in $PATH
42693do
42694  IFS=$as_save_IFS
42695  test -z "$as_dir" && as_dir=.
42696    for ac_exec_ext in '' $ac_executable_extensions; do
42697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42698    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42700    break 2
42701  fi
42702done
42703  done
42704IFS=$as_save_IFS
42705
42706fi
42707fi
42708NM=$ac_cv_prog_NM
42709if test -n "$NM"; then
42710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42711$as_echo "$NM" >&6; }
42712else
42713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42714$as_echo "no" >&6; }
42715fi
42716
42717
42718    test -n "$NM" && break
42719  done
42720fi
42721if test -z "$NM"; then
42722  ac_ct_NM=$NM
42723  for ac_prog in nm gcc-nm
42724do
42725  # Extract the first word of "$ac_prog", so it can be a program name with args.
42726set dummy $ac_prog; ac_word=$2
42727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42728$as_echo_n "checking for $ac_word... " >&6; }
42729if ${ac_cv_prog_ac_ct_NM+:} false; then :
42730  $as_echo_n "(cached) " >&6
42731else
42732  if test -n "$ac_ct_NM"; then
42733  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42734else
42735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42736for as_dir in $PATH
42737do
42738  IFS=$as_save_IFS
42739  test -z "$as_dir" && as_dir=.
42740    for ac_exec_ext in '' $ac_executable_extensions; do
42741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42742    ac_cv_prog_ac_ct_NM="$ac_prog"
42743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42744    break 2
42745  fi
42746done
42747  done
42748IFS=$as_save_IFS
42749
42750fi
42751fi
42752ac_ct_NM=$ac_cv_prog_ac_ct_NM
42753if test -n "$ac_ct_NM"; then
42754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42755$as_echo "$ac_ct_NM" >&6; }
42756else
42757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42758$as_echo "no" >&6; }
42759fi
42760
42761
42762  test -n "$ac_ct_NM" && break
42763done
42764
42765  if test "x$ac_ct_NM" = x; then
42766    NM=""
42767  else
42768    case $cross_compiling:$ac_tool_warned in
42769yes:)
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42772ac_tool_warned=yes ;;
42773esac
42774    NM=$ac_ct_NM
42775  fi
42776fi
42777
42778  else
42779    # The variable is set, but is it from the command line or the environment?
42780
42781    # Try to remove the string !NM! from our list.
42782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42784      # If it failed, the variable was not from the command line. Ignore it,
42785      # but warn the user (except for BASH, which is always set by the calling BASH).
42786      if test "xNM" != xBASH; then
42787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42788$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42789      fi
42790      # Try to locate tool using the code snippet
42791      if test -n "$ac_tool_prefix"; then
42792  for ac_prog in nm gcc-nm
42793  do
42794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42797$as_echo_n "checking for $ac_word... " >&6; }
42798if ${ac_cv_prog_NM+:} false; then :
42799  $as_echo_n "(cached) " >&6
42800else
42801  if test -n "$NM"; then
42802  ac_cv_prog_NM="$NM" # Let the user override the test.
42803else
42804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42805for as_dir in $PATH
42806do
42807  IFS=$as_save_IFS
42808  test -z "$as_dir" && as_dir=.
42809    for ac_exec_ext in '' $ac_executable_extensions; do
42810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42811    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42813    break 2
42814  fi
42815done
42816  done
42817IFS=$as_save_IFS
42818
42819fi
42820fi
42821NM=$ac_cv_prog_NM
42822if test -n "$NM"; then
42823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42824$as_echo "$NM" >&6; }
42825else
42826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42827$as_echo "no" >&6; }
42828fi
42829
42830
42831    test -n "$NM" && break
42832  done
42833fi
42834if test -z "$NM"; then
42835  ac_ct_NM=$NM
42836  for ac_prog in nm gcc-nm
42837do
42838  # Extract the first word of "$ac_prog", so it can be a program name with args.
42839set dummy $ac_prog; ac_word=$2
42840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42841$as_echo_n "checking for $ac_word... " >&6; }
42842if ${ac_cv_prog_ac_ct_NM+:} false; then :
42843  $as_echo_n "(cached) " >&6
42844else
42845  if test -n "$ac_ct_NM"; then
42846  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42847else
42848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42849for as_dir in $PATH
42850do
42851  IFS=$as_save_IFS
42852  test -z "$as_dir" && as_dir=.
42853    for ac_exec_ext in '' $ac_executable_extensions; do
42854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42855    ac_cv_prog_ac_ct_NM="$ac_prog"
42856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42857    break 2
42858  fi
42859done
42860  done
42861IFS=$as_save_IFS
42862
42863fi
42864fi
42865ac_ct_NM=$ac_cv_prog_ac_ct_NM
42866if test -n "$ac_ct_NM"; then
42867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42868$as_echo "$ac_ct_NM" >&6; }
42869else
42870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42871$as_echo "no" >&6; }
42872fi
42873
42874
42875  test -n "$ac_ct_NM" && break
42876done
42877
42878  if test "x$ac_ct_NM" = x; then
42879    NM=""
42880  else
42881    case $cross_compiling:$ac_tool_warned in
42882yes:)
42883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42885ac_tool_warned=yes ;;
42886esac
42887    NM=$ac_ct_NM
42888  fi
42889fi
42890
42891    else
42892      # If it succeeded, then it was overridden by the user. We will use it
42893      # for the tool.
42894
42895      # First remove it from the list of overridden variables, so we can test
42896      # for unknown variables in the end.
42897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42898
42899      # Check if we try to supply an empty value
42900      if test "x$NM" = x; then
42901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42902$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42904$as_echo_n "checking for NM... " >&6; }
42905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42906$as_echo "disabled" >&6; }
42907      else
42908        # Check if the provided tool contains a complete path.
42909        tool_specified="$NM"
42910        tool_basename="${tool_specified##*/}"
42911        if test "x$tool_basename" = "x$tool_specified"; then
42912          # A command without a complete path is provided, search $PATH.
42913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42914$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42915          # Extract the first word of "$tool_basename", so it can be a program name with args.
42916set dummy $tool_basename; ac_word=$2
42917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42918$as_echo_n "checking for $ac_word... " >&6; }
42919if ${ac_cv_path_NM+:} false; then :
42920  $as_echo_n "(cached) " >&6
42921else
42922  case $NM in
42923  [\\/]* | ?:[\\/]*)
42924  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42925  ;;
42926  *)
42927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42928for as_dir in $PATH
42929do
42930  IFS=$as_save_IFS
42931  test -z "$as_dir" && as_dir=.
42932    for ac_exec_ext in '' $ac_executable_extensions; do
42933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42934    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42936    break 2
42937  fi
42938done
42939  done
42940IFS=$as_save_IFS
42941
42942  ;;
42943esac
42944fi
42945NM=$ac_cv_path_NM
42946if test -n "$NM"; then
42947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42948$as_echo "$NM" >&6; }
42949else
42950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42951$as_echo "no" >&6; }
42952fi
42953
42954
42955          if test "x$NM" = x; then
42956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42957          fi
42958        else
42959          # Otherwise we believe it is a complete path. Use it as it is.
42960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42961$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42963$as_echo_n "checking for NM... " >&6; }
42964          if test ! -x "$tool_specified"; then
42965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42966$as_echo "not found" >&6; }
42967            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42968          fi
42969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42970$as_echo "$tool_specified" >&6; }
42971        fi
42972      fi
42973    fi
42974
42975  fi
42976
42977
42978    else
42979
42980
42981  # Publish this variable in the help.
42982
42983
42984  if [ -z "${NM+x}" ]; then
42985    # The variable is not set by user, try to locate tool using the code snippet
42986    if test -n "$ac_tool_prefix"; then
42987  for ac_prog in nm
42988  do
42989    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42990set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42992$as_echo_n "checking for $ac_word... " >&6; }
42993if ${ac_cv_prog_NM+:} false; then :
42994  $as_echo_n "(cached) " >&6
42995else
42996  if test -n "$NM"; then
42997  ac_cv_prog_NM="$NM" # Let the user override the test.
42998else
42999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43000for as_dir in $PATH
43001do
43002  IFS=$as_save_IFS
43003  test -z "$as_dir" && as_dir=.
43004    for ac_exec_ext in '' $ac_executable_extensions; do
43005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43006    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43008    break 2
43009  fi
43010done
43011  done
43012IFS=$as_save_IFS
43013
43014fi
43015fi
43016NM=$ac_cv_prog_NM
43017if test -n "$NM"; then
43018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43019$as_echo "$NM" >&6; }
43020else
43021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43022$as_echo "no" >&6; }
43023fi
43024
43025
43026    test -n "$NM" && break
43027  done
43028fi
43029if test -z "$NM"; then
43030  ac_ct_NM=$NM
43031  for ac_prog in nm
43032do
43033  # Extract the first word of "$ac_prog", so it can be a program name with args.
43034set dummy $ac_prog; ac_word=$2
43035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43036$as_echo_n "checking for $ac_word... " >&6; }
43037if ${ac_cv_prog_ac_ct_NM+:} false; then :
43038  $as_echo_n "(cached) " >&6
43039else
43040  if test -n "$ac_ct_NM"; then
43041  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43042else
43043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43044for as_dir in $PATH
43045do
43046  IFS=$as_save_IFS
43047  test -z "$as_dir" && as_dir=.
43048    for ac_exec_ext in '' $ac_executable_extensions; do
43049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43050    ac_cv_prog_ac_ct_NM="$ac_prog"
43051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43052    break 2
43053  fi
43054done
43055  done
43056IFS=$as_save_IFS
43057
43058fi
43059fi
43060ac_ct_NM=$ac_cv_prog_ac_ct_NM
43061if test -n "$ac_ct_NM"; then
43062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43063$as_echo "$ac_ct_NM" >&6; }
43064else
43065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43066$as_echo "no" >&6; }
43067fi
43068
43069
43070  test -n "$ac_ct_NM" && break
43071done
43072
43073  if test "x$ac_ct_NM" = x; then
43074    NM=""
43075  else
43076    case $cross_compiling:$ac_tool_warned in
43077yes:)
43078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43080ac_tool_warned=yes ;;
43081esac
43082    NM=$ac_ct_NM
43083  fi
43084fi
43085
43086  else
43087    # The variable is set, but is it from the command line or the environment?
43088
43089    # Try to remove the string !NM! from our list.
43090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43092      # If it failed, the variable was not from the command line. Ignore it,
43093      # but warn the user (except for BASH, which is always set by the calling BASH).
43094      if test "xNM" != xBASH; then
43095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43096$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43097      fi
43098      # Try to locate tool using the code snippet
43099      if test -n "$ac_tool_prefix"; then
43100  for ac_prog in nm
43101  do
43102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43105$as_echo_n "checking for $ac_word... " >&6; }
43106if ${ac_cv_prog_NM+:} false; then :
43107  $as_echo_n "(cached) " >&6
43108else
43109  if test -n "$NM"; then
43110  ac_cv_prog_NM="$NM" # Let the user override the test.
43111else
43112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43113for as_dir in $PATH
43114do
43115  IFS=$as_save_IFS
43116  test -z "$as_dir" && as_dir=.
43117    for ac_exec_ext in '' $ac_executable_extensions; do
43118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43119    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43121    break 2
43122  fi
43123done
43124  done
43125IFS=$as_save_IFS
43126
43127fi
43128fi
43129NM=$ac_cv_prog_NM
43130if test -n "$NM"; then
43131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43132$as_echo "$NM" >&6; }
43133else
43134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43135$as_echo "no" >&6; }
43136fi
43137
43138
43139    test -n "$NM" && break
43140  done
43141fi
43142if test -z "$NM"; then
43143  ac_ct_NM=$NM
43144  for ac_prog in nm
43145do
43146  # Extract the first word of "$ac_prog", so it can be a program name with args.
43147set dummy $ac_prog; ac_word=$2
43148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43149$as_echo_n "checking for $ac_word... " >&6; }
43150if ${ac_cv_prog_ac_ct_NM+:} false; then :
43151  $as_echo_n "(cached) " >&6
43152else
43153  if test -n "$ac_ct_NM"; then
43154  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43155else
43156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43157for as_dir in $PATH
43158do
43159  IFS=$as_save_IFS
43160  test -z "$as_dir" && as_dir=.
43161    for ac_exec_ext in '' $ac_executable_extensions; do
43162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43163    ac_cv_prog_ac_ct_NM="$ac_prog"
43164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43165    break 2
43166  fi
43167done
43168  done
43169IFS=$as_save_IFS
43170
43171fi
43172fi
43173ac_ct_NM=$ac_cv_prog_ac_ct_NM
43174if test -n "$ac_ct_NM"; then
43175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43176$as_echo "$ac_ct_NM" >&6; }
43177else
43178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43179$as_echo "no" >&6; }
43180fi
43181
43182
43183  test -n "$ac_ct_NM" && break
43184done
43185
43186  if test "x$ac_ct_NM" = x; then
43187    NM=""
43188  else
43189    case $cross_compiling:$ac_tool_warned in
43190yes:)
43191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43193ac_tool_warned=yes ;;
43194esac
43195    NM=$ac_ct_NM
43196  fi
43197fi
43198
43199    else
43200      # If it succeeded, then it was overridden by the user. We will use it
43201      # for the tool.
43202
43203      # First remove it from the list of overridden variables, so we can test
43204      # for unknown variables in the end.
43205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43206
43207      # Check if we try to supply an empty value
43208      if test "x$NM" = x; then
43209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43210$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43212$as_echo_n "checking for NM... " >&6; }
43213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43214$as_echo "disabled" >&6; }
43215      else
43216        # Check if the provided tool contains a complete path.
43217        tool_specified="$NM"
43218        tool_basename="${tool_specified##*/}"
43219        if test "x$tool_basename" = "x$tool_specified"; then
43220          # A command without a complete path is provided, search $PATH.
43221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43222$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43223          # Extract the first word of "$tool_basename", so it can be a program name with args.
43224set dummy $tool_basename; ac_word=$2
43225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43226$as_echo_n "checking for $ac_word... " >&6; }
43227if ${ac_cv_path_NM+:} false; then :
43228  $as_echo_n "(cached) " >&6
43229else
43230  case $NM in
43231  [\\/]* | ?:[\\/]*)
43232  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43233  ;;
43234  *)
43235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43236for as_dir in $PATH
43237do
43238  IFS=$as_save_IFS
43239  test -z "$as_dir" && as_dir=.
43240    for ac_exec_ext in '' $ac_executable_extensions; do
43241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43242    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43244    break 2
43245  fi
43246done
43247  done
43248IFS=$as_save_IFS
43249
43250  ;;
43251esac
43252fi
43253NM=$ac_cv_path_NM
43254if test -n "$NM"; then
43255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43256$as_echo "$NM" >&6; }
43257else
43258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43259$as_echo "no" >&6; }
43260fi
43261
43262
43263          if test "x$NM" = x; then
43264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43265          fi
43266        else
43267          # Otherwise we believe it is a complete path. Use it as it is.
43268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43269$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43271$as_echo_n "checking for NM... " >&6; }
43272          if test ! -x "$tool_specified"; then
43273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43274$as_echo "not found" >&6; }
43275            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43276          fi
43277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43278$as_echo "$tool_specified" >&6; }
43279        fi
43280      fi
43281    fi
43282
43283  fi
43284
43285
43286    fi
43287
43288  # Only process if variable expands to non-empty
43289
43290  if test "x$NM" != x; then
43291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43292
43293  # First separate the path from the arguments. This will split at the first
43294  # space.
43295  complete="$NM"
43296  path="${complete%% *}"
43297  tmp="$complete EOL"
43298  arguments="${tmp#* }"
43299
43300  # Input might be given as Windows format, start by converting to
43301  # unix format.
43302  new_path=`$CYGPATH -u "$path"`
43303
43304  # Now try to locate executable using which
43305  new_path=`$WHICH "$new_path" 2> /dev/null`
43306  # bat and cmd files are not always considered executable in cygwin causing which
43307  # to not find them
43308  if test "x$new_path" = x \
43309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43311    new_path=`$CYGPATH -u "$path"`
43312  fi
43313  if test "x$new_path" = x; then
43314    # Oops. Which didn't find the executable.
43315    # The splitting of arguments from the executable at a space might have been incorrect,
43316    # since paths with space are more likely in Windows. Give it another try with the whole
43317    # argument.
43318    path="$complete"
43319    arguments="EOL"
43320    new_path=`$CYGPATH -u "$path"`
43321    new_path=`$WHICH "$new_path" 2> /dev/null`
43322    # bat and cmd files are not always considered executable in cygwin causing which
43323    # to not find them
43324    if test "x$new_path" = x \
43325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43327      new_path=`$CYGPATH -u "$path"`
43328    fi
43329    if test "x$new_path" = x; then
43330      # It's still not found. Now this is an unrecoverable error.
43331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43332$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43333      has_space=`$ECHO "$complete" | $GREP " "`
43334      if test "x$has_space" != x; then
43335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43337      fi
43338      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43339    fi
43340  fi
43341
43342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43345  # "foo.exe" is OK but "foo" is an error.
43346  #
43347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43348  # It is also a way to make sure we got the proper file name for the real test later on.
43349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43350  if test "x$test_shortpath" = x; then
43351    # Short path failed, file does not exist as specified.
43352    # Try adding .exe or .cmd
43353    if test -f "${new_path}.exe"; then
43354      input_to_shortpath="${new_path}.exe"
43355    elif test -f "${new_path}.cmd"; then
43356      input_to_shortpath="${new_path}.cmd"
43357    else
43358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43359$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43362      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43363    fi
43364  else
43365    input_to_shortpath="$new_path"
43366  fi
43367
43368  # Call helper function which possibly converts this using DOS-style short mode.
43369  # If so, the updated path is stored in $new_path.
43370  new_path="$input_to_shortpath"
43371
43372  input_path="$input_to_shortpath"
43373  # Check if we need to convert this using DOS-style short mode. If the path
43374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43375  # take no chances and rewrite it.
43376  # Note: m4 eats our [], so we need to use [ and ] instead.
43377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43378  if test "x$has_forbidden_chars" != x; then
43379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43383      # Going to short mode and back again did indeed matter. Since short mode is
43384      # case insensitive, let's make it lowercase to improve readability.
43385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43386      # Now convert it back to Unix-style (cygpath)
43387      input_path=`$CYGPATH -u "$shortmode_path"`
43388      new_path="$input_path"
43389    fi
43390  fi
43391
43392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43393  if test "x$test_cygdrive_prefix" = x; then
43394    # As a simple fix, exclude /usr/bin since it's not a real path.
43395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43397      # a path prefixed by /cygdrive for fixpath to work.
43398      new_path="$CYGWIN_ROOT_PATH$input_path"
43399    fi
43400  fi
43401
43402  # remove trailing .exe if any
43403  new_path="${new_path/%.exe/}"
43404
43405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43406
43407  # First separate the path from the arguments. This will split at the first
43408  # space.
43409  complete="$NM"
43410  path="${complete%% *}"
43411  tmp="$complete EOL"
43412  arguments="${tmp#* }"
43413
43414  # Input might be given as Windows format, start by converting to
43415  # unix format.
43416  new_path="$path"
43417
43418  windows_path="$new_path"
43419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43420    unix_path=`$CYGPATH -u "$windows_path"`
43421    new_path="$unix_path"
43422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43424    new_path="$unix_path"
43425  fi
43426
43427
43428  # Now try to locate executable using which
43429  new_path=`$WHICH "$new_path" 2> /dev/null`
43430
43431  if test "x$new_path" = x; then
43432    # Oops. Which didn't find the executable.
43433    # The splitting of arguments from the executable at a space might have been incorrect,
43434    # since paths with space are more likely in Windows. Give it another try with the whole
43435    # argument.
43436    path="$complete"
43437    arguments="EOL"
43438    new_path="$path"
43439
43440  windows_path="$new_path"
43441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43442    unix_path=`$CYGPATH -u "$windows_path"`
43443    new_path="$unix_path"
43444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43446    new_path="$unix_path"
43447  fi
43448
43449
43450    new_path=`$WHICH "$new_path" 2> /dev/null`
43451    # bat and cmd files are not always considered executable in MSYS causing which
43452    # to not find them
43453    if test "x$new_path" = x \
43454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43456      new_path="$path"
43457
43458  windows_path="$new_path"
43459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43460    unix_path=`$CYGPATH -u "$windows_path"`
43461    new_path="$unix_path"
43462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43464    new_path="$unix_path"
43465  fi
43466
43467    fi
43468
43469    if test "x$new_path" = x; then
43470      # It's still not found. Now this is an unrecoverable error.
43471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43472$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43473      has_space=`$ECHO "$complete" | $GREP " "`
43474      if test "x$has_space" != x; then
43475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43477      fi
43478      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43479    fi
43480  fi
43481
43482  # Now new_path has a complete unix path to the binary
43483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43484    # Keep paths in /bin as-is, but remove trailing .exe if any
43485    new_path="${new_path/%.exe/}"
43486    # Do not save /bin paths to all_fixpath_prefixes!
43487  else
43488    # Not in mixed or Windows style, start by that.
43489    new_path=`cmd //c echo $new_path`
43490
43491  input_path="$new_path"
43492  # Check if we need to convert this using DOS-style short mode. If the path
43493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43494  # take no chances and rewrite it.
43495  # Note: m4 eats our [], so we need to use [ and ] instead.
43496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43497  if test "x$has_forbidden_chars" != x; then
43498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43500  fi
43501
43502    # Output is in $new_path
43503
43504  windows_path="$new_path"
43505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43506    unix_path=`$CYGPATH -u "$windows_path"`
43507    new_path="$unix_path"
43508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43510    new_path="$unix_path"
43511  fi
43512
43513    # remove trailing .exe if any
43514    new_path="${new_path/%.exe/}"
43515
43516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43518  fi
43519
43520    else
43521      # We're on a unix platform. Hooray! :)
43522      # First separate the path from the arguments. This will split at the first
43523      # space.
43524      complete="$NM"
43525      path="${complete%% *}"
43526      tmp="$complete EOL"
43527      arguments="${tmp#* }"
43528
43529      # Cannot rely on the command "which" here since it doesn't always work.
43530      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43531      if test -z "$is_absolute_path"; then
43532        # Path to executable is not absolute. Find it.
43533        IFS_save="$IFS"
43534        IFS=:
43535        for p in $PATH; do
43536          if test -f "$p/$path" && test -x "$p/$path"; then
43537            new_path="$p/$path"
43538            break
43539          fi
43540        done
43541        IFS="$IFS_save"
43542      else
43543        # This is an absolute path, we can use it without further modifications.
43544        new_path="$path"
43545      fi
43546
43547      if test "x$new_path" = x; then
43548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43549$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43550        has_space=`$ECHO "$complete" | $GREP " "`
43551        if test "x$has_space" != x; then
43552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43554        fi
43555        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43556      fi
43557    fi
43558
43559    # Now join together the path and the arguments once again
43560    if test "x$arguments" != xEOL; then
43561      new_complete="$new_path ${arguments% *}"
43562    else
43563      new_complete="$new_path"
43564    fi
43565
43566    if test "x$complete" != "x$new_complete"; then
43567      NM="$new_complete"
43568      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43569$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43570    fi
43571  fi
43572
43573    GNM="$NM"
43574
43575  fi
43576
43577  # objcopy is used for moving debug symbols to separate files when
43578  # full debug symbols are enabled.
43579  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43580
43581
43582  # Publish this variable in the help.
43583
43584
43585  if [ -z "${OBJCOPY+x}" ]; then
43586    # The variable is not set by user, try to locate tool using the code snippet
43587    if test -n "$ac_tool_prefix"; then
43588  for ac_prog in gobjcopy objcopy
43589  do
43590    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43591set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43593$as_echo_n "checking for $ac_word... " >&6; }
43594if ${ac_cv_prog_OBJCOPY+:} false; then :
43595  $as_echo_n "(cached) " >&6
43596else
43597  if test -n "$OBJCOPY"; then
43598  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43599else
43600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43601for as_dir in $PATH
43602do
43603  IFS=$as_save_IFS
43604  test -z "$as_dir" && as_dir=.
43605    for ac_exec_ext in '' $ac_executable_extensions; do
43606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43607    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43609    break 2
43610  fi
43611done
43612  done
43613IFS=$as_save_IFS
43614
43615fi
43616fi
43617OBJCOPY=$ac_cv_prog_OBJCOPY
43618if test -n "$OBJCOPY"; then
43619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43620$as_echo "$OBJCOPY" >&6; }
43621else
43622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43623$as_echo "no" >&6; }
43624fi
43625
43626
43627    test -n "$OBJCOPY" && break
43628  done
43629fi
43630if test -z "$OBJCOPY"; then
43631  ac_ct_OBJCOPY=$OBJCOPY
43632  for ac_prog in gobjcopy objcopy
43633do
43634  # Extract the first word of "$ac_prog", so it can be a program name with args.
43635set dummy $ac_prog; ac_word=$2
43636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43637$as_echo_n "checking for $ac_word... " >&6; }
43638if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43639  $as_echo_n "(cached) " >&6
43640else
43641  if test -n "$ac_ct_OBJCOPY"; then
43642  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43643else
43644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43645for as_dir in $PATH
43646do
43647  IFS=$as_save_IFS
43648  test -z "$as_dir" && as_dir=.
43649    for ac_exec_ext in '' $ac_executable_extensions; do
43650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43651    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43653    break 2
43654  fi
43655done
43656  done
43657IFS=$as_save_IFS
43658
43659fi
43660fi
43661ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43662if test -n "$ac_ct_OBJCOPY"; then
43663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43664$as_echo "$ac_ct_OBJCOPY" >&6; }
43665else
43666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43667$as_echo "no" >&6; }
43668fi
43669
43670
43671  test -n "$ac_ct_OBJCOPY" && break
43672done
43673
43674  if test "x$ac_ct_OBJCOPY" = x; then
43675    OBJCOPY=""
43676  else
43677    case $cross_compiling:$ac_tool_warned in
43678yes:)
43679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43681ac_tool_warned=yes ;;
43682esac
43683    OBJCOPY=$ac_ct_OBJCOPY
43684  fi
43685fi
43686
43687  else
43688    # The variable is set, but is it from the command line or the environment?
43689
43690    # Try to remove the string !OBJCOPY! from our list.
43691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43693      # If it failed, the variable was not from the command line. Ignore it,
43694      # but warn the user (except for BASH, which is always set by the calling BASH).
43695      if test "xOBJCOPY" != xBASH; then
43696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43697$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43698      fi
43699      # Try to locate tool using the code snippet
43700      if test -n "$ac_tool_prefix"; then
43701  for ac_prog in gobjcopy objcopy
43702  do
43703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43706$as_echo_n "checking for $ac_word... " >&6; }
43707if ${ac_cv_prog_OBJCOPY+:} false; then :
43708  $as_echo_n "(cached) " >&6
43709else
43710  if test -n "$OBJCOPY"; then
43711  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43712else
43713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43714for as_dir in $PATH
43715do
43716  IFS=$as_save_IFS
43717  test -z "$as_dir" && as_dir=.
43718    for ac_exec_ext in '' $ac_executable_extensions; do
43719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43720    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43722    break 2
43723  fi
43724done
43725  done
43726IFS=$as_save_IFS
43727
43728fi
43729fi
43730OBJCOPY=$ac_cv_prog_OBJCOPY
43731if test -n "$OBJCOPY"; then
43732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43733$as_echo "$OBJCOPY" >&6; }
43734else
43735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43736$as_echo "no" >&6; }
43737fi
43738
43739
43740    test -n "$OBJCOPY" && break
43741  done
43742fi
43743if test -z "$OBJCOPY"; then
43744  ac_ct_OBJCOPY=$OBJCOPY
43745  for ac_prog in gobjcopy objcopy
43746do
43747  # Extract the first word of "$ac_prog", so it can be a program name with args.
43748set dummy $ac_prog; ac_word=$2
43749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43750$as_echo_n "checking for $ac_word... " >&6; }
43751if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43752  $as_echo_n "(cached) " >&6
43753else
43754  if test -n "$ac_ct_OBJCOPY"; then
43755  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43756else
43757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43758for as_dir in $PATH
43759do
43760  IFS=$as_save_IFS
43761  test -z "$as_dir" && as_dir=.
43762    for ac_exec_ext in '' $ac_executable_extensions; do
43763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43764    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43766    break 2
43767  fi
43768done
43769  done
43770IFS=$as_save_IFS
43771
43772fi
43773fi
43774ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43775if test -n "$ac_ct_OBJCOPY"; then
43776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43777$as_echo "$ac_ct_OBJCOPY" >&6; }
43778else
43779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43780$as_echo "no" >&6; }
43781fi
43782
43783
43784  test -n "$ac_ct_OBJCOPY" && break
43785done
43786
43787  if test "x$ac_ct_OBJCOPY" = x; then
43788    OBJCOPY=""
43789  else
43790    case $cross_compiling:$ac_tool_warned in
43791yes:)
43792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43794ac_tool_warned=yes ;;
43795esac
43796    OBJCOPY=$ac_ct_OBJCOPY
43797  fi
43798fi
43799
43800    else
43801      # If it succeeded, then it was overridden by the user. We will use it
43802      # for the tool.
43803
43804      # First remove it from the list of overridden variables, so we can test
43805      # for unknown variables in the end.
43806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43807
43808      # Check if we try to supply an empty value
43809      if test "x$OBJCOPY" = x; then
43810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43811$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43813$as_echo_n "checking for OBJCOPY... " >&6; }
43814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43815$as_echo "disabled" >&6; }
43816      else
43817        # Check if the provided tool contains a complete path.
43818        tool_specified="$OBJCOPY"
43819        tool_basename="${tool_specified##*/}"
43820        if test "x$tool_basename" = "x$tool_specified"; then
43821          # A command without a complete path is provided, search $PATH.
43822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43823$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43824          # Extract the first word of "$tool_basename", so it can be a program name with args.
43825set dummy $tool_basename; ac_word=$2
43826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43827$as_echo_n "checking for $ac_word... " >&6; }
43828if ${ac_cv_path_OBJCOPY+:} false; then :
43829  $as_echo_n "(cached) " >&6
43830else
43831  case $OBJCOPY in
43832  [\\/]* | ?:[\\/]*)
43833  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43834  ;;
43835  *)
43836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43837for as_dir in $PATH
43838do
43839  IFS=$as_save_IFS
43840  test -z "$as_dir" && as_dir=.
43841    for ac_exec_ext in '' $ac_executable_extensions; do
43842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43843    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43845    break 2
43846  fi
43847done
43848  done
43849IFS=$as_save_IFS
43850
43851  ;;
43852esac
43853fi
43854OBJCOPY=$ac_cv_path_OBJCOPY
43855if test -n "$OBJCOPY"; then
43856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43857$as_echo "$OBJCOPY" >&6; }
43858else
43859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43860$as_echo "no" >&6; }
43861fi
43862
43863
43864          if test "x$OBJCOPY" = x; then
43865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43866          fi
43867        else
43868          # Otherwise we believe it is a complete path. Use it as it is.
43869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43870$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43872$as_echo_n "checking for OBJCOPY... " >&6; }
43873          if test ! -x "$tool_specified"; then
43874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43875$as_echo "not found" >&6; }
43876            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43877          fi
43878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43879$as_echo "$tool_specified" >&6; }
43880        fi
43881      fi
43882    fi
43883
43884  fi
43885
43886
43887    # Only call fixup if objcopy was found.
43888    if test -n "$OBJCOPY"; then
43889
43890  # Only process if variable expands to non-empty
43891
43892  if test "x$OBJCOPY" != x; then
43893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43894
43895  # First separate the path from the arguments. This will split at the first
43896  # space.
43897  complete="$OBJCOPY"
43898  path="${complete%% *}"
43899  tmp="$complete EOL"
43900  arguments="${tmp#* }"
43901
43902  # Input might be given as Windows format, start by converting to
43903  # unix format.
43904  new_path=`$CYGPATH -u "$path"`
43905
43906  # Now try to locate executable using which
43907  new_path=`$WHICH "$new_path" 2> /dev/null`
43908  # bat and cmd files are not always considered executable in cygwin causing which
43909  # to not find them
43910  if test "x$new_path" = x \
43911      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43912      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43913    new_path=`$CYGPATH -u "$path"`
43914  fi
43915  if test "x$new_path" = x; then
43916    # Oops. Which didn't find the executable.
43917    # The splitting of arguments from the executable at a space might have been incorrect,
43918    # since paths with space are more likely in Windows. Give it another try with the whole
43919    # argument.
43920    path="$complete"
43921    arguments="EOL"
43922    new_path=`$CYGPATH -u "$path"`
43923    new_path=`$WHICH "$new_path" 2> /dev/null`
43924    # bat and cmd files are not always considered executable in cygwin causing which
43925    # to not find them
43926    if test "x$new_path" = x \
43927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43929      new_path=`$CYGPATH -u "$path"`
43930    fi
43931    if test "x$new_path" = x; then
43932      # It's still not found. Now this is an unrecoverable error.
43933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43934$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43935      has_space=`$ECHO "$complete" | $GREP " "`
43936      if test "x$has_space" != x; then
43937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43939      fi
43940      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43941    fi
43942  fi
43943
43944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43947  # "foo.exe" is OK but "foo" is an error.
43948  #
43949  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43950  # It is also a way to make sure we got the proper file name for the real test later on.
43951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43952  if test "x$test_shortpath" = x; then
43953    # Short path failed, file does not exist as specified.
43954    # Try adding .exe or .cmd
43955    if test -f "${new_path}.exe"; then
43956      input_to_shortpath="${new_path}.exe"
43957    elif test -f "${new_path}.cmd"; then
43958      input_to_shortpath="${new_path}.cmd"
43959    else
43960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43961$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43962      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43963$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43964      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43965    fi
43966  else
43967    input_to_shortpath="$new_path"
43968  fi
43969
43970  # Call helper function which possibly converts this using DOS-style short mode.
43971  # If so, the updated path is stored in $new_path.
43972  new_path="$input_to_shortpath"
43973
43974  input_path="$input_to_shortpath"
43975  # Check if we need to convert this using DOS-style short mode. If the path
43976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43977  # take no chances and rewrite it.
43978  # Note: m4 eats our [], so we need to use [ and ] instead.
43979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43980  if test "x$has_forbidden_chars" != x; then
43981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43985      # Going to short mode and back again did indeed matter. Since short mode is
43986      # case insensitive, let's make it lowercase to improve readability.
43987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43988      # Now convert it back to Unix-style (cygpath)
43989      input_path=`$CYGPATH -u "$shortmode_path"`
43990      new_path="$input_path"
43991    fi
43992  fi
43993
43994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43995  if test "x$test_cygdrive_prefix" = x; then
43996    # As a simple fix, exclude /usr/bin since it's not a real path.
43997    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43999      # a path prefixed by /cygdrive for fixpath to work.
44000      new_path="$CYGWIN_ROOT_PATH$input_path"
44001    fi
44002  fi
44003
44004  # remove trailing .exe if any
44005  new_path="${new_path/%.exe/}"
44006
44007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44008
44009  # First separate the path from the arguments. This will split at the first
44010  # space.
44011  complete="$OBJCOPY"
44012  path="${complete%% *}"
44013  tmp="$complete EOL"
44014  arguments="${tmp#* }"
44015
44016  # Input might be given as Windows format, start by converting to
44017  # unix format.
44018  new_path="$path"
44019
44020  windows_path="$new_path"
44021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44022    unix_path=`$CYGPATH -u "$windows_path"`
44023    new_path="$unix_path"
44024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44026    new_path="$unix_path"
44027  fi
44028
44029
44030  # Now try to locate executable using which
44031  new_path=`$WHICH "$new_path" 2> /dev/null`
44032
44033  if test "x$new_path" = x; then
44034    # Oops. Which didn't find the executable.
44035    # The splitting of arguments from the executable at a space might have been incorrect,
44036    # since paths with space are more likely in Windows. Give it another try with the whole
44037    # argument.
44038    path="$complete"
44039    arguments="EOL"
44040    new_path="$path"
44041
44042  windows_path="$new_path"
44043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44044    unix_path=`$CYGPATH -u "$windows_path"`
44045    new_path="$unix_path"
44046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44048    new_path="$unix_path"
44049  fi
44050
44051
44052    new_path=`$WHICH "$new_path" 2> /dev/null`
44053    # bat and cmd files are not always considered executable in MSYS causing which
44054    # to not find them
44055    if test "x$new_path" = x \
44056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44058      new_path="$path"
44059
44060  windows_path="$new_path"
44061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44062    unix_path=`$CYGPATH -u "$windows_path"`
44063    new_path="$unix_path"
44064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44066    new_path="$unix_path"
44067  fi
44068
44069    fi
44070
44071    if test "x$new_path" = x; then
44072      # It's still not found. Now this is an unrecoverable error.
44073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44074$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44075      has_space=`$ECHO "$complete" | $GREP " "`
44076      if test "x$has_space" != x; then
44077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44079      fi
44080      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44081    fi
44082  fi
44083
44084  # Now new_path has a complete unix path to the binary
44085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44086    # Keep paths in /bin as-is, but remove trailing .exe if any
44087    new_path="${new_path/%.exe/}"
44088    # Do not save /bin paths to all_fixpath_prefixes!
44089  else
44090    # Not in mixed or Windows style, start by that.
44091    new_path=`cmd //c echo $new_path`
44092
44093  input_path="$new_path"
44094  # Check if we need to convert this using DOS-style short mode. If the path
44095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44096  # take no chances and rewrite it.
44097  # Note: m4 eats our [], so we need to use [ and ] instead.
44098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44099  if test "x$has_forbidden_chars" != x; then
44100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44102  fi
44103
44104    # Output is in $new_path
44105
44106  windows_path="$new_path"
44107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44108    unix_path=`$CYGPATH -u "$windows_path"`
44109    new_path="$unix_path"
44110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44112    new_path="$unix_path"
44113  fi
44114
44115    # remove trailing .exe if any
44116    new_path="${new_path/%.exe/}"
44117
44118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44120  fi
44121
44122    else
44123      # We're on a unix platform. Hooray! :)
44124      # First separate the path from the arguments. This will split at the first
44125      # space.
44126      complete="$OBJCOPY"
44127      path="${complete%% *}"
44128      tmp="$complete EOL"
44129      arguments="${tmp#* }"
44130
44131      # Cannot rely on the command "which" here since it doesn't always work.
44132      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44133      if test -z "$is_absolute_path"; then
44134        # Path to executable is not absolute. Find it.
44135        IFS_save="$IFS"
44136        IFS=:
44137        for p in $PATH; do
44138          if test -f "$p/$path" && test -x "$p/$path"; then
44139            new_path="$p/$path"
44140            break
44141          fi
44142        done
44143        IFS="$IFS_save"
44144      else
44145        # This is an absolute path, we can use it without further modifications.
44146        new_path="$path"
44147      fi
44148
44149      if test "x$new_path" = x; then
44150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44151$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44152        has_space=`$ECHO "$complete" | $GREP " "`
44153        if test "x$has_space" != x; then
44154          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44156        fi
44157        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44158      fi
44159    fi
44160
44161    # Now join together the path and the arguments once again
44162    if test "x$arguments" != xEOL; then
44163      new_complete="$new_path ${arguments% *}"
44164    else
44165      new_complete="$new_path"
44166    fi
44167
44168    if test "x$complete" != "x$new_complete"; then
44169      OBJCOPY="$new_complete"
44170      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44171$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44172    fi
44173  fi
44174
44175      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44176        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44177        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44178        # - version number is last blank separate word on first line
44179        # - version number formats that have been seen:
44180        #   - <major>.<minor>
44181        #   - <major>.<minor>.<micro>
44182        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44183        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44184         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44185              -e 's/.* //' \
44186              -e '/^[01]\./b bad' \
44187              -e '/^2\./{' \
44188              -e '  s/^2\.//' \
44189              -e '  /^[0-9]$/b bad' \
44190              -e '  /^[0-9]\./b bad' \
44191              -e '  /^1[0-9]$/b bad' \
44192              -e '  /^1[0-9]\./b bad' \
44193              -e '  /^20\./b bad' \
44194              -e '  /^21\.0$/b bad' \
44195              -e '  /^21\.0\./b bad' \
44196              -e '}' \
44197              -e ':good' \
44198              -e 's/.*/VALID_VERSION/p' \
44199              -e 'q' \
44200              -e ':bad' \
44201              -e 's/.*/BAD_VERSION/p' \
44202              -e 'q'`
44203        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44204          OBJCOPY=
44205          { $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
44206$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44207          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44208$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44209          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44210$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44211          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44212$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44214$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44215        fi
44216      fi
44217    fi
44218  fi
44219
44220
44221
44222  # Publish this variable in the help.
44223
44224
44225  if [ -z "${OBJDUMP+x}" ]; then
44226    # The variable is not set by user, try to locate tool using the code snippet
44227    if test -n "$ac_tool_prefix"; then
44228  for ac_prog in gobjdump objdump
44229  do
44230    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44233$as_echo_n "checking for $ac_word... " >&6; }
44234if ${ac_cv_prog_OBJDUMP+:} false; then :
44235  $as_echo_n "(cached) " >&6
44236else
44237  if test -n "$OBJDUMP"; then
44238  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44239else
44240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44241for as_dir in $PATH
44242do
44243  IFS=$as_save_IFS
44244  test -z "$as_dir" && as_dir=.
44245    for ac_exec_ext in '' $ac_executable_extensions; do
44246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44247    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44249    break 2
44250  fi
44251done
44252  done
44253IFS=$as_save_IFS
44254
44255fi
44256fi
44257OBJDUMP=$ac_cv_prog_OBJDUMP
44258if test -n "$OBJDUMP"; then
44259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44260$as_echo "$OBJDUMP" >&6; }
44261else
44262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44263$as_echo "no" >&6; }
44264fi
44265
44266
44267    test -n "$OBJDUMP" && break
44268  done
44269fi
44270if test -z "$OBJDUMP"; then
44271  ac_ct_OBJDUMP=$OBJDUMP
44272  for ac_prog in gobjdump objdump
44273do
44274  # Extract the first word of "$ac_prog", so it can be a program name with args.
44275set dummy $ac_prog; ac_word=$2
44276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44277$as_echo_n "checking for $ac_word... " >&6; }
44278if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44279  $as_echo_n "(cached) " >&6
44280else
44281  if test -n "$ac_ct_OBJDUMP"; then
44282  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44283else
44284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44285for as_dir in $PATH
44286do
44287  IFS=$as_save_IFS
44288  test -z "$as_dir" && as_dir=.
44289    for ac_exec_ext in '' $ac_executable_extensions; do
44290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44291    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44293    break 2
44294  fi
44295done
44296  done
44297IFS=$as_save_IFS
44298
44299fi
44300fi
44301ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44302if test -n "$ac_ct_OBJDUMP"; then
44303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44304$as_echo "$ac_ct_OBJDUMP" >&6; }
44305else
44306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44307$as_echo "no" >&6; }
44308fi
44309
44310
44311  test -n "$ac_ct_OBJDUMP" && break
44312done
44313
44314  if test "x$ac_ct_OBJDUMP" = x; then
44315    OBJDUMP=""
44316  else
44317    case $cross_compiling:$ac_tool_warned in
44318yes:)
44319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44321ac_tool_warned=yes ;;
44322esac
44323    OBJDUMP=$ac_ct_OBJDUMP
44324  fi
44325fi
44326
44327  else
44328    # The variable is set, but is it from the command line or the environment?
44329
44330    # Try to remove the string !OBJDUMP! from our list.
44331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44333      # If it failed, the variable was not from the command line. Ignore it,
44334      # but warn the user (except for BASH, which is always set by the calling BASH).
44335      if test "xOBJDUMP" != xBASH; then
44336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44337$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44338      fi
44339      # Try to locate tool using the code snippet
44340      if test -n "$ac_tool_prefix"; then
44341  for ac_prog in gobjdump objdump
44342  do
44343    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44344set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44346$as_echo_n "checking for $ac_word... " >&6; }
44347if ${ac_cv_prog_OBJDUMP+:} false; then :
44348  $as_echo_n "(cached) " >&6
44349else
44350  if test -n "$OBJDUMP"; then
44351  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44352else
44353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44354for as_dir in $PATH
44355do
44356  IFS=$as_save_IFS
44357  test -z "$as_dir" && as_dir=.
44358    for ac_exec_ext in '' $ac_executable_extensions; do
44359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44360    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44362    break 2
44363  fi
44364done
44365  done
44366IFS=$as_save_IFS
44367
44368fi
44369fi
44370OBJDUMP=$ac_cv_prog_OBJDUMP
44371if test -n "$OBJDUMP"; then
44372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44373$as_echo "$OBJDUMP" >&6; }
44374else
44375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44376$as_echo "no" >&6; }
44377fi
44378
44379
44380    test -n "$OBJDUMP" && break
44381  done
44382fi
44383if test -z "$OBJDUMP"; then
44384  ac_ct_OBJDUMP=$OBJDUMP
44385  for ac_prog in gobjdump objdump
44386do
44387  # Extract the first word of "$ac_prog", so it can be a program name with args.
44388set dummy $ac_prog; ac_word=$2
44389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44390$as_echo_n "checking for $ac_word... " >&6; }
44391if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44392  $as_echo_n "(cached) " >&6
44393else
44394  if test -n "$ac_ct_OBJDUMP"; then
44395  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44396else
44397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44398for as_dir in $PATH
44399do
44400  IFS=$as_save_IFS
44401  test -z "$as_dir" && as_dir=.
44402    for ac_exec_ext in '' $ac_executable_extensions; do
44403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44404    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44406    break 2
44407  fi
44408done
44409  done
44410IFS=$as_save_IFS
44411
44412fi
44413fi
44414ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44415if test -n "$ac_ct_OBJDUMP"; then
44416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44417$as_echo "$ac_ct_OBJDUMP" >&6; }
44418else
44419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44420$as_echo "no" >&6; }
44421fi
44422
44423
44424  test -n "$ac_ct_OBJDUMP" && break
44425done
44426
44427  if test "x$ac_ct_OBJDUMP" = x; then
44428    OBJDUMP=""
44429  else
44430    case $cross_compiling:$ac_tool_warned in
44431yes:)
44432{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44433$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44434ac_tool_warned=yes ;;
44435esac
44436    OBJDUMP=$ac_ct_OBJDUMP
44437  fi
44438fi
44439
44440    else
44441      # If it succeeded, then it was overridden by the user. We will use it
44442      # for the tool.
44443
44444      # First remove it from the list of overridden variables, so we can test
44445      # for unknown variables in the end.
44446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44447
44448      # Check if we try to supply an empty value
44449      if test "x$OBJDUMP" = x; then
44450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44451$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44453$as_echo_n "checking for OBJDUMP... " >&6; }
44454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44455$as_echo "disabled" >&6; }
44456      else
44457        # Check if the provided tool contains a complete path.
44458        tool_specified="$OBJDUMP"
44459        tool_basename="${tool_specified##*/}"
44460        if test "x$tool_basename" = "x$tool_specified"; then
44461          # A command without a complete path is provided, search $PATH.
44462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44463$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44464          # Extract the first word of "$tool_basename", so it can be a program name with args.
44465set dummy $tool_basename; ac_word=$2
44466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44467$as_echo_n "checking for $ac_word... " >&6; }
44468if ${ac_cv_path_OBJDUMP+:} false; then :
44469  $as_echo_n "(cached) " >&6
44470else
44471  case $OBJDUMP in
44472  [\\/]* | ?:[\\/]*)
44473  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44474  ;;
44475  *)
44476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44477for as_dir in $PATH
44478do
44479  IFS=$as_save_IFS
44480  test -z "$as_dir" && as_dir=.
44481    for ac_exec_ext in '' $ac_executable_extensions; do
44482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44483    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44485    break 2
44486  fi
44487done
44488  done
44489IFS=$as_save_IFS
44490
44491  ;;
44492esac
44493fi
44494OBJDUMP=$ac_cv_path_OBJDUMP
44495if test -n "$OBJDUMP"; then
44496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44497$as_echo "$OBJDUMP" >&6; }
44498else
44499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44500$as_echo "no" >&6; }
44501fi
44502
44503
44504          if test "x$OBJDUMP" = x; then
44505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44506          fi
44507        else
44508          # Otherwise we believe it is a complete path. Use it as it is.
44509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44510$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44512$as_echo_n "checking for OBJDUMP... " >&6; }
44513          if test ! -x "$tool_specified"; then
44514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44515$as_echo "not found" >&6; }
44516            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44517          fi
44518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44519$as_echo "$tool_specified" >&6; }
44520        fi
44521      fi
44522    fi
44523
44524  fi
44525
44526
44527  if test "x$OBJDUMP" != x; then
44528    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44529    # bails if argument is missing.
44530
44531  # Only process if variable expands to non-empty
44532
44533  if test "x$OBJDUMP" != x; then
44534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44535
44536  # First separate the path from the arguments. This will split at the first
44537  # space.
44538  complete="$OBJDUMP"
44539  path="${complete%% *}"
44540  tmp="$complete EOL"
44541  arguments="${tmp#* }"
44542
44543  # Input might be given as Windows format, start by converting to
44544  # unix format.
44545  new_path=`$CYGPATH -u "$path"`
44546
44547  # Now try to locate executable using which
44548  new_path=`$WHICH "$new_path" 2> /dev/null`
44549  # bat and cmd files are not always considered executable in cygwin causing which
44550  # to not find them
44551  if test "x$new_path" = x \
44552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44554    new_path=`$CYGPATH -u "$path"`
44555  fi
44556  if test "x$new_path" = x; then
44557    # Oops. Which didn't find the executable.
44558    # The splitting of arguments from the executable at a space might have been incorrect,
44559    # since paths with space are more likely in Windows. Give it another try with the whole
44560    # argument.
44561    path="$complete"
44562    arguments="EOL"
44563    new_path=`$CYGPATH -u "$path"`
44564    new_path=`$WHICH "$new_path" 2> /dev/null`
44565    # bat and cmd files are not always considered executable in cygwin causing which
44566    # to not find them
44567    if test "x$new_path" = x \
44568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44570      new_path=`$CYGPATH -u "$path"`
44571    fi
44572    if test "x$new_path" = x; then
44573      # It's still not found. Now this is an unrecoverable error.
44574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44575$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44576      has_space=`$ECHO "$complete" | $GREP " "`
44577      if test "x$has_space" != x; then
44578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44580      fi
44581      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44582    fi
44583  fi
44584
44585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44588  # "foo.exe" is OK but "foo" is an error.
44589  #
44590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44591  # It is also a way to make sure we got the proper file name for the real test later on.
44592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44593  if test "x$test_shortpath" = x; then
44594    # Short path failed, file does not exist as specified.
44595    # Try adding .exe or .cmd
44596    if test -f "${new_path}.exe"; then
44597      input_to_shortpath="${new_path}.exe"
44598    elif test -f "${new_path}.cmd"; then
44599      input_to_shortpath="${new_path}.cmd"
44600    else
44601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44602$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44605      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44606    fi
44607  else
44608    input_to_shortpath="$new_path"
44609  fi
44610
44611  # Call helper function which possibly converts this using DOS-style short mode.
44612  # If so, the updated path is stored in $new_path.
44613  new_path="$input_to_shortpath"
44614
44615  input_path="$input_to_shortpath"
44616  # Check if we need to convert this using DOS-style short mode. If the path
44617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44618  # take no chances and rewrite it.
44619  # Note: m4 eats our [], so we need to use [ and ] instead.
44620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44621  if test "x$has_forbidden_chars" != x; then
44622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44626      # Going to short mode and back again did indeed matter. Since short mode is
44627      # case insensitive, let's make it lowercase to improve readability.
44628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44629      # Now convert it back to Unix-style (cygpath)
44630      input_path=`$CYGPATH -u "$shortmode_path"`
44631      new_path="$input_path"
44632    fi
44633  fi
44634
44635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44636  if test "x$test_cygdrive_prefix" = x; then
44637    # As a simple fix, exclude /usr/bin since it's not a real path.
44638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44640      # a path prefixed by /cygdrive for fixpath to work.
44641      new_path="$CYGWIN_ROOT_PATH$input_path"
44642    fi
44643  fi
44644
44645  # remove trailing .exe if any
44646  new_path="${new_path/%.exe/}"
44647
44648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44649
44650  # First separate the path from the arguments. This will split at the first
44651  # space.
44652  complete="$OBJDUMP"
44653  path="${complete%% *}"
44654  tmp="$complete EOL"
44655  arguments="${tmp#* }"
44656
44657  # Input might be given as Windows format, start by converting to
44658  # unix format.
44659  new_path="$path"
44660
44661  windows_path="$new_path"
44662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44663    unix_path=`$CYGPATH -u "$windows_path"`
44664    new_path="$unix_path"
44665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44667    new_path="$unix_path"
44668  fi
44669
44670
44671  # Now try to locate executable using which
44672  new_path=`$WHICH "$new_path" 2> /dev/null`
44673
44674  if test "x$new_path" = x; then
44675    # Oops. Which didn't find the executable.
44676    # The splitting of arguments from the executable at a space might have been incorrect,
44677    # since paths with space are more likely in Windows. Give it another try with the whole
44678    # argument.
44679    path="$complete"
44680    arguments="EOL"
44681    new_path="$path"
44682
44683  windows_path="$new_path"
44684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44685    unix_path=`$CYGPATH -u "$windows_path"`
44686    new_path="$unix_path"
44687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44689    new_path="$unix_path"
44690  fi
44691
44692
44693    new_path=`$WHICH "$new_path" 2> /dev/null`
44694    # bat and cmd files are not always considered executable in MSYS causing which
44695    # to not find them
44696    if test "x$new_path" = x \
44697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44699      new_path="$path"
44700
44701  windows_path="$new_path"
44702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44703    unix_path=`$CYGPATH -u "$windows_path"`
44704    new_path="$unix_path"
44705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44707    new_path="$unix_path"
44708  fi
44709
44710    fi
44711
44712    if test "x$new_path" = x; then
44713      # It's still not found. Now this is an unrecoverable error.
44714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44715$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44716      has_space=`$ECHO "$complete" | $GREP " "`
44717      if test "x$has_space" != x; then
44718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44720      fi
44721      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44722    fi
44723  fi
44724
44725  # Now new_path has a complete unix path to the binary
44726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44727    # Keep paths in /bin as-is, but remove trailing .exe if any
44728    new_path="${new_path/%.exe/}"
44729    # Do not save /bin paths to all_fixpath_prefixes!
44730  else
44731    # Not in mixed or Windows style, start by that.
44732    new_path=`cmd //c echo $new_path`
44733
44734  input_path="$new_path"
44735  # Check if we need to convert this using DOS-style short mode. If the path
44736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44737  # take no chances and rewrite it.
44738  # Note: m4 eats our [], so we need to use [ and ] instead.
44739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44740  if test "x$has_forbidden_chars" != x; then
44741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44743  fi
44744
44745    # Output is in $new_path
44746
44747  windows_path="$new_path"
44748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44749    unix_path=`$CYGPATH -u "$windows_path"`
44750    new_path="$unix_path"
44751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44753    new_path="$unix_path"
44754  fi
44755
44756    # remove trailing .exe if any
44757    new_path="${new_path/%.exe/}"
44758
44759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44761  fi
44762
44763    else
44764      # We're on a unix platform. Hooray! :)
44765      # First separate the path from the arguments. This will split at the first
44766      # space.
44767      complete="$OBJDUMP"
44768      path="${complete%% *}"
44769      tmp="$complete EOL"
44770      arguments="${tmp#* }"
44771
44772      # Cannot rely on the command "which" here since it doesn't always work.
44773      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44774      if test -z "$is_absolute_path"; then
44775        # Path to executable is not absolute. Find it.
44776        IFS_save="$IFS"
44777        IFS=:
44778        for p in $PATH; do
44779          if test -f "$p/$path" && test -x "$p/$path"; then
44780            new_path="$p/$path"
44781            break
44782          fi
44783        done
44784        IFS="$IFS_save"
44785      else
44786        # This is an absolute path, we can use it without further modifications.
44787        new_path="$path"
44788      fi
44789
44790      if test "x$new_path" = x; then
44791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44792$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44793        has_space=`$ECHO "$complete" | $GREP " "`
44794        if test "x$has_space" != x; then
44795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44797        fi
44798        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44799      fi
44800    fi
44801
44802    # Now join together the path and the arguments once again
44803    if test "x$arguments" != xEOL; then
44804      new_complete="$new_path ${arguments% *}"
44805    else
44806      new_complete="$new_path"
44807    fi
44808
44809    if test "x$complete" != "x$new_complete"; then
44810      OBJDUMP="$new_complete"
44811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44812$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44813    fi
44814  fi
44815
44816  fi
44817
44818
44819  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44820  # to remain in place. Otherwise the compiler will not work in some siutations
44821  # in later configure checks.
44822  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44823    PATH="$OLD_PATH"
44824  fi
44825
44826  # Restore the flags to the user specified values.
44827  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44828  CFLAGS="$ORG_CFLAGS"
44829  CXXFLAGS="$ORG_CXXFLAGS"
44830
44831
44832# Finally do some processing after the detection phase
44833
44834  if test "x$COMPILE_TYPE" = "xcross"; then
44835    # Now we need to find a C/C++ compiler that can build executables for the
44836    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44837    # used once. Also, we need to do this without adding a tools dir to the
44838    # path, otherwise we might pick up cross-compilers which don't use standard
44839    # naming.
44840
44841    OLDPATH="$PATH"
44842
44843
44844# Check whether --with-build-devkit was given.
44845if test "${with_build_devkit+set}" = set; then :
44846  withval=$with_build_devkit;
44847fi
44848
44849    if test "x$with_build_devkit" = "xyes"; then
44850      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44851    elif test -n "$with_build_devkit"; then
44852      if test ! -d "$with_build_devkit"; then
44853        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44854      else
44855
44856  # Only process if variable expands to non-empty
44857
44858  if test "x$with_build_devkit" != x; then
44859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44860
44861  # Input might be given as Windows format, start by converting to
44862  # unix format.
44863  path="$with_build_devkit"
44864  new_path=`$CYGPATH -u "$path"`
44865
44866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44869  # "foo.exe" is OK but "foo" is an error.
44870  #
44871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44872  # It is also a way to make sure we got the proper file name for the real test later on.
44873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44874  if test "x$test_shortpath" = x; then
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44876$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44877    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44878  fi
44879
44880  # Call helper function which possibly converts this using DOS-style short mode.
44881  # If so, the updated path is stored in $new_path.
44882
44883  input_path="$new_path"
44884  # Check if we need to convert this using DOS-style short mode. If the path
44885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44886  # take no chances and rewrite it.
44887  # Note: m4 eats our [], so we need to use [ and ] instead.
44888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44889  if test "x$has_forbidden_chars" != x; then
44890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44894      # Going to short mode and back again did indeed matter. Since short mode is
44895      # case insensitive, let's make it lowercase to improve readability.
44896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44897      # Now convert it back to Unix-style (cygpath)
44898      input_path=`$CYGPATH -u "$shortmode_path"`
44899      new_path="$input_path"
44900    fi
44901  fi
44902
44903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44904  if test "x$test_cygdrive_prefix" = x; then
44905    # As a simple fix, exclude /usr/bin since it's not a real path.
44906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44908      # a path prefixed by /cygdrive for fixpath to work.
44909      new_path="$CYGWIN_ROOT_PATH$input_path"
44910    fi
44911  fi
44912
44913
44914  if test "x$path" != "x$new_path"; then
44915    with_build_devkit="$new_path"
44916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44917$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44918  fi
44919
44920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921
44922  path="$with_build_devkit"
44923  has_colon=`$ECHO $path | $GREP ^.:`
44924  new_path="$path"
44925  if test "x$has_colon" = x; then
44926    # Not in mixed or Windows style, start by that.
44927    new_path=`cmd //c echo $path`
44928  fi
44929
44930
44931  input_path="$new_path"
44932  # Check if we need to convert this using DOS-style short mode. If the path
44933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44934  # take no chances and rewrite it.
44935  # Note: m4 eats our [], so we need to use [ and ] instead.
44936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44937  if test "x$has_forbidden_chars" != x; then
44938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44940  fi
44941
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952  if test "x$path" != "x$new_path"; then
44953    with_build_devkit="$new_path"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44955$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44956  fi
44957
44958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44960
44961    else
44962      # We're on a unix platform. Hooray! :)
44963      path="$with_build_devkit"
44964      has_space=`$ECHO "$path" | $GREP " "`
44965      if test "x$has_space" != x; then
44966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44967$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44969      fi
44970
44971      # Use eval to expand a potential ~
44972      eval path="$path"
44973      if test ! -f "$path" && test ! -d "$path"; then
44974        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44975      fi
44976
44977      if test -d "$path"; then
44978        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44979      else
44980        dir="`$DIRNAME "$path"`"
44981        base="`$BASENAME "$path"`"
44982        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44983      fi
44984    fi
44985  fi
44986
44987        BUILD_DEVKIT_ROOT="$with_build_devkit"
44988        # Check for a meta data info file in the root of the devkit
44989        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44990          # Process devkit.info so that existing devkit variables are not
44991          # modified by this
44992          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44993              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44994              -e "s/\$host/\$build/g" \
44995              $BUILD_DEVKIT_ROOT/devkit.info \
44996              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44997          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44998          # This potentially sets the following:
44999          # A descriptive name of the devkit
45000
45001  if test "x$BUILD_DEVKIT_NAME" = x; then
45002    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
45003  fi
45004
45005          # Corresponds to --with-extra-path
45006
45007  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
45008    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
45009  fi
45010
45011          # Corresponds to --with-toolchain-path
45012
45013  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45014    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
45015  fi
45016
45017          # Corresponds to --with-sysroot
45018
45019  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
45020    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
45021  fi
45022
45023          # Skip the Window specific parts
45024        fi
45025
45026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
45027$as_echo_n "checking for build platform devkit... " >&6; }
45028        if test "x$BUILD_DEVKIT_NAME" != x; then
45029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
45030$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
45031        else
45032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
45033$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
45034        fi
45035
45036        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
45037
45038  if test "x$BUILD_SYSROOT" != "x"; then
45039    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45040      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45041        # Solaris Studio does not have a concept of sysroot. Instead we must
45042        # make sure the default include and lib dirs are appended to each
45043        # compile and link command line. Must also add -I-xbuiltin to enable
45044        # inlining of system functions and intrinsics.
45045        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
45046        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
45047            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
45048      fi
45049    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45050      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
45051      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
45052    elif test "x$TOOLCHAIN_TYPE" = xclang; then
45053      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
45054      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
45055    fi
45056    # The global CFLAGS and LDFLAGS variables need these for configure to function
45057    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
45058    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
45059    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
45060    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
45061  fi
45062
45063  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45064    # We also need -iframework<path>/System/Library/Frameworks
45065    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45066    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45067    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45068    # set this here so it doesn't have to be peppered throughout the forest
45069    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45070    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45071  fi
45072
45073
45074
45075
45076
45077         # Fallback default of just /bin if DEVKIT_PATH is not defined
45078        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45079          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45080        fi
45081        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45082      fi
45083    fi
45084
45085    # FIXME: we should list the discovered compilers as an exclude pattern!
45086    # If we do that, we can do this detection before POST_DETECTION, and still
45087    # find the build compilers in the tools dir, if needed.
45088
45089
45090
45091  # Publish this variable in the help.
45092
45093
45094  if [ -z "${BUILD_CC+x}" ]; then
45095    # The variable is not set by user, try to locate tool using the code snippet
45096    for ac_prog in cl cc gcc
45097do
45098  # Extract the first word of "$ac_prog", so it can be a program name with args.
45099set dummy $ac_prog; ac_word=$2
45100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45101$as_echo_n "checking for $ac_word... " >&6; }
45102if ${ac_cv_path_BUILD_CC+:} false; then :
45103  $as_echo_n "(cached) " >&6
45104else
45105  case $BUILD_CC in
45106  [\\/]* | ?:[\\/]*)
45107  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45108  ;;
45109  *)
45110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45111for as_dir in $PATH
45112do
45113  IFS=$as_save_IFS
45114  test -z "$as_dir" && as_dir=.
45115    for ac_exec_ext in '' $ac_executable_extensions; do
45116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45117    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45119    break 2
45120  fi
45121done
45122  done
45123IFS=$as_save_IFS
45124
45125  ;;
45126esac
45127fi
45128BUILD_CC=$ac_cv_path_BUILD_CC
45129if test -n "$BUILD_CC"; then
45130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45131$as_echo "$BUILD_CC" >&6; }
45132else
45133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45134$as_echo "no" >&6; }
45135fi
45136
45137
45138  test -n "$BUILD_CC" && break
45139done
45140
45141  else
45142    # The variable is set, but is it from the command line or the environment?
45143
45144    # Try to remove the string !BUILD_CC! from our list.
45145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45147      # If it failed, the variable was not from the command line. Ignore it,
45148      # but warn the user (except for BASH, which is always set by the calling BASH).
45149      if test "xBUILD_CC" != xBASH; then
45150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45151$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45152      fi
45153      # Try to locate tool using the code snippet
45154      for ac_prog in cl cc gcc
45155do
45156  # Extract the first word of "$ac_prog", so it can be a program name with args.
45157set dummy $ac_prog; ac_word=$2
45158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45159$as_echo_n "checking for $ac_word... " >&6; }
45160if ${ac_cv_path_BUILD_CC+:} false; then :
45161  $as_echo_n "(cached) " >&6
45162else
45163  case $BUILD_CC in
45164  [\\/]* | ?:[\\/]*)
45165  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45166  ;;
45167  *)
45168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45169for as_dir in $PATH
45170do
45171  IFS=$as_save_IFS
45172  test -z "$as_dir" && as_dir=.
45173    for ac_exec_ext in '' $ac_executable_extensions; do
45174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45175    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45177    break 2
45178  fi
45179done
45180  done
45181IFS=$as_save_IFS
45182
45183  ;;
45184esac
45185fi
45186BUILD_CC=$ac_cv_path_BUILD_CC
45187if test -n "$BUILD_CC"; then
45188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45189$as_echo "$BUILD_CC" >&6; }
45190else
45191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45192$as_echo "no" >&6; }
45193fi
45194
45195
45196  test -n "$BUILD_CC" && break
45197done
45198
45199    else
45200      # If it succeeded, then it was overridden by the user. We will use it
45201      # for the tool.
45202
45203      # First remove it from the list of overridden variables, so we can test
45204      # for unknown variables in the end.
45205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45206
45207      # Check if we try to supply an empty value
45208      if test "x$BUILD_CC" = x; then
45209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45210$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45212$as_echo_n "checking for BUILD_CC... " >&6; }
45213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45214$as_echo "disabled" >&6; }
45215      else
45216        # Check if the provided tool contains a complete path.
45217        tool_specified="$BUILD_CC"
45218        tool_basename="${tool_specified##*/}"
45219        if test "x$tool_basename" = "x$tool_specified"; then
45220          # A command without a complete path is provided, search $PATH.
45221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45222$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45223          # Extract the first word of "$tool_basename", so it can be a program name with args.
45224set dummy $tool_basename; ac_word=$2
45225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45226$as_echo_n "checking for $ac_word... " >&6; }
45227if ${ac_cv_path_BUILD_CC+:} false; then :
45228  $as_echo_n "(cached) " >&6
45229else
45230  case $BUILD_CC in
45231  [\\/]* | ?:[\\/]*)
45232  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45233  ;;
45234  *)
45235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45236for as_dir in $PATH
45237do
45238  IFS=$as_save_IFS
45239  test -z "$as_dir" && as_dir=.
45240    for ac_exec_ext in '' $ac_executable_extensions; do
45241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45242    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45244    break 2
45245  fi
45246done
45247  done
45248IFS=$as_save_IFS
45249
45250  ;;
45251esac
45252fi
45253BUILD_CC=$ac_cv_path_BUILD_CC
45254if test -n "$BUILD_CC"; then
45255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45256$as_echo "$BUILD_CC" >&6; }
45257else
45258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45259$as_echo "no" >&6; }
45260fi
45261
45262
45263          if test "x$BUILD_CC" = x; then
45264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45265          fi
45266        else
45267          # Otherwise we believe it is a complete path. Use it as it is.
45268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45269$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45271$as_echo_n "checking for BUILD_CC... " >&6; }
45272          if test ! -x "$tool_specified"; then
45273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45274$as_echo "not found" >&6; }
45275            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45276          fi
45277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45278$as_echo "$tool_specified" >&6; }
45279        fi
45280      fi
45281    fi
45282
45283  fi
45284
45285
45286
45287  if test "x$BUILD_CC" = x; then
45288    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45289  fi
45290
45291
45292
45293  # Only process if variable expands to non-empty
45294
45295  if test "x$BUILD_CC" != x; then
45296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45297
45298  # First separate the path from the arguments. This will split at the first
45299  # space.
45300  complete="$BUILD_CC"
45301  path="${complete%% *}"
45302  tmp="$complete EOL"
45303  arguments="${tmp#* }"
45304
45305  # Input might be given as Windows format, start by converting to
45306  # unix format.
45307  new_path=`$CYGPATH -u "$path"`
45308
45309  # Now try to locate executable using which
45310  new_path=`$WHICH "$new_path" 2> /dev/null`
45311  # bat and cmd files are not always considered executable in cygwin causing which
45312  # to not find them
45313  if test "x$new_path" = x \
45314      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45315      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45316    new_path=`$CYGPATH -u "$path"`
45317  fi
45318  if test "x$new_path" = x; then
45319    # Oops. Which didn't find the executable.
45320    # The splitting of arguments from the executable at a space might have been incorrect,
45321    # since paths with space are more likely in Windows. Give it another try with the whole
45322    # argument.
45323    path="$complete"
45324    arguments="EOL"
45325    new_path=`$CYGPATH -u "$path"`
45326    new_path=`$WHICH "$new_path" 2> /dev/null`
45327    # bat and cmd files are not always considered executable in cygwin causing which
45328    # to not find them
45329    if test "x$new_path" = x \
45330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45332      new_path=`$CYGPATH -u "$path"`
45333    fi
45334    if test "x$new_path" = x; then
45335      # It's still not found. Now this is an unrecoverable error.
45336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45337$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45338      has_space=`$ECHO "$complete" | $GREP " "`
45339      if test "x$has_space" != x; then
45340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45342      fi
45343      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45344    fi
45345  fi
45346
45347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45350  # "foo.exe" is OK but "foo" is an error.
45351  #
45352  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45353  # It is also a way to make sure we got the proper file name for the real test later on.
45354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45355  if test "x$test_shortpath" = x; then
45356    # Short path failed, file does not exist as specified.
45357    # Try adding .exe or .cmd
45358    if test -f "${new_path}.exe"; then
45359      input_to_shortpath="${new_path}.exe"
45360    elif test -f "${new_path}.cmd"; then
45361      input_to_shortpath="${new_path}.cmd"
45362    else
45363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45364$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45367      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45368    fi
45369  else
45370    input_to_shortpath="$new_path"
45371  fi
45372
45373  # Call helper function which possibly converts this using DOS-style short mode.
45374  # If so, the updated path is stored in $new_path.
45375  new_path="$input_to_shortpath"
45376
45377  input_path="$input_to_shortpath"
45378  # Check if we need to convert this using DOS-style short mode. If the path
45379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45380  # take no chances and rewrite it.
45381  # Note: m4 eats our [], so we need to use [ and ] instead.
45382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45383  if test "x$has_forbidden_chars" != x; then
45384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45388      # Going to short mode and back again did indeed matter. Since short mode is
45389      # case insensitive, let's make it lowercase to improve readability.
45390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45391      # Now convert it back to Unix-style (cygpath)
45392      input_path=`$CYGPATH -u "$shortmode_path"`
45393      new_path="$input_path"
45394    fi
45395  fi
45396
45397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45398  if test "x$test_cygdrive_prefix" = x; then
45399    # As a simple fix, exclude /usr/bin since it's not a real path.
45400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45402      # a path prefixed by /cygdrive for fixpath to work.
45403      new_path="$CYGWIN_ROOT_PATH$input_path"
45404    fi
45405  fi
45406
45407  # remove trailing .exe if any
45408  new_path="${new_path/%.exe/}"
45409
45410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45411
45412  # First separate the path from the arguments. This will split at the first
45413  # space.
45414  complete="$BUILD_CC"
45415  path="${complete%% *}"
45416  tmp="$complete EOL"
45417  arguments="${tmp#* }"
45418
45419  # Input might be given as Windows format, start by converting to
45420  # unix format.
45421  new_path="$path"
45422
45423  windows_path="$new_path"
45424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45425    unix_path=`$CYGPATH -u "$windows_path"`
45426    new_path="$unix_path"
45427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45429    new_path="$unix_path"
45430  fi
45431
45432
45433  # Now try to locate executable using which
45434  new_path=`$WHICH "$new_path" 2> /dev/null`
45435
45436  if test "x$new_path" = x; then
45437    # Oops. Which didn't find the executable.
45438    # The splitting of arguments from the executable at a space might have been incorrect,
45439    # since paths with space are more likely in Windows. Give it another try with the whole
45440    # argument.
45441    path="$complete"
45442    arguments="EOL"
45443    new_path="$path"
45444
45445  windows_path="$new_path"
45446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45447    unix_path=`$CYGPATH -u "$windows_path"`
45448    new_path="$unix_path"
45449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45451    new_path="$unix_path"
45452  fi
45453
45454
45455    new_path=`$WHICH "$new_path" 2> /dev/null`
45456    # bat and cmd files are not always considered executable in MSYS causing which
45457    # to not find them
45458    if test "x$new_path" = x \
45459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45461      new_path="$path"
45462
45463  windows_path="$new_path"
45464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45465    unix_path=`$CYGPATH -u "$windows_path"`
45466    new_path="$unix_path"
45467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45469    new_path="$unix_path"
45470  fi
45471
45472    fi
45473
45474    if test "x$new_path" = x; then
45475      # It's still not found. Now this is an unrecoverable error.
45476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45477$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45478      has_space=`$ECHO "$complete" | $GREP " "`
45479      if test "x$has_space" != x; then
45480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45482      fi
45483      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45484    fi
45485  fi
45486
45487  # Now new_path has a complete unix path to the binary
45488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45489    # Keep paths in /bin as-is, but remove trailing .exe if any
45490    new_path="${new_path/%.exe/}"
45491    # Do not save /bin paths to all_fixpath_prefixes!
45492  else
45493    # Not in mixed or Windows style, start by that.
45494    new_path=`cmd //c echo $new_path`
45495
45496  input_path="$new_path"
45497  # Check if we need to convert this using DOS-style short mode. If the path
45498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45499  # take no chances and rewrite it.
45500  # Note: m4 eats our [], so we need to use [ and ] instead.
45501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45502  if test "x$has_forbidden_chars" != x; then
45503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45505  fi
45506
45507    # Output is in $new_path
45508
45509  windows_path="$new_path"
45510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45511    unix_path=`$CYGPATH -u "$windows_path"`
45512    new_path="$unix_path"
45513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45515    new_path="$unix_path"
45516  fi
45517
45518    # remove trailing .exe if any
45519    new_path="${new_path/%.exe/}"
45520
45521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45523  fi
45524
45525    else
45526      # We're on a unix platform. Hooray! :)
45527      # First separate the path from the arguments. This will split at the first
45528      # space.
45529      complete="$BUILD_CC"
45530      path="${complete%% *}"
45531      tmp="$complete EOL"
45532      arguments="${tmp#* }"
45533
45534      # Cannot rely on the command "which" here since it doesn't always work.
45535      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45536      if test -z "$is_absolute_path"; then
45537        # Path to executable is not absolute. Find it.
45538        IFS_save="$IFS"
45539        IFS=:
45540        for p in $PATH; do
45541          if test -f "$p/$path" && test -x "$p/$path"; then
45542            new_path="$p/$path"
45543            break
45544          fi
45545        done
45546        IFS="$IFS_save"
45547      else
45548        # This is an absolute path, we can use it without further modifications.
45549        new_path="$path"
45550      fi
45551
45552      if test "x$new_path" = x; then
45553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45554$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45555        has_space=`$ECHO "$complete" | $GREP " "`
45556        if test "x$has_space" != x; then
45557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45559        fi
45560        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45561      fi
45562    fi
45563
45564    # Now join together the path and the arguments once again
45565    if test "x$arguments" != xEOL; then
45566      new_complete="$new_path ${arguments% *}"
45567    else
45568      new_complete="$new_path"
45569    fi
45570
45571    if test "x$complete" != "x$new_complete"; then
45572      BUILD_CC="$new_complete"
45573      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45574$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45575    fi
45576  fi
45577
45578
45579
45580
45581  # Publish this variable in the help.
45582
45583
45584  if [ -z "${BUILD_CXX+x}" ]; then
45585    # The variable is not set by user, try to locate tool using the code snippet
45586    for ac_prog in cl CC g++
45587do
45588  # Extract the first word of "$ac_prog", so it can be a program name with args.
45589set dummy $ac_prog; ac_word=$2
45590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45591$as_echo_n "checking for $ac_word... " >&6; }
45592if ${ac_cv_path_BUILD_CXX+:} false; then :
45593  $as_echo_n "(cached) " >&6
45594else
45595  case $BUILD_CXX in
45596  [\\/]* | ?:[\\/]*)
45597  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45598  ;;
45599  *)
45600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45601for as_dir in $PATH
45602do
45603  IFS=$as_save_IFS
45604  test -z "$as_dir" && as_dir=.
45605    for ac_exec_ext in '' $ac_executable_extensions; do
45606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45607    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45609    break 2
45610  fi
45611done
45612  done
45613IFS=$as_save_IFS
45614
45615  ;;
45616esac
45617fi
45618BUILD_CXX=$ac_cv_path_BUILD_CXX
45619if test -n "$BUILD_CXX"; then
45620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45621$as_echo "$BUILD_CXX" >&6; }
45622else
45623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45624$as_echo "no" >&6; }
45625fi
45626
45627
45628  test -n "$BUILD_CXX" && break
45629done
45630
45631  else
45632    # The variable is set, but is it from the command line or the environment?
45633
45634    # Try to remove the string !BUILD_CXX! from our list.
45635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45637      # If it failed, the variable was not from the command line. Ignore it,
45638      # but warn the user (except for BASH, which is always set by the calling BASH).
45639      if test "xBUILD_CXX" != xBASH; then
45640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45641$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45642      fi
45643      # Try to locate tool using the code snippet
45644      for ac_prog in cl CC g++
45645do
45646  # Extract the first word of "$ac_prog", so it can be a program name with args.
45647set dummy $ac_prog; ac_word=$2
45648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45649$as_echo_n "checking for $ac_word... " >&6; }
45650if ${ac_cv_path_BUILD_CXX+:} false; then :
45651  $as_echo_n "(cached) " >&6
45652else
45653  case $BUILD_CXX in
45654  [\\/]* | ?:[\\/]*)
45655  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45656  ;;
45657  *)
45658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45659for as_dir in $PATH
45660do
45661  IFS=$as_save_IFS
45662  test -z "$as_dir" && as_dir=.
45663    for ac_exec_ext in '' $ac_executable_extensions; do
45664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45665    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45667    break 2
45668  fi
45669done
45670  done
45671IFS=$as_save_IFS
45672
45673  ;;
45674esac
45675fi
45676BUILD_CXX=$ac_cv_path_BUILD_CXX
45677if test -n "$BUILD_CXX"; then
45678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45679$as_echo "$BUILD_CXX" >&6; }
45680else
45681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45682$as_echo "no" >&6; }
45683fi
45684
45685
45686  test -n "$BUILD_CXX" && break
45687done
45688
45689    else
45690      # If it succeeded, then it was overridden by the user. We will use it
45691      # for the tool.
45692
45693      # First remove it from the list of overridden variables, so we can test
45694      # for unknown variables in the end.
45695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45696
45697      # Check if we try to supply an empty value
45698      if test "x$BUILD_CXX" = x; then
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45700$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45702$as_echo_n "checking for BUILD_CXX... " >&6; }
45703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45704$as_echo "disabled" >&6; }
45705      else
45706        # Check if the provided tool contains a complete path.
45707        tool_specified="$BUILD_CXX"
45708        tool_basename="${tool_specified##*/}"
45709        if test "x$tool_basename" = "x$tool_specified"; then
45710          # A command without a complete path is provided, search $PATH.
45711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45712$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45713          # Extract the first word of "$tool_basename", so it can be a program name with args.
45714set dummy $tool_basename; ac_word=$2
45715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45716$as_echo_n "checking for $ac_word... " >&6; }
45717if ${ac_cv_path_BUILD_CXX+:} false; then :
45718  $as_echo_n "(cached) " >&6
45719else
45720  case $BUILD_CXX in
45721  [\\/]* | ?:[\\/]*)
45722  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45723  ;;
45724  *)
45725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45726for as_dir in $PATH
45727do
45728  IFS=$as_save_IFS
45729  test -z "$as_dir" && as_dir=.
45730    for ac_exec_ext in '' $ac_executable_extensions; do
45731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45732    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45734    break 2
45735  fi
45736done
45737  done
45738IFS=$as_save_IFS
45739
45740  ;;
45741esac
45742fi
45743BUILD_CXX=$ac_cv_path_BUILD_CXX
45744if test -n "$BUILD_CXX"; then
45745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45746$as_echo "$BUILD_CXX" >&6; }
45747else
45748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45749$as_echo "no" >&6; }
45750fi
45751
45752
45753          if test "x$BUILD_CXX" = x; then
45754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45755          fi
45756        else
45757          # Otherwise we believe it is a complete path. Use it as it is.
45758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45759$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45761$as_echo_n "checking for BUILD_CXX... " >&6; }
45762          if test ! -x "$tool_specified"; then
45763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45764$as_echo "not found" >&6; }
45765            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45766          fi
45767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45768$as_echo "$tool_specified" >&6; }
45769        fi
45770      fi
45771    fi
45772
45773  fi
45774
45775
45776
45777  if test "x$BUILD_CXX" = x; then
45778    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45779  fi
45780
45781
45782
45783  # Only process if variable expands to non-empty
45784
45785  if test "x$BUILD_CXX" != x; then
45786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45787
45788  # First separate the path from the arguments. This will split at the first
45789  # space.
45790  complete="$BUILD_CXX"
45791  path="${complete%% *}"
45792  tmp="$complete EOL"
45793  arguments="${tmp#* }"
45794
45795  # Input might be given as Windows format, start by converting to
45796  # unix format.
45797  new_path=`$CYGPATH -u "$path"`
45798
45799  # Now try to locate executable using which
45800  new_path=`$WHICH "$new_path" 2> /dev/null`
45801  # bat and cmd files are not always considered executable in cygwin causing which
45802  # to not find them
45803  if test "x$new_path" = x \
45804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45806    new_path=`$CYGPATH -u "$path"`
45807  fi
45808  if test "x$new_path" = x; then
45809    # Oops. Which didn't find the executable.
45810    # The splitting of arguments from the executable at a space might have been incorrect,
45811    # since paths with space are more likely in Windows. Give it another try with the whole
45812    # argument.
45813    path="$complete"
45814    arguments="EOL"
45815    new_path=`$CYGPATH -u "$path"`
45816    new_path=`$WHICH "$new_path" 2> /dev/null`
45817    # bat and cmd files are not always considered executable in cygwin causing which
45818    # to not find them
45819    if test "x$new_path" = x \
45820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45822      new_path=`$CYGPATH -u "$path"`
45823    fi
45824    if test "x$new_path" = x; then
45825      # It's still not found. Now this is an unrecoverable error.
45826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45827$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45828      has_space=`$ECHO "$complete" | $GREP " "`
45829      if test "x$has_space" != x; then
45830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45832      fi
45833      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45834    fi
45835  fi
45836
45837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45840  # "foo.exe" is OK but "foo" is an error.
45841  #
45842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45843  # It is also a way to make sure we got the proper file name for the real test later on.
45844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45845  if test "x$test_shortpath" = x; then
45846    # Short path failed, file does not exist as specified.
45847    # Try adding .exe or .cmd
45848    if test -f "${new_path}.exe"; then
45849      input_to_shortpath="${new_path}.exe"
45850    elif test -f "${new_path}.cmd"; then
45851      input_to_shortpath="${new_path}.cmd"
45852    else
45853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45854$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45857      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45858    fi
45859  else
45860    input_to_shortpath="$new_path"
45861  fi
45862
45863  # Call helper function which possibly converts this using DOS-style short mode.
45864  # If so, the updated path is stored in $new_path.
45865  new_path="$input_to_shortpath"
45866
45867  input_path="$input_to_shortpath"
45868  # Check if we need to convert this using DOS-style short mode. If the path
45869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45870  # take no chances and rewrite it.
45871  # Note: m4 eats our [], so we need to use [ and ] instead.
45872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45873  if test "x$has_forbidden_chars" != x; then
45874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45878      # Going to short mode and back again did indeed matter. Since short mode is
45879      # case insensitive, let's make it lowercase to improve readability.
45880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45881      # Now convert it back to Unix-style (cygpath)
45882      input_path=`$CYGPATH -u "$shortmode_path"`
45883      new_path="$input_path"
45884    fi
45885  fi
45886
45887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45888  if test "x$test_cygdrive_prefix" = x; then
45889    # As a simple fix, exclude /usr/bin since it's not a real path.
45890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45892      # a path prefixed by /cygdrive for fixpath to work.
45893      new_path="$CYGWIN_ROOT_PATH$input_path"
45894    fi
45895  fi
45896
45897  # remove trailing .exe if any
45898  new_path="${new_path/%.exe/}"
45899
45900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45901
45902  # First separate the path from the arguments. This will split at the first
45903  # space.
45904  complete="$BUILD_CXX"
45905  path="${complete%% *}"
45906  tmp="$complete EOL"
45907  arguments="${tmp#* }"
45908
45909  # Input might be given as Windows format, start by converting to
45910  # unix format.
45911  new_path="$path"
45912
45913  windows_path="$new_path"
45914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45915    unix_path=`$CYGPATH -u "$windows_path"`
45916    new_path="$unix_path"
45917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45919    new_path="$unix_path"
45920  fi
45921
45922
45923  # Now try to locate executable using which
45924  new_path=`$WHICH "$new_path" 2> /dev/null`
45925
45926  if test "x$new_path" = x; then
45927    # Oops. Which didn't find the executable.
45928    # The splitting of arguments from the executable at a space might have been incorrect,
45929    # since paths with space are more likely in Windows. Give it another try with the whole
45930    # argument.
45931    path="$complete"
45932    arguments="EOL"
45933    new_path="$path"
45934
45935  windows_path="$new_path"
45936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45937    unix_path=`$CYGPATH -u "$windows_path"`
45938    new_path="$unix_path"
45939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45941    new_path="$unix_path"
45942  fi
45943
45944
45945    new_path=`$WHICH "$new_path" 2> /dev/null`
45946    # bat and cmd files are not always considered executable in MSYS causing which
45947    # to not find them
45948    if test "x$new_path" = x \
45949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45951      new_path="$path"
45952
45953  windows_path="$new_path"
45954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45955    unix_path=`$CYGPATH -u "$windows_path"`
45956    new_path="$unix_path"
45957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45959    new_path="$unix_path"
45960  fi
45961
45962    fi
45963
45964    if test "x$new_path" = x; then
45965      # It's still not found. Now this is an unrecoverable error.
45966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45967$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45968      has_space=`$ECHO "$complete" | $GREP " "`
45969      if test "x$has_space" != x; then
45970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45972      fi
45973      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45974    fi
45975  fi
45976
45977  # Now new_path has a complete unix path to the binary
45978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45979    # Keep paths in /bin as-is, but remove trailing .exe if any
45980    new_path="${new_path/%.exe/}"
45981    # Do not save /bin paths to all_fixpath_prefixes!
45982  else
45983    # Not in mixed or Windows style, start by that.
45984    new_path=`cmd //c echo $new_path`
45985
45986  input_path="$new_path"
45987  # Check if we need to convert this using DOS-style short mode. If the path
45988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45989  # take no chances and rewrite it.
45990  # Note: m4 eats our [], so we need to use [ and ] instead.
45991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45992  if test "x$has_forbidden_chars" != x; then
45993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45995  fi
45996
45997    # Output is in $new_path
45998
45999  windows_path="$new_path"
46000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46001    unix_path=`$CYGPATH -u "$windows_path"`
46002    new_path="$unix_path"
46003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46005    new_path="$unix_path"
46006  fi
46007
46008    # remove trailing .exe if any
46009    new_path="${new_path/%.exe/}"
46010
46011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46013  fi
46014
46015    else
46016      # We're on a unix platform. Hooray! :)
46017      # First separate the path from the arguments. This will split at the first
46018      # space.
46019      complete="$BUILD_CXX"
46020      path="${complete%% *}"
46021      tmp="$complete EOL"
46022      arguments="${tmp#* }"
46023
46024      # Cannot rely on the command "which" here since it doesn't always work.
46025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46026      if test -z "$is_absolute_path"; then
46027        # Path to executable is not absolute. Find it.
46028        IFS_save="$IFS"
46029        IFS=:
46030        for p in $PATH; do
46031          if test -f "$p/$path" && test -x "$p/$path"; then
46032            new_path="$p/$path"
46033            break
46034          fi
46035        done
46036        IFS="$IFS_save"
46037      else
46038        # This is an absolute path, we can use it without further modifications.
46039        new_path="$path"
46040      fi
46041
46042      if test "x$new_path" = x; then
46043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46044$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46045        has_space=`$ECHO "$complete" | $GREP " "`
46046        if test "x$has_space" != x; then
46047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46049        fi
46050        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46051      fi
46052    fi
46053
46054    # Now join together the path and the arguments once again
46055    if test "x$arguments" != xEOL; then
46056      new_complete="$new_path ${arguments% *}"
46057    else
46058      new_complete="$new_path"
46059    fi
46060
46061    if test "x$complete" != "x$new_complete"; then
46062      BUILD_CXX="$new_complete"
46063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
46064$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
46065    fi
46066  fi
46067
46068
46069
46070  # Publish this variable in the help.
46071
46072
46073  if [ -z "${BUILD_NM+x}" ]; then
46074    # The variable is not set by user, try to locate tool using the code snippet
46075    for ac_prog in nm gcc-nm
46076do
46077  # Extract the first word of "$ac_prog", so it can be a program name with args.
46078set dummy $ac_prog; ac_word=$2
46079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46080$as_echo_n "checking for $ac_word... " >&6; }
46081if ${ac_cv_path_BUILD_NM+:} false; then :
46082  $as_echo_n "(cached) " >&6
46083else
46084  case $BUILD_NM in
46085  [\\/]* | ?:[\\/]*)
46086  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46087  ;;
46088  *)
46089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46090for as_dir in $PATH
46091do
46092  IFS=$as_save_IFS
46093  test -z "$as_dir" && as_dir=.
46094    for ac_exec_ext in '' $ac_executable_extensions; do
46095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46096    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46098    break 2
46099  fi
46100done
46101  done
46102IFS=$as_save_IFS
46103
46104  ;;
46105esac
46106fi
46107BUILD_NM=$ac_cv_path_BUILD_NM
46108if test -n "$BUILD_NM"; then
46109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46110$as_echo "$BUILD_NM" >&6; }
46111else
46112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46113$as_echo "no" >&6; }
46114fi
46115
46116
46117  test -n "$BUILD_NM" && break
46118done
46119
46120  else
46121    # The variable is set, but is it from the command line or the environment?
46122
46123    # Try to remove the string !BUILD_NM! from our list.
46124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46126      # If it failed, the variable was not from the command line. Ignore it,
46127      # but warn the user (except for BASH, which is always set by the calling BASH).
46128      if test "xBUILD_NM" != xBASH; then
46129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46130$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46131      fi
46132      # Try to locate tool using the code snippet
46133      for ac_prog in nm gcc-nm
46134do
46135  # Extract the first word of "$ac_prog", so it can be a program name with args.
46136set dummy $ac_prog; ac_word=$2
46137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46138$as_echo_n "checking for $ac_word... " >&6; }
46139if ${ac_cv_path_BUILD_NM+:} false; then :
46140  $as_echo_n "(cached) " >&6
46141else
46142  case $BUILD_NM in
46143  [\\/]* | ?:[\\/]*)
46144  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46145  ;;
46146  *)
46147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46148for as_dir in $PATH
46149do
46150  IFS=$as_save_IFS
46151  test -z "$as_dir" && as_dir=.
46152    for ac_exec_ext in '' $ac_executable_extensions; do
46153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46154    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46156    break 2
46157  fi
46158done
46159  done
46160IFS=$as_save_IFS
46161
46162  ;;
46163esac
46164fi
46165BUILD_NM=$ac_cv_path_BUILD_NM
46166if test -n "$BUILD_NM"; then
46167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46168$as_echo "$BUILD_NM" >&6; }
46169else
46170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46171$as_echo "no" >&6; }
46172fi
46173
46174
46175  test -n "$BUILD_NM" && break
46176done
46177
46178    else
46179      # If it succeeded, then it was overridden by the user. We will use it
46180      # for the tool.
46181
46182      # First remove it from the list of overridden variables, so we can test
46183      # for unknown variables in the end.
46184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46185
46186      # Check if we try to supply an empty value
46187      if test "x$BUILD_NM" = x; then
46188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46189$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46191$as_echo_n "checking for BUILD_NM... " >&6; }
46192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46193$as_echo "disabled" >&6; }
46194      else
46195        # Check if the provided tool contains a complete path.
46196        tool_specified="$BUILD_NM"
46197        tool_basename="${tool_specified##*/}"
46198        if test "x$tool_basename" = "x$tool_specified"; then
46199          # A command without a complete path is provided, search $PATH.
46200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46201$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46202          # Extract the first word of "$tool_basename", so it can be a program name with args.
46203set dummy $tool_basename; ac_word=$2
46204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46205$as_echo_n "checking for $ac_word... " >&6; }
46206if ${ac_cv_path_BUILD_NM+:} false; then :
46207  $as_echo_n "(cached) " >&6
46208else
46209  case $BUILD_NM in
46210  [\\/]* | ?:[\\/]*)
46211  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46212  ;;
46213  *)
46214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46215for as_dir in $PATH
46216do
46217  IFS=$as_save_IFS
46218  test -z "$as_dir" && as_dir=.
46219    for ac_exec_ext in '' $ac_executable_extensions; do
46220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46221    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46223    break 2
46224  fi
46225done
46226  done
46227IFS=$as_save_IFS
46228
46229  ;;
46230esac
46231fi
46232BUILD_NM=$ac_cv_path_BUILD_NM
46233if test -n "$BUILD_NM"; then
46234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46235$as_echo "$BUILD_NM" >&6; }
46236else
46237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46238$as_echo "no" >&6; }
46239fi
46240
46241
46242          if test "x$BUILD_NM" = x; then
46243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46244          fi
46245        else
46246          # Otherwise we believe it is a complete path. Use it as it is.
46247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46248$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46250$as_echo_n "checking for BUILD_NM... " >&6; }
46251          if test ! -x "$tool_specified"; then
46252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46253$as_echo "not found" >&6; }
46254            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46255          fi
46256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46257$as_echo "$tool_specified" >&6; }
46258        fi
46259      fi
46260    fi
46261
46262  fi
46263
46264
46265
46266  # Only process if variable expands to non-empty
46267
46268  if test "x$BUILD_NM" != x; then
46269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46270
46271  # First separate the path from the arguments. This will split at the first
46272  # space.
46273  complete="$BUILD_NM"
46274  path="${complete%% *}"
46275  tmp="$complete EOL"
46276  arguments="${tmp#* }"
46277
46278  # Input might be given as Windows format, start by converting to
46279  # unix format.
46280  new_path=`$CYGPATH -u "$path"`
46281
46282  # Now try to locate executable using which
46283  new_path=`$WHICH "$new_path" 2> /dev/null`
46284  # bat and cmd files are not always considered executable in cygwin causing which
46285  # to not find them
46286  if test "x$new_path" = x \
46287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46289    new_path=`$CYGPATH -u "$path"`
46290  fi
46291  if test "x$new_path" = x; then
46292    # Oops. Which didn't find the executable.
46293    # The splitting of arguments from the executable at a space might have been incorrect,
46294    # since paths with space are more likely in Windows. Give it another try with the whole
46295    # argument.
46296    path="$complete"
46297    arguments="EOL"
46298    new_path=`$CYGPATH -u "$path"`
46299    new_path=`$WHICH "$new_path" 2> /dev/null`
46300    # bat and cmd files are not always considered executable in cygwin causing which
46301    # to not find them
46302    if test "x$new_path" = x \
46303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46305      new_path=`$CYGPATH -u "$path"`
46306    fi
46307    if test "x$new_path" = x; then
46308      # It's still not found. Now this is an unrecoverable error.
46309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46310$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46311      has_space=`$ECHO "$complete" | $GREP " "`
46312      if test "x$has_space" != x; then
46313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46315      fi
46316      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46317    fi
46318  fi
46319
46320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46323  # "foo.exe" is OK but "foo" is an error.
46324  #
46325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46326  # It is also a way to make sure we got the proper file name for the real test later on.
46327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46328  if test "x$test_shortpath" = x; then
46329    # Short path failed, file does not exist as specified.
46330    # Try adding .exe or .cmd
46331    if test -f "${new_path}.exe"; then
46332      input_to_shortpath="${new_path}.exe"
46333    elif test -f "${new_path}.cmd"; then
46334      input_to_shortpath="${new_path}.cmd"
46335    else
46336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46337$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46340      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46341    fi
46342  else
46343    input_to_shortpath="$new_path"
46344  fi
46345
46346  # Call helper function which possibly converts this using DOS-style short mode.
46347  # If so, the updated path is stored in $new_path.
46348  new_path="$input_to_shortpath"
46349
46350  input_path="$input_to_shortpath"
46351  # Check if we need to convert this using DOS-style short mode. If the path
46352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46353  # take no chances and rewrite it.
46354  # Note: m4 eats our [], so we need to use [ and ] instead.
46355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46356  if test "x$has_forbidden_chars" != x; then
46357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46361      # Going to short mode and back again did indeed matter. Since short mode is
46362      # case insensitive, let's make it lowercase to improve readability.
46363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46364      # Now convert it back to Unix-style (cygpath)
46365      input_path=`$CYGPATH -u "$shortmode_path"`
46366      new_path="$input_path"
46367    fi
46368  fi
46369
46370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46371  if test "x$test_cygdrive_prefix" = x; then
46372    # As a simple fix, exclude /usr/bin since it's not a real path.
46373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46375      # a path prefixed by /cygdrive for fixpath to work.
46376      new_path="$CYGWIN_ROOT_PATH$input_path"
46377    fi
46378  fi
46379
46380  # remove trailing .exe if any
46381  new_path="${new_path/%.exe/}"
46382
46383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46384
46385  # First separate the path from the arguments. This will split at the first
46386  # space.
46387  complete="$BUILD_NM"
46388  path="${complete%% *}"
46389  tmp="$complete EOL"
46390  arguments="${tmp#* }"
46391
46392  # Input might be given as Windows format, start by converting to
46393  # unix format.
46394  new_path="$path"
46395
46396  windows_path="$new_path"
46397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46398    unix_path=`$CYGPATH -u "$windows_path"`
46399    new_path="$unix_path"
46400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46402    new_path="$unix_path"
46403  fi
46404
46405
46406  # Now try to locate executable using which
46407  new_path=`$WHICH "$new_path" 2> /dev/null`
46408
46409  if test "x$new_path" = x; then
46410    # Oops. Which didn't find the executable.
46411    # The splitting of arguments from the executable at a space might have been incorrect,
46412    # since paths with space are more likely in Windows. Give it another try with the whole
46413    # argument.
46414    path="$complete"
46415    arguments="EOL"
46416    new_path="$path"
46417
46418  windows_path="$new_path"
46419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46420    unix_path=`$CYGPATH -u "$windows_path"`
46421    new_path="$unix_path"
46422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46424    new_path="$unix_path"
46425  fi
46426
46427
46428    new_path=`$WHICH "$new_path" 2> /dev/null`
46429    # bat and cmd files are not always considered executable in MSYS causing which
46430    # to not find them
46431    if test "x$new_path" = x \
46432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46434      new_path="$path"
46435
46436  windows_path="$new_path"
46437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46438    unix_path=`$CYGPATH -u "$windows_path"`
46439    new_path="$unix_path"
46440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46442    new_path="$unix_path"
46443  fi
46444
46445    fi
46446
46447    if test "x$new_path" = x; then
46448      # It's still not found. Now this is an unrecoverable error.
46449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46450$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46451      has_space=`$ECHO "$complete" | $GREP " "`
46452      if test "x$has_space" != x; then
46453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46455      fi
46456      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46457    fi
46458  fi
46459
46460  # Now new_path has a complete unix path to the binary
46461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46462    # Keep paths in /bin as-is, but remove trailing .exe if any
46463    new_path="${new_path/%.exe/}"
46464    # Do not save /bin paths to all_fixpath_prefixes!
46465  else
46466    # Not in mixed or Windows style, start by that.
46467    new_path=`cmd //c echo $new_path`
46468
46469  input_path="$new_path"
46470  # Check if we need to convert this using DOS-style short mode. If the path
46471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46472  # take no chances and rewrite it.
46473  # Note: m4 eats our [], so we need to use [ and ] instead.
46474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46475  if test "x$has_forbidden_chars" != x; then
46476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46478  fi
46479
46480    # Output is in $new_path
46481
46482  windows_path="$new_path"
46483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46484    unix_path=`$CYGPATH -u "$windows_path"`
46485    new_path="$unix_path"
46486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46488    new_path="$unix_path"
46489  fi
46490
46491    # remove trailing .exe if any
46492    new_path="${new_path/%.exe/}"
46493
46494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46496  fi
46497
46498    else
46499      # We're on a unix platform. Hooray! :)
46500      # First separate the path from the arguments. This will split at the first
46501      # space.
46502      complete="$BUILD_NM"
46503      path="${complete%% *}"
46504      tmp="$complete EOL"
46505      arguments="${tmp#* }"
46506
46507      # Cannot rely on the command "which" here since it doesn't always work.
46508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46509      if test -z "$is_absolute_path"; then
46510        # Path to executable is not absolute. Find it.
46511        IFS_save="$IFS"
46512        IFS=:
46513        for p in $PATH; do
46514          if test -f "$p/$path" && test -x "$p/$path"; then
46515            new_path="$p/$path"
46516            break
46517          fi
46518        done
46519        IFS="$IFS_save"
46520      else
46521        # This is an absolute path, we can use it without further modifications.
46522        new_path="$path"
46523      fi
46524
46525      if test "x$new_path" = x; then
46526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46527$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46528        has_space=`$ECHO "$complete" | $GREP " "`
46529        if test "x$has_space" != x; then
46530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46532        fi
46533        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46534      fi
46535    fi
46536
46537    # Now join together the path and the arguments once again
46538    if test "x$arguments" != xEOL; then
46539      new_complete="$new_path ${arguments% *}"
46540    else
46541      new_complete="$new_path"
46542    fi
46543
46544    if test "x$complete" != "x$new_complete"; then
46545      BUILD_NM="$new_complete"
46546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46547$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46548    fi
46549  fi
46550
46551
46552
46553  # Publish this variable in the help.
46554
46555
46556  if [ -z "${BUILD_AR+x}" ]; then
46557    # The variable is not set by user, try to locate tool using the code snippet
46558    for ac_prog in ar gcc-ar
46559do
46560  # Extract the first word of "$ac_prog", so it can be a program name with args.
46561set dummy $ac_prog; ac_word=$2
46562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46563$as_echo_n "checking for $ac_word... " >&6; }
46564if ${ac_cv_path_BUILD_AR+:} false; then :
46565  $as_echo_n "(cached) " >&6
46566else
46567  case $BUILD_AR in
46568  [\\/]* | ?:[\\/]*)
46569  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46570  ;;
46571  *)
46572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46573for as_dir in $PATH
46574do
46575  IFS=$as_save_IFS
46576  test -z "$as_dir" && as_dir=.
46577    for ac_exec_ext in '' $ac_executable_extensions; do
46578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46579    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46581    break 2
46582  fi
46583done
46584  done
46585IFS=$as_save_IFS
46586
46587  ;;
46588esac
46589fi
46590BUILD_AR=$ac_cv_path_BUILD_AR
46591if test -n "$BUILD_AR"; then
46592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46593$as_echo "$BUILD_AR" >&6; }
46594else
46595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46596$as_echo "no" >&6; }
46597fi
46598
46599
46600  test -n "$BUILD_AR" && break
46601done
46602
46603  else
46604    # The variable is set, but is it from the command line or the environment?
46605
46606    # Try to remove the string !BUILD_AR! from our list.
46607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46609      # If it failed, the variable was not from the command line. Ignore it,
46610      # but warn the user (except for BASH, which is always set by the calling BASH).
46611      if test "xBUILD_AR" != xBASH; then
46612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46613$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46614      fi
46615      # Try to locate tool using the code snippet
46616      for ac_prog in ar gcc-ar
46617do
46618  # Extract the first word of "$ac_prog", so it can be a program name with args.
46619set dummy $ac_prog; ac_word=$2
46620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46621$as_echo_n "checking for $ac_word... " >&6; }
46622if ${ac_cv_path_BUILD_AR+:} false; then :
46623  $as_echo_n "(cached) " >&6
46624else
46625  case $BUILD_AR in
46626  [\\/]* | ?:[\\/]*)
46627  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46628  ;;
46629  *)
46630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46631for as_dir in $PATH
46632do
46633  IFS=$as_save_IFS
46634  test -z "$as_dir" && as_dir=.
46635    for ac_exec_ext in '' $ac_executable_extensions; do
46636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46637    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46639    break 2
46640  fi
46641done
46642  done
46643IFS=$as_save_IFS
46644
46645  ;;
46646esac
46647fi
46648BUILD_AR=$ac_cv_path_BUILD_AR
46649if test -n "$BUILD_AR"; then
46650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46651$as_echo "$BUILD_AR" >&6; }
46652else
46653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46654$as_echo "no" >&6; }
46655fi
46656
46657
46658  test -n "$BUILD_AR" && break
46659done
46660
46661    else
46662      # If it succeeded, then it was overridden by the user. We will use it
46663      # for the tool.
46664
46665      # First remove it from the list of overridden variables, so we can test
46666      # for unknown variables in the end.
46667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46668
46669      # Check if we try to supply an empty value
46670      if test "x$BUILD_AR" = x; then
46671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46672$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46674$as_echo_n "checking for BUILD_AR... " >&6; }
46675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46676$as_echo "disabled" >&6; }
46677      else
46678        # Check if the provided tool contains a complete path.
46679        tool_specified="$BUILD_AR"
46680        tool_basename="${tool_specified##*/}"
46681        if test "x$tool_basename" = "x$tool_specified"; then
46682          # A command without a complete path is provided, search $PATH.
46683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46684$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46685          # Extract the first word of "$tool_basename", so it can be a program name with args.
46686set dummy $tool_basename; ac_word=$2
46687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46688$as_echo_n "checking for $ac_word... " >&6; }
46689if ${ac_cv_path_BUILD_AR+:} false; then :
46690  $as_echo_n "(cached) " >&6
46691else
46692  case $BUILD_AR in
46693  [\\/]* | ?:[\\/]*)
46694  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46695  ;;
46696  *)
46697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46698for as_dir in $PATH
46699do
46700  IFS=$as_save_IFS
46701  test -z "$as_dir" && as_dir=.
46702    for ac_exec_ext in '' $ac_executable_extensions; do
46703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46704    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46706    break 2
46707  fi
46708done
46709  done
46710IFS=$as_save_IFS
46711
46712  ;;
46713esac
46714fi
46715BUILD_AR=$ac_cv_path_BUILD_AR
46716if test -n "$BUILD_AR"; then
46717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46718$as_echo "$BUILD_AR" >&6; }
46719else
46720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46721$as_echo "no" >&6; }
46722fi
46723
46724
46725          if test "x$BUILD_AR" = x; then
46726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46727          fi
46728        else
46729          # Otherwise we believe it is a complete path. Use it as it is.
46730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46731$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46733$as_echo_n "checking for BUILD_AR... " >&6; }
46734          if test ! -x "$tool_specified"; then
46735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46736$as_echo "not found" >&6; }
46737            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46738          fi
46739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46740$as_echo "$tool_specified" >&6; }
46741        fi
46742      fi
46743    fi
46744
46745  fi
46746
46747
46748
46749  # Only process if variable expands to non-empty
46750
46751  if test "x$BUILD_AR" != x; then
46752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46753
46754  # First separate the path from the arguments. This will split at the first
46755  # space.
46756  complete="$BUILD_AR"
46757  path="${complete%% *}"
46758  tmp="$complete EOL"
46759  arguments="${tmp#* }"
46760
46761  # Input might be given as Windows format, start by converting to
46762  # unix format.
46763  new_path=`$CYGPATH -u "$path"`
46764
46765  # Now try to locate executable using which
46766  new_path=`$WHICH "$new_path" 2> /dev/null`
46767  # bat and cmd files are not always considered executable in cygwin causing which
46768  # to not find them
46769  if test "x$new_path" = x \
46770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46772    new_path=`$CYGPATH -u "$path"`
46773  fi
46774  if test "x$new_path" = x; then
46775    # Oops. Which didn't find the executable.
46776    # The splitting of arguments from the executable at a space might have been incorrect,
46777    # since paths with space are more likely in Windows. Give it another try with the whole
46778    # argument.
46779    path="$complete"
46780    arguments="EOL"
46781    new_path=`$CYGPATH -u "$path"`
46782    new_path=`$WHICH "$new_path" 2> /dev/null`
46783    # bat and cmd files are not always considered executable in cygwin causing which
46784    # to not find them
46785    if test "x$new_path" = x \
46786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46788      new_path=`$CYGPATH -u "$path"`
46789    fi
46790    if test "x$new_path" = x; then
46791      # It's still not found. Now this is an unrecoverable error.
46792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46793$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46794      has_space=`$ECHO "$complete" | $GREP " "`
46795      if test "x$has_space" != x; then
46796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46798      fi
46799      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46800    fi
46801  fi
46802
46803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46806  # "foo.exe" is OK but "foo" is an error.
46807  #
46808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46809  # It is also a way to make sure we got the proper file name for the real test later on.
46810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46811  if test "x$test_shortpath" = x; then
46812    # Short path failed, file does not exist as specified.
46813    # Try adding .exe or .cmd
46814    if test -f "${new_path}.exe"; then
46815      input_to_shortpath="${new_path}.exe"
46816    elif test -f "${new_path}.cmd"; then
46817      input_to_shortpath="${new_path}.cmd"
46818    else
46819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46820$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46823      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46824    fi
46825  else
46826    input_to_shortpath="$new_path"
46827  fi
46828
46829  # Call helper function which possibly converts this using DOS-style short mode.
46830  # If so, the updated path is stored in $new_path.
46831  new_path="$input_to_shortpath"
46832
46833  input_path="$input_to_shortpath"
46834  # Check if we need to convert this using DOS-style short mode. If the path
46835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46836  # take no chances and rewrite it.
46837  # Note: m4 eats our [], so we need to use [ and ] instead.
46838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46839  if test "x$has_forbidden_chars" != x; then
46840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46844      # Going to short mode and back again did indeed matter. Since short mode is
46845      # case insensitive, let's make it lowercase to improve readability.
46846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46847      # Now convert it back to Unix-style (cygpath)
46848      input_path=`$CYGPATH -u "$shortmode_path"`
46849      new_path="$input_path"
46850    fi
46851  fi
46852
46853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46854  if test "x$test_cygdrive_prefix" = x; then
46855    # As a simple fix, exclude /usr/bin since it's not a real path.
46856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46858      # a path prefixed by /cygdrive for fixpath to work.
46859      new_path="$CYGWIN_ROOT_PATH$input_path"
46860    fi
46861  fi
46862
46863  # remove trailing .exe if any
46864  new_path="${new_path/%.exe/}"
46865
46866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46867
46868  # First separate the path from the arguments. This will split at the first
46869  # space.
46870  complete="$BUILD_AR"
46871  path="${complete%% *}"
46872  tmp="$complete EOL"
46873  arguments="${tmp#* }"
46874
46875  # Input might be given as Windows format, start by converting to
46876  # unix format.
46877  new_path="$path"
46878
46879  windows_path="$new_path"
46880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46881    unix_path=`$CYGPATH -u "$windows_path"`
46882    new_path="$unix_path"
46883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46885    new_path="$unix_path"
46886  fi
46887
46888
46889  # Now try to locate executable using which
46890  new_path=`$WHICH "$new_path" 2> /dev/null`
46891
46892  if test "x$new_path" = x; then
46893    # Oops. Which didn't find the executable.
46894    # The splitting of arguments from the executable at a space might have been incorrect,
46895    # since paths with space are more likely in Windows. Give it another try with the whole
46896    # argument.
46897    path="$complete"
46898    arguments="EOL"
46899    new_path="$path"
46900
46901  windows_path="$new_path"
46902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46903    unix_path=`$CYGPATH -u "$windows_path"`
46904    new_path="$unix_path"
46905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46907    new_path="$unix_path"
46908  fi
46909
46910
46911    new_path=`$WHICH "$new_path" 2> /dev/null`
46912    # bat and cmd files are not always considered executable in MSYS causing which
46913    # to not find them
46914    if test "x$new_path" = x \
46915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46917      new_path="$path"
46918
46919  windows_path="$new_path"
46920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46921    unix_path=`$CYGPATH -u "$windows_path"`
46922    new_path="$unix_path"
46923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46925    new_path="$unix_path"
46926  fi
46927
46928    fi
46929
46930    if test "x$new_path" = x; then
46931      # It's still not found. Now this is an unrecoverable error.
46932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46933$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46934      has_space=`$ECHO "$complete" | $GREP " "`
46935      if test "x$has_space" != x; then
46936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46938      fi
46939      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46940    fi
46941  fi
46942
46943  # Now new_path has a complete unix path to the binary
46944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46945    # Keep paths in /bin as-is, but remove trailing .exe if any
46946    new_path="${new_path/%.exe/}"
46947    # Do not save /bin paths to all_fixpath_prefixes!
46948  else
46949    # Not in mixed or Windows style, start by that.
46950    new_path=`cmd //c echo $new_path`
46951
46952  input_path="$new_path"
46953  # Check if we need to convert this using DOS-style short mode. If the path
46954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46955  # take no chances and rewrite it.
46956  # Note: m4 eats our [], so we need to use [ and ] instead.
46957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46958  if test "x$has_forbidden_chars" != x; then
46959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46961  fi
46962
46963    # Output is in $new_path
46964
46965  windows_path="$new_path"
46966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46967    unix_path=`$CYGPATH -u "$windows_path"`
46968    new_path="$unix_path"
46969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46971    new_path="$unix_path"
46972  fi
46973
46974    # remove trailing .exe if any
46975    new_path="${new_path/%.exe/}"
46976
46977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46979  fi
46980
46981    else
46982      # We're on a unix platform. Hooray! :)
46983      # First separate the path from the arguments. This will split at the first
46984      # space.
46985      complete="$BUILD_AR"
46986      path="${complete%% *}"
46987      tmp="$complete EOL"
46988      arguments="${tmp#* }"
46989
46990      # Cannot rely on the command "which" here since it doesn't always work.
46991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46992      if test -z "$is_absolute_path"; then
46993        # Path to executable is not absolute. Find it.
46994        IFS_save="$IFS"
46995        IFS=:
46996        for p in $PATH; do
46997          if test -f "$p/$path" && test -x "$p/$path"; then
46998            new_path="$p/$path"
46999            break
47000          fi
47001        done
47002        IFS="$IFS_save"
47003      else
47004        # This is an absolute path, we can use it without further modifications.
47005        new_path="$path"
47006      fi
47007
47008      if test "x$new_path" = x; then
47009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47010$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47011        has_space=`$ECHO "$complete" | $GREP " "`
47012        if test "x$has_space" != x; then
47013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47015        fi
47016        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47017      fi
47018    fi
47019
47020    # Now join together the path and the arguments once again
47021    if test "x$arguments" != xEOL; then
47022      new_complete="$new_path ${arguments% *}"
47023    else
47024      new_complete="$new_path"
47025    fi
47026
47027    if test "x$complete" != "x$new_complete"; then
47028      BUILD_AR="$new_complete"
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
47030$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
47031    fi
47032  fi
47033
47034
47035
47036  # Publish this variable in the help.
47037
47038
47039  if [ -z "${BUILD_OBJCOPY+x}" ]; then
47040    # The variable is not set by user, try to locate tool using the code snippet
47041    for ac_prog in objcopy
47042do
47043  # Extract the first word of "$ac_prog", so it can be a program name with args.
47044set dummy $ac_prog; ac_word=$2
47045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47046$as_echo_n "checking for $ac_word... " >&6; }
47047if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47048  $as_echo_n "(cached) " >&6
47049else
47050  case $BUILD_OBJCOPY in
47051  [\\/]* | ?:[\\/]*)
47052  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47053  ;;
47054  *)
47055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47056for as_dir in $PATH
47057do
47058  IFS=$as_save_IFS
47059  test -z "$as_dir" && as_dir=.
47060    for ac_exec_ext in '' $ac_executable_extensions; do
47061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47062    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47064    break 2
47065  fi
47066done
47067  done
47068IFS=$as_save_IFS
47069
47070  ;;
47071esac
47072fi
47073BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47074if test -n "$BUILD_OBJCOPY"; then
47075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47076$as_echo "$BUILD_OBJCOPY" >&6; }
47077else
47078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47079$as_echo "no" >&6; }
47080fi
47081
47082
47083  test -n "$BUILD_OBJCOPY" && break
47084done
47085
47086  else
47087    # The variable is set, but is it from the command line or the environment?
47088
47089    # Try to remove the string !BUILD_OBJCOPY! from our list.
47090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47092      # If it failed, the variable was not from the command line. Ignore it,
47093      # but warn the user (except for BASH, which is always set by the calling BASH).
47094      if test "xBUILD_OBJCOPY" != xBASH; then
47095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47096$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47097      fi
47098      # Try to locate tool using the code snippet
47099      for ac_prog in objcopy
47100do
47101  # Extract the first word of "$ac_prog", so it can be a program name with args.
47102set dummy $ac_prog; ac_word=$2
47103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47104$as_echo_n "checking for $ac_word... " >&6; }
47105if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47106  $as_echo_n "(cached) " >&6
47107else
47108  case $BUILD_OBJCOPY in
47109  [\\/]* | ?:[\\/]*)
47110  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47111  ;;
47112  *)
47113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47114for as_dir in $PATH
47115do
47116  IFS=$as_save_IFS
47117  test -z "$as_dir" && as_dir=.
47118    for ac_exec_ext in '' $ac_executable_extensions; do
47119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47120    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47122    break 2
47123  fi
47124done
47125  done
47126IFS=$as_save_IFS
47127
47128  ;;
47129esac
47130fi
47131BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47132if test -n "$BUILD_OBJCOPY"; then
47133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47134$as_echo "$BUILD_OBJCOPY" >&6; }
47135else
47136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47137$as_echo "no" >&6; }
47138fi
47139
47140
47141  test -n "$BUILD_OBJCOPY" && break
47142done
47143
47144    else
47145      # If it succeeded, then it was overridden by the user. We will use it
47146      # for the tool.
47147
47148      # First remove it from the list of overridden variables, so we can test
47149      # for unknown variables in the end.
47150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47151
47152      # Check if we try to supply an empty value
47153      if test "x$BUILD_OBJCOPY" = x; then
47154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47155$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47157$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47159$as_echo "disabled" >&6; }
47160      else
47161        # Check if the provided tool contains a complete path.
47162        tool_specified="$BUILD_OBJCOPY"
47163        tool_basename="${tool_specified##*/}"
47164        if test "x$tool_basename" = "x$tool_specified"; then
47165          # A command without a complete path is provided, search $PATH.
47166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47167$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47168          # Extract the first word of "$tool_basename", so it can be a program name with args.
47169set dummy $tool_basename; ac_word=$2
47170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47171$as_echo_n "checking for $ac_word... " >&6; }
47172if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47173  $as_echo_n "(cached) " >&6
47174else
47175  case $BUILD_OBJCOPY in
47176  [\\/]* | ?:[\\/]*)
47177  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47178  ;;
47179  *)
47180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47181for as_dir in $PATH
47182do
47183  IFS=$as_save_IFS
47184  test -z "$as_dir" && as_dir=.
47185    for ac_exec_ext in '' $ac_executable_extensions; do
47186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47187    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47189    break 2
47190  fi
47191done
47192  done
47193IFS=$as_save_IFS
47194
47195  ;;
47196esac
47197fi
47198BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47199if test -n "$BUILD_OBJCOPY"; then
47200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47201$as_echo "$BUILD_OBJCOPY" >&6; }
47202else
47203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47204$as_echo "no" >&6; }
47205fi
47206
47207
47208          if test "x$BUILD_OBJCOPY" = x; then
47209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47210          fi
47211        else
47212          # Otherwise we believe it is a complete path. Use it as it is.
47213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47214$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47216$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47217          if test ! -x "$tool_specified"; then
47218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47219$as_echo "not found" >&6; }
47220            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47221          fi
47222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47223$as_echo "$tool_specified" >&6; }
47224        fi
47225      fi
47226    fi
47227
47228  fi
47229
47230
47231
47232  # Only process if variable expands to non-empty
47233
47234  if test "x$BUILD_OBJCOPY" != x; then
47235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47236
47237  # First separate the path from the arguments. This will split at the first
47238  # space.
47239  complete="$BUILD_OBJCOPY"
47240  path="${complete%% *}"
47241  tmp="$complete EOL"
47242  arguments="${tmp#* }"
47243
47244  # Input might be given as Windows format, start by converting to
47245  # unix format.
47246  new_path=`$CYGPATH -u "$path"`
47247
47248  # Now try to locate executable using which
47249  new_path=`$WHICH "$new_path" 2> /dev/null`
47250  # bat and cmd files are not always considered executable in cygwin causing which
47251  # to not find them
47252  if test "x$new_path" = x \
47253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47255    new_path=`$CYGPATH -u "$path"`
47256  fi
47257  if test "x$new_path" = x; then
47258    # Oops. Which didn't find the executable.
47259    # The splitting of arguments from the executable at a space might have been incorrect,
47260    # since paths with space are more likely in Windows. Give it another try with the whole
47261    # argument.
47262    path="$complete"
47263    arguments="EOL"
47264    new_path=`$CYGPATH -u "$path"`
47265    new_path=`$WHICH "$new_path" 2> /dev/null`
47266    # bat and cmd files are not always considered executable in cygwin causing which
47267    # to not find them
47268    if test "x$new_path" = x \
47269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47271      new_path=`$CYGPATH -u "$path"`
47272    fi
47273    if test "x$new_path" = x; then
47274      # It's still not found. Now this is an unrecoverable error.
47275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47276$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47277      has_space=`$ECHO "$complete" | $GREP " "`
47278      if test "x$has_space" != x; then
47279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47281      fi
47282      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47283    fi
47284  fi
47285
47286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47289  # "foo.exe" is OK but "foo" is an error.
47290  #
47291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47292  # It is also a way to make sure we got the proper file name for the real test later on.
47293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47294  if test "x$test_shortpath" = x; then
47295    # Short path failed, file does not exist as specified.
47296    # Try adding .exe or .cmd
47297    if test -f "${new_path}.exe"; then
47298      input_to_shortpath="${new_path}.exe"
47299    elif test -f "${new_path}.cmd"; then
47300      input_to_shortpath="${new_path}.cmd"
47301    else
47302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47303$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47306      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47307    fi
47308  else
47309    input_to_shortpath="$new_path"
47310  fi
47311
47312  # Call helper function which possibly converts this using DOS-style short mode.
47313  # If so, the updated path is stored in $new_path.
47314  new_path="$input_to_shortpath"
47315
47316  input_path="$input_to_shortpath"
47317  # Check if we need to convert this using DOS-style short mode. If the path
47318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47319  # take no chances and rewrite it.
47320  # Note: m4 eats our [], so we need to use [ and ] instead.
47321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47322  if test "x$has_forbidden_chars" != x; then
47323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47327      # Going to short mode and back again did indeed matter. Since short mode is
47328      # case insensitive, let's make it lowercase to improve readability.
47329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47330      # Now convert it back to Unix-style (cygpath)
47331      input_path=`$CYGPATH -u "$shortmode_path"`
47332      new_path="$input_path"
47333    fi
47334  fi
47335
47336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47337  if test "x$test_cygdrive_prefix" = x; then
47338    # As a simple fix, exclude /usr/bin since it's not a real path.
47339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47341      # a path prefixed by /cygdrive for fixpath to work.
47342      new_path="$CYGWIN_ROOT_PATH$input_path"
47343    fi
47344  fi
47345
47346  # remove trailing .exe if any
47347  new_path="${new_path/%.exe/}"
47348
47349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47350
47351  # First separate the path from the arguments. This will split at the first
47352  # space.
47353  complete="$BUILD_OBJCOPY"
47354  path="${complete%% *}"
47355  tmp="$complete EOL"
47356  arguments="${tmp#* }"
47357
47358  # Input might be given as Windows format, start by converting to
47359  # unix format.
47360  new_path="$path"
47361
47362  windows_path="$new_path"
47363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47364    unix_path=`$CYGPATH -u "$windows_path"`
47365    new_path="$unix_path"
47366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47368    new_path="$unix_path"
47369  fi
47370
47371
47372  # Now try to locate executable using which
47373  new_path=`$WHICH "$new_path" 2> /dev/null`
47374
47375  if test "x$new_path" = x; then
47376    # Oops. Which didn't find the executable.
47377    # The splitting of arguments from the executable at a space might have been incorrect,
47378    # since paths with space are more likely in Windows. Give it another try with the whole
47379    # argument.
47380    path="$complete"
47381    arguments="EOL"
47382    new_path="$path"
47383
47384  windows_path="$new_path"
47385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47386    unix_path=`$CYGPATH -u "$windows_path"`
47387    new_path="$unix_path"
47388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47390    new_path="$unix_path"
47391  fi
47392
47393
47394    new_path=`$WHICH "$new_path" 2> /dev/null`
47395    # bat and cmd files are not always considered executable in MSYS causing which
47396    # to not find them
47397    if test "x$new_path" = x \
47398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47400      new_path="$path"
47401
47402  windows_path="$new_path"
47403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47404    unix_path=`$CYGPATH -u "$windows_path"`
47405    new_path="$unix_path"
47406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47408    new_path="$unix_path"
47409  fi
47410
47411    fi
47412
47413    if test "x$new_path" = x; then
47414      # It's still not found. Now this is an unrecoverable error.
47415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47416$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47417      has_space=`$ECHO "$complete" | $GREP " "`
47418      if test "x$has_space" != x; then
47419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47421      fi
47422      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47423    fi
47424  fi
47425
47426  # Now new_path has a complete unix path to the binary
47427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47428    # Keep paths in /bin as-is, but remove trailing .exe if any
47429    new_path="${new_path/%.exe/}"
47430    # Do not save /bin paths to all_fixpath_prefixes!
47431  else
47432    # Not in mixed or Windows style, start by that.
47433    new_path=`cmd //c echo $new_path`
47434
47435  input_path="$new_path"
47436  # Check if we need to convert this using DOS-style short mode. If the path
47437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47438  # take no chances and rewrite it.
47439  # Note: m4 eats our [], so we need to use [ and ] instead.
47440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47441  if test "x$has_forbidden_chars" != x; then
47442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47444  fi
47445
47446    # Output is in $new_path
47447
47448  windows_path="$new_path"
47449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47450    unix_path=`$CYGPATH -u "$windows_path"`
47451    new_path="$unix_path"
47452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47454    new_path="$unix_path"
47455  fi
47456
47457    # remove trailing .exe if any
47458    new_path="${new_path/%.exe/}"
47459
47460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47462  fi
47463
47464    else
47465      # We're on a unix platform. Hooray! :)
47466      # First separate the path from the arguments. This will split at the first
47467      # space.
47468      complete="$BUILD_OBJCOPY"
47469      path="${complete%% *}"
47470      tmp="$complete EOL"
47471      arguments="${tmp#* }"
47472
47473      # Cannot rely on the command "which" here since it doesn't always work.
47474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47475      if test -z "$is_absolute_path"; then
47476        # Path to executable is not absolute. Find it.
47477        IFS_save="$IFS"
47478        IFS=:
47479        for p in $PATH; do
47480          if test -f "$p/$path" && test -x "$p/$path"; then
47481            new_path="$p/$path"
47482            break
47483          fi
47484        done
47485        IFS="$IFS_save"
47486      else
47487        # This is an absolute path, we can use it without further modifications.
47488        new_path="$path"
47489      fi
47490
47491      if test "x$new_path" = x; then
47492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47493$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47494        has_space=`$ECHO "$complete" | $GREP " "`
47495        if test "x$has_space" != x; then
47496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47498        fi
47499        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47500      fi
47501    fi
47502
47503    # Now join together the path and the arguments once again
47504    if test "x$arguments" != xEOL; then
47505      new_complete="$new_path ${arguments% *}"
47506    else
47507      new_complete="$new_path"
47508    fi
47509
47510    if test "x$complete" != "x$new_complete"; then
47511      BUILD_OBJCOPY="$new_complete"
47512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47513$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47514    fi
47515  fi
47516
47517
47518
47519  # Publish this variable in the help.
47520
47521
47522  if [ -z "${BUILD_STRIP+x}" ]; then
47523    # The variable is not set by user, try to locate tool using the code snippet
47524    for ac_prog in strip
47525do
47526  # Extract the first word of "$ac_prog", so it can be a program name with args.
47527set dummy $ac_prog; ac_word=$2
47528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47529$as_echo_n "checking for $ac_word... " >&6; }
47530if ${ac_cv_path_BUILD_STRIP+:} false; then :
47531  $as_echo_n "(cached) " >&6
47532else
47533  case $BUILD_STRIP in
47534  [\\/]* | ?:[\\/]*)
47535  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47536  ;;
47537  *)
47538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47539for as_dir in $PATH
47540do
47541  IFS=$as_save_IFS
47542  test -z "$as_dir" && as_dir=.
47543    for ac_exec_ext in '' $ac_executable_extensions; do
47544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47545    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47547    break 2
47548  fi
47549done
47550  done
47551IFS=$as_save_IFS
47552
47553  ;;
47554esac
47555fi
47556BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47557if test -n "$BUILD_STRIP"; then
47558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47559$as_echo "$BUILD_STRIP" >&6; }
47560else
47561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47562$as_echo "no" >&6; }
47563fi
47564
47565
47566  test -n "$BUILD_STRIP" && break
47567done
47568
47569  else
47570    # The variable is set, but is it from the command line or the environment?
47571
47572    # Try to remove the string !BUILD_STRIP! from our list.
47573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47575      # If it failed, the variable was not from the command line. Ignore it,
47576      # but warn the user (except for BASH, which is always set by the calling BASH).
47577      if test "xBUILD_STRIP" != xBASH; then
47578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47579$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47580      fi
47581      # Try to locate tool using the code snippet
47582      for ac_prog in strip
47583do
47584  # Extract the first word of "$ac_prog", so it can be a program name with args.
47585set dummy $ac_prog; ac_word=$2
47586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47587$as_echo_n "checking for $ac_word... " >&6; }
47588if ${ac_cv_path_BUILD_STRIP+:} false; then :
47589  $as_echo_n "(cached) " >&6
47590else
47591  case $BUILD_STRIP in
47592  [\\/]* | ?:[\\/]*)
47593  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47594  ;;
47595  *)
47596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47597for as_dir in $PATH
47598do
47599  IFS=$as_save_IFS
47600  test -z "$as_dir" && as_dir=.
47601    for ac_exec_ext in '' $ac_executable_extensions; do
47602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47603    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47605    break 2
47606  fi
47607done
47608  done
47609IFS=$as_save_IFS
47610
47611  ;;
47612esac
47613fi
47614BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47615if test -n "$BUILD_STRIP"; then
47616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47617$as_echo "$BUILD_STRIP" >&6; }
47618else
47619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47620$as_echo "no" >&6; }
47621fi
47622
47623
47624  test -n "$BUILD_STRIP" && break
47625done
47626
47627    else
47628      # If it succeeded, then it was overridden by the user. We will use it
47629      # for the tool.
47630
47631      # First remove it from the list of overridden variables, so we can test
47632      # for unknown variables in the end.
47633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47634
47635      # Check if we try to supply an empty value
47636      if test "x$BUILD_STRIP" = x; then
47637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47638$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47640$as_echo_n "checking for BUILD_STRIP... " >&6; }
47641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47642$as_echo "disabled" >&6; }
47643      else
47644        # Check if the provided tool contains a complete path.
47645        tool_specified="$BUILD_STRIP"
47646        tool_basename="${tool_specified##*/}"
47647        if test "x$tool_basename" = "x$tool_specified"; then
47648          # A command without a complete path is provided, search $PATH.
47649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47650$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47651          # Extract the first word of "$tool_basename", so it can be a program name with args.
47652set dummy $tool_basename; ac_word=$2
47653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47654$as_echo_n "checking for $ac_word... " >&6; }
47655if ${ac_cv_path_BUILD_STRIP+:} false; then :
47656  $as_echo_n "(cached) " >&6
47657else
47658  case $BUILD_STRIP in
47659  [\\/]* | ?:[\\/]*)
47660  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47661  ;;
47662  *)
47663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47664for as_dir in $PATH
47665do
47666  IFS=$as_save_IFS
47667  test -z "$as_dir" && as_dir=.
47668    for ac_exec_ext in '' $ac_executable_extensions; do
47669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47670    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47672    break 2
47673  fi
47674done
47675  done
47676IFS=$as_save_IFS
47677
47678  ;;
47679esac
47680fi
47681BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47682if test -n "$BUILD_STRIP"; then
47683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47684$as_echo "$BUILD_STRIP" >&6; }
47685else
47686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47687$as_echo "no" >&6; }
47688fi
47689
47690
47691          if test "x$BUILD_STRIP" = x; then
47692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47693          fi
47694        else
47695          # Otherwise we believe it is a complete path. Use it as it is.
47696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47697$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47699$as_echo_n "checking for BUILD_STRIP... " >&6; }
47700          if test ! -x "$tool_specified"; then
47701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47702$as_echo "not found" >&6; }
47703            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47704          fi
47705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47706$as_echo "$tool_specified" >&6; }
47707        fi
47708      fi
47709    fi
47710
47711  fi
47712
47713
47714
47715  # Only process if variable expands to non-empty
47716
47717  if test "x$BUILD_STRIP" != x; then
47718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47719
47720  # First separate the path from the arguments. This will split at the first
47721  # space.
47722  complete="$BUILD_STRIP"
47723  path="${complete%% *}"
47724  tmp="$complete EOL"
47725  arguments="${tmp#* }"
47726
47727  # Input might be given as Windows format, start by converting to
47728  # unix format.
47729  new_path=`$CYGPATH -u "$path"`
47730
47731  # Now try to locate executable using which
47732  new_path=`$WHICH "$new_path" 2> /dev/null`
47733  # bat and cmd files are not always considered executable in cygwin causing which
47734  # to not find them
47735  if test "x$new_path" = x \
47736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47738    new_path=`$CYGPATH -u "$path"`
47739  fi
47740  if test "x$new_path" = x; then
47741    # Oops. Which didn't find the executable.
47742    # The splitting of arguments from the executable at a space might have been incorrect,
47743    # since paths with space are more likely in Windows. Give it another try with the whole
47744    # argument.
47745    path="$complete"
47746    arguments="EOL"
47747    new_path=`$CYGPATH -u "$path"`
47748    new_path=`$WHICH "$new_path" 2> /dev/null`
47749    # bat and cmd files are not always considered executable in cygwin causing which
47750    # to not find them
47751    if test "x$new_path" = x \
47752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47754      new_path=`$CYGPATH -u "$path"`
47755    fi
47756    if test "x$new_path" = x; then
47757      # It's still not found. Now this is an unrecoverable error.
47758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47759$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47760      has_space=`$ECHO "$complete" | $GREP " "`
47761      if test "x$has_space" != x; then
47762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47764      fi
47765      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47766    fi
47767  fi
47768
47769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47772  # "foo.exe" is OK but "foo" is an error.
47773  #
47774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47775  # It is also a way to make sure we got the proper file name for the real test later on.
47776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47777  if test "x$test_shortpath" = x; then
47778    # Short path failed, file does not exist as specified.
47779    # Try adding .exe or .cmd
47780    if test -f "${new_path}.exe"; then
47781      input_to_shortpath="${new_path}.exe"
47782    elif test -f "${new_path}.cmd"; then
47783      input_to_shortpath="${new_path}.cmd"
47784    else
47785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47786$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47789      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47790    fi
47791  else
47792    input_to_shortpath="$new_path"
47793  fi
47794
47795  # Call helper function which possibly converts this using DOS-style short mode.
47796  # If so, the updated path is stored in $new_path.
47797  new_path="$input_to_shortpath"
47798
47799  input_path="$input_to_shortpath"
47800  # Check if we need to convert this using DOS-style short mode. If the path
47801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47802  # take no chances and rewrite it.
47803  # Note: m4 eats our [], so we need to use [ and ] instead.
47804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47805  if test "x$has_forbidden_chars" != x; then
47806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47810      # Going to short mode and back again did indeed matter. Since short mode is
47811      # case insensitive, let's make it lowercase to improve readability.
47812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47813      # Now convert it back to Unix-style (cygpath)
47814      input_path=`$CYGPATH -u "$shortmode_path"`
47815      new_path="$input_path"
47816    fi
47817  fi
47818
47819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47820  if test "x$test_cygdrive_prefix" = x; then
47821    # As a simple fix, exclude /usr/bin since it's not a real path.
47822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47824      # a path prefixed by /cygdrive for fixpath to work.
47825      new_path="$CYGWIN_ROOT_PATH$input_path"
47826    fi
47827  fi
47828
47829  # remove trailing .exe if any
47830  new_path="${new_path/%.exe/}"
47831
47832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47833
47834  # First separate the path from the arguments. This will split at the first
47835  # space.
47836  complete="$BUILD_STRIP"
47837  path="${complete%% *}"
47838  tmp="$complete EOL"
47839  arguments="${tmp#* }"
47840
47841  # Input might be given as Windows format, start by converting to
47842  # unix format.
47843  new_path="$path"
47844
47845  windows_path="$new_path"
47846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47847    unix_path=`$CYGPATH -u "$windows_path"`
47848    new_path="$unix_path"
47849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47851    new_path="$unix_path"
47852  fi
47853
47854
47855  # Now try to locate executable using which
47856  new_path=`$WHICH "$new_path" 2> /dev/null`
47857
47858  if test "x$new_path" = x; then
47859    # Oops. Which didn't find the executable.
47860    # The splitting of arguments from the executable at a space might have been incorrect,
47861    # since paths with space are more likely in Windows. Give it another try with the whole
47862    # argument.
47863    path="$complete"
47864    arguments="EOL"
47865    new_path="$path"
47866
47867  windows_path="$new_path"
47868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47869    unix_path=`$CYGPATH -u "$windows_path"`
47870    new_path="$unix_path"
47871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47873    new_path="$unix_path"
47874  fi
47875
47876
47877    new_path=`$WHICH "$new_path" 2> /dev/null`
47878    # bat and cmd files are not always considered executable in MSYS causing which
47879    # to not find them
47880    if test "x$new_path" = x \
47881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47883      new_path="$path"
47884
47885  windows_path="$new_path"
47886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47887    unix_path=`$CYGPATH -u "$windows_path"`
47888    new_path="$unix_path"
47889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47891    new_path="$unix_path"
47892  fi
47893
47894    fi
47895
47896    if test "x$new_path" = x; then
47897      # It's still not found. Now this is an unrecoverable error.
47898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47899$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47900      has_space=`$ECHO "$complete" | $GREP " "`
47901      if test "x$has_space" != x; then
47902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47904      fi
47905      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47906    fi
47907  fi
47908
47909  # Now new_path has a complete unix path to the binary
47910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47911    # Keep paths in /bin as-is, but remove trailing .exe if any
47912    new_path="${new_path/%.exe/}"
47913    # Do not save /bin paths to all_fixpath_prefixes!
47914  else
47915    # Not in mixed or Windows style, start by that.
47916    new_path=`cmd //c echo $new_path`
47917
47918  input_path="$new_path"
47919  # Check if we need to convert this using DOS-style short mode. If the path
47920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47921  # take no chances and rewrite it.
47922  # Note: m4 eats our [], so we need to use [ and ] instead.
47923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47924  if test "x$has_forbidden_chars" != x; then
47925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47927  fi
47928
47929    # Output is in $new_path
47930
47931  windows_path="$new_path"
47932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47933    unix_path=`$CYGPATH -u "$windows_path"`
47934    new_path="$unix_path"
47935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47937    new_path="$unix_path"
47938  fi
47939
47940    # remove trailing .exe if any
47941    new_path="${new_path/%.exe/}"
47942
47943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47945  fi
47946
47947    else
47948      # We're on a unix platform. Hooray! :)
47949      # First separate the path from the arguments. This will split at the first
47950      # space.
47951      complete="$BUILD_STRIP"
47952      path="${complete%% *}"
47953      tmp="$complete EOL"
47954      arguments="${tmp#* }"
47955
47956      # Cannot rely on the command "which" here since it doesn't always work.
47957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47958      if test -z "$is_absolute_path"; then
47959        # Path to executable is not absolute. Find it.
47960        IFS_save="$IFS"
47961        IFS=:
47962        for p in $PATH; do
47963          if test -f "$p/$path" && test -x "$p/$path"; then
47964            new_path="$p/$path"
47965            break
47966          fi
47967        done
47968        IFS="$IFS_save"
47969      else
47970        # This is an absolute path, we can use it without further modifications.
47971        new_path="$path"
47972      fi
47973
47974      if test "x$new_path" = x; then
47975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47976$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47977        has_space=`$ECHO "$complete" | $GREP " "`
47978        if test "x$has_space" != x; then
47979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47981        fi
47982        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47983      fi
47984    fi
47985
47986    # Now join together the path and the arguments once again
47987    if test "x$arguments" != xEOL; then
47988      new_complete="$new_path ${arguments% *}"
47989    else
47990      new_complete="$new_path"
47991    fi
47992
47993    if test "x$complete" != "x$new_complete"; then
47994      BUILD_STRIP="$new_complete"
47995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47996$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47997    fi
47998  fi
47999
48000    # Assume the C compiler is the assembler
48001    BUILD_AS="$BUILD_CC -c"
48002    # Just like for the target compiler, use the compiler as linker
48003    BUILD_LD="$BUILD_CC"
48004    BUILD_LDCXX="$BUILD_CXX"
48005
48006    PATH="$OLDPATH"
48007
48008
48009  COMPILER=$BUILD_CC
48010  COMPILER_NAME=BuildC
48011
48012  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48013    # cc -V output typically looks like
48014    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48015    # or
48016    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48017    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48018    # Check that this is likely to be the Solaris Studio cc.
48019    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48020    if test $? -ne 0; then
48021      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48022      { $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
48023$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48024      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48025$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48026      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48027$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48028      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48029    fi
48030    # Remove usage instructions (if present), and
48031    # collapse compiler output into a single line
48032    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48033        $SED -e 's/ *[Uu]sage:.*//'`
48034    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48035        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48036  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48037    # xlc -qversion output typically looks like
48038    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48039    #     Version: 11.01.0000.0015
48040    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48041    # Check that this is likely to be the IBM XL C compiler.
48042    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48043    if test $? -ne 0; then
48044      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48045      { $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
48046$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48047      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48048$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48049      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48050$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48051      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48052    fi
48053    # Collapse compiler output into a single line
48054    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48055    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48056        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48057  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48058    # There is no specific version flag, but all output starts with a version string.
48059    # First line typically looks something like:
48060    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48061    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48062    # Check that this is likely to be Microsoft CL.EXE.
48063    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48064    if test $? -ne 0; then
48065      { $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
48066$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48067      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48068$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48069      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48070    fi
48071    # Collapse compiler output into a single line
48072    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48073    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48074        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48075  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48076    # gcc --version output typically looks like
48077    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48078    #     Copyright (C) 2013 Free Software Foundation, Inc.
48079    #     This is free software; see the source for copying conditions.  There is NO
48080    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48081    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48082    # Check that this is likely to be GCC.
48083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48084    if test $? -ne 0; then
48085      { $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
48086$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48087      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48088$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48089      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48090    fi
48091    # Remove Copyright and legalese from version string, and
48092    # collapse into a single line
48093    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48094        $SED -e 's/ *Copyright .*//'`
48095    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48096        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48097  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48098    # clang --version output typically looks like
48099    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48100    #    clang version 3.3 (tags/RELEASE_33/final)
48101    # or
48102    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48103    #    Target: x86_64-pc-linux-gnu
48104    #    Thread model: posix
48105    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48106    # Check that this is likely to be clang
48107    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48108    if test $? -ne 0; then
48109      { $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
48110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48112$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48113      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48114    fi
48115    # Collapse compiler output into a single line
48116    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48117    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48118        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48119  else
48120      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48121  fi
48122  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48123  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48124  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48125  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48126
48127  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48128$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48129
48130
48131  COMPILER=$BUILD_CXX
48132  COMPILER_NAME=BuildC++
48133
48134  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48135    # cc -V output typically looks like
48136    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48137    # or
48138    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48139    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48140    # Check that this is likely to be the Solaris Studio cc.
48141    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48142    if test $? -ne 0; then
48143      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48144      { $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
48145$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48146      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48147$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48148      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48149$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48150      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48151    fi
48152    # Remove usage instructions (if present), and
48153    # collapse compiler output into a single line
48154    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48155        $SED -e 's/ *[Uu]sage:.*//'`
48156    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48157        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48158  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48159    # xlc -qversion output typically looks like
48160    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48161    #     Version: 11.01.0000.0015
48162    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48163    # Check that this is likely to be the IBM XL C compiler.
48164    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48165    if test $? -ne 0; then
48166      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48167      { $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
48168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48170$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48171      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48172$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48173      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48174    fi
48175    # Collapse compiler output into a single line
48176    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48177    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48178        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48179  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48180    # There is no specific version flag, but all output starts with a version string.
48181    # First line typically looks something like:
48182    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48183    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48184    # Check that this is likely to be Microsoft CL.EXE.
48185    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48186    if test $? -ne 0; then
48187      { $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
48188$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48190$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48191      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48192    fi
48193    # Collapse compiler output into a single line
48194    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48195    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48196        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48197  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48198    # gcc --version output typically looks like
48199    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48200    #     Copyright (C) 2013 Free Software Foundation, Inc.
48201    #     This is free software; see the source for copying conditions.  There is NO
48202    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48203    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48204    # Check that this is likely to be GCC.
48205    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48206    if test $? -ne 0; then
48207      { $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
48208$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48209      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48210$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48211      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48212    fi
48213    # Remove Copyright and legalese from version string, and
48214    # collapse into a single line
48215    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48216        $SED -e 's/ *Copyright .*//'`
48217    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48218        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48219  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48220    # clang --version output typically looks like
48221    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48222    #    clang version 3.3 (tags/RELEASE_33/final)
48223    # or
48224    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48225    #    Target: x86_64-pc-linux-gnu
48226    #    Thread model: posix
48227    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48228    # Check that this is likely to be clang
48229    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48230    if test $? -ne 0; then
48231      { $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
48232$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48233      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48234$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48235      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48236    fi
48237    # Collapse compiler output into a single line
48238    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48239    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48240        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48241  else
48242      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48243  fi
48244  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48245  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48246  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48247  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48248
48249  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48250$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48251
48252
48253  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48254    { $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
48255$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48256    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48257$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48258  fi
48259
48260  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48261  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48262    { $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
48263$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;}
48264  fi
48265
48266  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48267    { $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
48268$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48269  fi
48270
48271  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48272
48273  else
48274    # If we are not cross compiling, use the normal target compilers for
48275    # building the build platform executables.
48276    BUILD_CC="$CC"
48277    BUILD_CXX="$CXX"
48278    BUILD_LD="$LD"
48279    BUILD_LDCXX="$LDCXX"
48280    BUILD_NM="$NM"
48281    BUILD_AS="$AS"
48282    BUILD_OBJCOPY="$OBJCOPY"
48283    BUILD_STRIP="$STRIP"
48284    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48285    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48286    BUILD_AR="$AR"
48287
48288
48289  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48290    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48291$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48293$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48294  fi
48295
48296  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48297  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48298    { $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
48299$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;}
48300  fi
48301
48302  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48303    { $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
48304$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48305  fi
48306
48307  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48308
48309  fi
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324  # The package path is used only on macosx?
48325  # FIXME: clean this up, and/or move it elsewhere.
48326  PACKAGE_PATH=/opt/local
48327
48328
48329  # Check for extra potential brokenness.
48330  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48331    # On Windows, double-check that we got the right compiler.
48332    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48333    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48334    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48335      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48336        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
48337      fi
48338    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48339      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48340        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48341      fi
48342    fi
48343  fi
48344
48345  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48346    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48347    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48348    # This is later checked when setting flags.
48349
48350    # "-Og" suppported for GCC 4.8 and later
48351    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399    # Execute function body
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
48443
48444
48445
48446
48447
48448    # Execute function body
48449
48450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48451$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48452  supports=yes
48453
48454  saved_cflags="$CFLAGS"
48455  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48456  ac_ext=c
48457ac_cpp='$CPP $CPPFLAGS'
48458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48460ac_compiler_gnu=$ac_cv_c_compiler_gnu
48461
48462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48463/* end confdefs.h.  */
48464int i;
48465_ACEOF
48466if ac_fn_c_try_compile "$LINENO"; then :
48467
48468else
48469  supports=no
48470fi
48471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48472  ac_ext=cpp
48473ac_cpp='$CXXCPP $CPPFLAGS'
48474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48477
48478  CFLAGS="$saved_cflags"
48479
48480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48481$as_echo "$supports" >&6; }
48482  if test "x$supports" = "xyes" ; then
48483    :
48484    C_COMP_SUPPORTS="yes"
48485  else
48486    :
48487    C_COMP_SUPPORTS="no"
48488  fi
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548    # Execute function body
48549
48550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48551$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48552  supports=yes
48553
48554  saved_cxxflags="$CXXFLAGS"
48555  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48556  ac_ext=cpp
48557ac_cpp='$CXXCPP $CPPFLAGS'
48558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48561
48562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48563/* end confdefs.h.  */
48564int i;
48565_ACEOF
48566if ac_fn_cxx_try_compile "$LINENO"; then :
48567
48568else
48569  supports=no
48570fi
48571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48572  ac_ext=cpp
48573ac_cpp='$CXXCPP $CPPFLAGS'
48574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48577
48578  CXXFLAGS="$saved_cxxflags"
48579
48580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48581$as_echo "$supports" >&6; }
48582  if test "x$supports" = "xyes" ; then
48583    :
48584    CXX_COMP_SUPPORTS="yes"
48585  else
48586    :
48587    CXX_COMP_SUPPORTS="no"
48588  fi
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48603$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48604  supports=no
48605  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48606
48607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48608$as_echo "$supports" >&6; }
48609  if test "x$supports" = "xyes" ; then
48610    :
48611    HAS_CFLAG_OPTIMIZE_DEBUG=true
48612  else
48613    :
48614    HAS_CFLAG_OPTIMIZE_DEBUG=false
48615  fi
48616
48617
48618
48619
48620
48621
48622
48623    # "-z relro" supported in GNU binutils 2.17 and later
48624    LINKER_RELRO_FLAG="-Wl,-z,relro"
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672    # Execute function body
48673
48674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48675$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48676  supports=yes
48677
48678  saved_ldflags="$LDFLAGS"
48679  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48680  ac_ext=c
48681ac_cpp='$CPP $CPPFLAGS'
48682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48684ac_compiler_gnu=$ac_cv_c_compiler_gnu
48685
48686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48687/* end confdefs.h.  */
48688
48689int
48690main ()
48691{
48692
48693  ;
48694  return 0;
48695}
48696_ACEOF
48697if ac_fn_c_try_link "$LINENO"; then :
48698
48699else
48700  supports=no
48701fi
48702rm -f core conftest.err conftest.$ac_objext \
48703    conftest$ac_exeext conftest.$ac_ext
48704  ac_ext=cpp
48705ac_cpp='$CXXCPP $CPPFLAGS'
48706ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48707ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48708ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48709
48710  LDFLAGS="$saved_ldflags"
48711
48712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48713$as_echo "$supports" >&6; }
48714  if test "x$supports" = "xyes" ; then
48715    :
48716    HAS_LINKER_RELRO=true
48717  else
48718    :
48719    HAS_LINKER_RELRO=false
48720  fi
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734    # "-z now" supported in GNU binutils 2.11 and later
48735    LINKER_NOW_FLAG="-Wl,-z,now"
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783    # Execute function body
48784
48785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48786$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48787  supports=yes
48788
48789  saved_ldflags="$LDFLAGS"
48790  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48791  ac_ext=c
48792ac_cpp='$CPP $CPPFLAGS'
48793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48795ac_compiler_gnu=$ac_cv_c_compiler_gnu
48796
48797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48798/* end confdefs.h.  */
48799
48800int
48801main ()
48802{
48803
48804  ;
48805  return 0;
48806}
48807_ACEOF
48808if ac_fn_c_try_link "$LINENO"; then :
48809
48810else
48811  supports=no
48812fi
48813rm -f core conftest.err conftest.$ac_objext \
48814    conftest$ac_exeext conftest.$ac_ext
48815  ac_ext=cpp
48816ac_cpp='$CXXCPP $CPPFLAGS'
48817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48820
48821  LDFLAGS="$saved_ldflags"
48822
48823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48824$as_echo "$supports" >&6; }
48825  if test "x$supports" = "xyes" ; then
48826    :
48827    HAS_LINKER_NOW=true
48828  else
48829    :
48830    HAS_LINKER_NOW=false
48831  fi
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844  fi
48845
48846  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48847  # in executable.'
48848  USING_BROKEN_SUSE_LD=no
48849  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48851$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48852    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48853    $ECHO "int main() { }" > main.c
48854    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48856$as_echo "no" >&6; }
48857      USING_BROKEN_SUSE_LD=no
48858    else
48859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48860$as_echo "yes" >&6; }
48861      USING_BROKEN_SUSE_LD=yes
48862    fi
48863    $RM version-script.map main.c a.out
48864  fi
48865
48866
48867  # Setup hotspot lecagy names for toolchains
48868  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48869  if test "x$TOOLCHAIN_TYPE" = xclang; then
48870    HOTSPOT_TOOLCHAIN_TYPE=gcc
48871  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48872    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48873  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48874    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48875  fi
48876
48877
48878
48879# Setup the JTReg Regression Test Harness.
48880
48881
48882# Check whether --with-jtreg was given.
48883if test "${with_jtreg+set}" = set; then :
48884  withval=$with_jtreg;
48885fi
48886
48887
48888  if test "x$with_jtreg" = xno; then
48889    # jtreg disabled
48890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48891$as_echo_n "checking for jtreg test harness... " >&6; }
48892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48893$as_echo "no, disabled" >&6; }
48894  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48895    # An explicit path is specified, use it.
48896    JT_HOME="$with_jtreg"
48897    if test ! -d "$JT_HOME"; then
48898      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48899    fi
48900
48901    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48902      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48903    fi
48904
48905    JTREGEXE="$JT_HOME/bin/jtreg"
48906    if test ! -x "$JTREGEXE"; then
48907      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48908    fi
48909
48910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48911$as_echo_n "checking for jtreg test harness... " >&6; }
48912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48913$as_echo "$JT_HOME" >&6; }
48914  else
48915    # Try to locate jtreg
48916    if test "x$JT_HOME" != x; then
48917      # JT_HOME set in environment, use it
48918      if test ! -d "$JT_HOME"; then
48919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48920$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48921        JT_HOME=
48922      else
48923        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48924          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48925$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48926          JT_HOME=
48927        elif test ! -x "$JT_HOME/bin/jtreg"; then
48928          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48929$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48930          JT_HOME=
48931        else
48932          JTREGEXE="$JT_HOME/bin/jtreg"
48933          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48934$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48935        fi
48936      fi
48937    fi
48938
48939    if test "x$JT_HOME" = x; then
48940      # JT_HOME is not set in environment, or was deemed invalid.
48941      # Try to find jtreg on path
48942
48943
48944  # Publish this variable in the help.
48945
48946
48947  if [ -z "${JTREGEXE+x}" ]; then
48948    # The variable is not set by user, try to locate tool using the code snippet
48949    for ac_prog in jtreg
48950do
48951  # Extract the first word of "$ac_prog", so it can be a program name with args.
48952set dummy $ac_prog; ac_word=$2
48953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48954$as_echo_n "checking for $ac_word... " >&6; }
48955if ${ac_cv_path_JTREGEXE+:} false; then :
48956  $as_echo_n "(cached) " >&6
48957else
48958  case $JTREGEXE in
48959  [\\/]* | ?:[\\/]*)
48960  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48961  ;;
48962  *)
48963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48964for as_dir in $PATH
48965do
48966  IFS=$as_save_IFS
48967  test -z "$as_dir" && as_dir=.
48968    for ac_exec_ext in '' $ac_executable_extensions; do
48969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48970    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48972    break 2
48973  fi
48974done
48975  done
48976IFS=$as_save_IFS
48977
48978  ;;
48979esac
48980fi
48981JTREGEXE=$ac_cv_path_JTREGEXE
48982if test -n "$JTREGEXE"; then
48983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48984$as_echo "$JTREGEXE" >&6; }
48985else
48986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48987$as_echo "no" >&6; }
48988fi
48989
48990
48991  test -n "$JTREGEXE" && break
48992done
48993
48994  else
48995    # The variable is set, but is it from the command line or the environment?
48996
48997    # Try to remove the string !JTREGEXE! from our list.
48998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49000      # If it failed, the variable was not from the command line. Ignore it,
49001      # but warn the user (except for BASH, which is always set by the calling BASH).
49002      if test "xJTREGEXE" != xBASH; then
49003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49004$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49005      fi
49006      # Try to locate tool using the code snippet
49007      for ac_prog in jtreg
49008do
49009  # Extract the first word of "$ac_prog", so it can be a program name with args.
49010set dummy $ac_prog; ac_word=$2
49011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49012$as_echo_n "checking for $ac_word... " >&6; }
49013if ${ac_cv_path_JTREGEXE+:} false; then :
49014  $as_echo_n "(cached) " >&6
49015else
49016  case $JTREGEXE in
49017  [\\/]* | ?:[\\/]*)
49018  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49019  ;;
49020  *)
49021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49022for as_dir in $PATH
49023do
49024  IFS=$as_save_IFS
49025  test -z "$as_dir" && as_dir=.
49026    for ac_exec_ext in '' $ac_executable_extensions; do
49027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49028    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49030    break 2
49031  fi
49032done
49033  done
49034IFS=$as_save_IFS
49035
49036  ;;
49037esac
49038fi
49039JTREGEXE=$ac_cv_path_JTREGEXE
49040if test -n "$JTREGEXE"; then
49041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49042$as_echo "$JTREGEXE" >&6; }
49043else
49044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49045$as_echo "no" >&6; }
49046fi
49047
49048
49049  test -n "$JTREGEXE" && break
49050done
49051
49052    else
49053      # If it succeeded, then it was overridden by the user. We will use it
49054      # for the tool.
49055
49056      # First remove it from the list of overridden variables, so we can test
49057      # for unknown variables in the end.
49058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49059
49060      # Check if we try to supply an empty value
49061      if test "x$JTREGEXE" = x; then
49062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49063$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49065$as_echo_n "checking for JTREGEXE... " >&6; }
49066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49067$as_echo "disabled" >&6; }
49068      else
49069        # Check if the provided tool contains a complete path.
49070        tool_specified="$JTREGEXE"
49071        tool_basename="${tool_specified##*/}"
49072        if test "x$tool_basename" = "x$tool_specified"; then
49073          # A command without a complete path is provided, search $PATH.
49074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49075$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49076          # Extract the first word of "$tool_basename", so it can be a program name with args.
49077set dummy $tool_basename; ac_word=$2
49078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49079$as_echo_n "checking for $ac_word... " >&6; }
49080if ${ac_cv_path_JTREGEXE+:} false; then :
49081  $as_echo_n "(cached) " >&6
49082else
49083  case $JTREGEXE in
49084  [\\/]* | ?:[\\/]*)
49085  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49086  ;;
49087  *)
49088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49089for as_dir in $PATH
49090do
49091  IFS=$as_save_IFS
49092  test -z "$as_dir" && as_dir=.
49093    for ac_exec_ext in '' $ac_executable_extensions; do
49094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49095    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49097    break 2
49098  fi
49099done
49100  done
49101IFS=$as_save_IFS
49102
49103  ;;
49104esac
49105fi
49106JTREGEXE=$ac_cv_path_JTREGEXE
49107if test -n "$JTREGEXE"; then
49108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49109$as_echo "$JTREGEXE" >&6; }
49110else
49111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49112$as_echo "no" >&6; }
49113fi
49114
49115
49116          if test "x$JTREGEXE" = x; then
49117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49118          fi
49119        else
49120          # Otherwise we believe it is a complete path. Use it as it is.
49121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49122$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49124$as_echo_n "checking for JTREGEXE... " >&6; }
49125          if test ! -x "$tool_specified"; then
49126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49127$as_echo "not found" >&6; }
49128            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49129          fi
49130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49131$as_echo "$tool_specified" >&6; }
49132        fi
49133      fi
49134    fi
49135
49136  fi
49137
49138
49139      if test "x$JTREGEXE" != x; then
49140        # That's good, now try to derive JT_HOME
49141        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49142        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49143          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49144$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49145          JT_HOME=
49146          JTREGEXE=
49147        else
49148          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49149$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49150        fi
49151      fi
49152    fi
49153
49154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49155$as_echo_n "checking for jtreg test harness... " >&6; }
49156    if test "x$JT_HOME" != x; then
49157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49158$as_echo "$JT_HOME" >&6; }
49159    else
49160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49161$as_echo "no, not found" >&6; }
49162
49163      if test "x$with_jtreg" = xyes; then
49164        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49165      fi
49166    fi
49167  fi
49168
49169
49170  # Only process if variable expands to non-empty
49171
49172  if test "x$JTREGEXE" != x; then
49173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49174
49175  # First separate the path from the arguments. This will split at the first
49176  # space.
49177  complete="$JTREGEXE"
49178  path="${complete%% *}"
49179  tmp="$complete EOL"
49180  arguments="${tmp#* }"
49181
49182  # Input might be given as Windows format, start by converting to
49183  # unix format.
49184  new_path=`$CYGPATH -u "$path"`
49185
49186  # Now try to locate executable using which
49187  new_path=`$WHICH "$new_path" 2> /dev/null`
49188  # bat and cmd files are not always considered executable in cygwin causing which
49189  # to not find them
49190  if test "x$new_path" = x \
49191      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49192      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49193    new_path=`$CYGPATH -u "$path"`
49194  fi
49195  if test "x$new_path" = x; then
49196    # Oops. Which didn't find the executable.
49197    # The splitting of arguments from the executable at a space might have been incorrect,
49198    # since paths with space are more likely in Windows. Give it another try with the whole
49199    # argument.
49200    path="$complete"
49201    arguments="EOL"
49202    new_path=`$CYGPATH -u "$path"`
49203    new_path=`$WHICH "$new_path" 2> /dev/null`
49204    # bat and cmd files are not always considered executable in cygwin causing which
49205    # to not find them
49206    if test "x$new_path" = x \
49207        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49208        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49209      new_path=`$CYGPATH -u "$path"`
49210    fi
49211    if test "x$new_path" = x; then
49212      # It's still not found. Now this is an unrecoverable error.
49213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49214$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49215      has_space=`$ECHO "$complete" | $GREP " "`
49216      if test "x$has_space" != x; then
49217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49219      fi
49220      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49221    fi
49222  fi
49223
49224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49227  # "foo.exe" is OK but "foo" is an error.
49228  #
49229  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49230  # It is also a way to make sure we got the proper file name for the real test later on.
49231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49232  if test "x$test_shortpath" = x; then
49233    # Short path failed, file does not exist as specified.
49234    # Try adding .exe or .cmd
49235    if test -f "${new_path}.exe"; then
49236      input_to_shortpath="${new_path}.exe"
49237    elif test -f "${new_path}.cmd"; then
49238      input_to_shortpath="${new_path}.cmd"
49239    else
49240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49241$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49242      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49243$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49244      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49245    fi
49246  else
49247    input_to_shortpath="$new_path"
49248  fi
49249
49250  # Call helper function which possibly converts this using DOS-style short mode.
49251  # If so, the updated path is stored in $new_path.
49252  new_path="$input_to_shortpath"
49253
49254  input_path="$input_to_shortpath"
49255  # Check if we need to convert this using DOS-style short mode. If the path
49256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49257  # take no chances and rewrite it.
49258  # Note: m4 eats our [], so we need to use [ and ] instead.
49259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49260  if test "x$has_forbidden_chars" != x; then
49261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49265      # Going to short mode and back again did indeed matter. Since short mode is
49266      # case insensitive, let's make it lowercase to improve readability.
49267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49268      # Now convert it back to Unix-style (cygpath)
49269      input_path=`$CYGPATH -u "$shortmode_path"`
49270      new_path="$input_path"
49271    fi
49272  fi
49273
49274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49275  if test "x$test_cygdrive_prefix" = x; then
49276    # As a simple fix, exclude /usr/bin since it's not a real path.
49277    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49279      # a path prefixed by /cygdrive for fixpath to work.
49280      new_path="$CYGWIN_ROOT_PATH$input_path"
49281    fi
49282  fi
49283
49284  # remove trailing .exe if any
49285  new_path="${new_path/%.exe/}"
49286
49287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49288
49289  # First separate the path from the arguments. This will split at the first
49290  # space.
49291  complete="$JTREGEXE"
49292  path="${complete%% *}"
49293  tmp="$complete EOL"
49294  arguments="${tmp#* }"
49295
49296  # Input might be given as Windows format, start by converting to
49297  # unix format.
49298  new_path="$path"
49299
49300  windows_path="$new_path"
49301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49302    unix_path=`$CYGPATH -u "$windows_path"`
49303    new_path="$unix_path"
49304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49306    new_path="$unix_path"
49307  fi
49308
49309
49310  # Now try to locate executable using which
49311  new_path=`$WHICH "$new_path" 2> /dev/null`
49312
49313  if test "x$new_path" = x; then
49314    # Oops. Which didn't find the executable.
49315    # The splitting of arguments from the executable at a space might have been incorrect,
49316    # since paths with space are more likely in Windows. Give it another try with the whole
49317    # argument.
49318    path="$complete"
49319    arguments="EOL"
49320    new_path="$path"
49321
49322  windows_path="$new_path"
49323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49324    unix_path=`$CYGPATH -u "$windows_path"`
49325    new_path="$unix_path"
49326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49328    new_path="$unix_path"
49329  fi
49330
49331
49332    new_path=`$WHICH "$new_path" 2> /dev/null`
49333    # bat and cmd files are not always considered executable in MSYS causing which
49334    # to not find them
49335    if test "x$new_path" = x \
49336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49338      new_path="$path"
49339
49340  windows_path="$new_path"
49341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49342    unix_path=`$CYGPATH -u "$windows_path"`
49343    new_path="$unix_path"
49344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49346    new_path="$unix_path"
49347  fi
49348
49349    fi
49350
49351    if test "x$new_path" = x; then
49352      # It's still not found. Now this is an unrecoverable error.
49353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49354$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49355      has_space=`$ECHO "$complete" | $GREP " "`
49356      if test "x$has_space" != x; then
49357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49359      fi
49360      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49361    fi
49362  fi
49363
49364  # Now new_path has a complete unix path to the binary
49365  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49366    # Keep paths in /bin as-is, but remove trailing .exe if any
49367    new_path="${new_path/%.exe/}"
49368    # Do not save /bin paths to all_fixpath_prefixes!
49369  else
49370    # Not in mixed or Windows style, start by that.
49371    new_path=`cmd //c echo $new_path`
49372
49373  input_path="$new_path"
49374  # Check if we need to convert this using DOS-style short mode. If the path
49375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49376  # take no chances and rewrite it.
49377  # Note: m4 eats our [], so we need to use [ and ] instead.
49378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49379  if test "x$has_forbidden_chars" != x; then
49380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49382  fi
49383
49384    # Output is in $new_path
49385
49386  windows_path="$new_path"
49387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49388    unix_path=`$CYGPATH -u "$windows_path"`
49389    new_path="$unix_path"
49390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49392    new_path="$unix_path"
49393  fi
49394
49395    # remove trailing .exe if any
49396    new_path="${new_path/%.exe/}"
49397
49398    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49399    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49400  fi
49401
49402    else
49403      # We're on a unix platform. Hooray! :)
49404      # First separate the path from the arguments. This will split at the first
49405      # space.
49406      complete="$JTREGEXE"
49407      path="${complete%% *}"
49408      tmp="$complete EOL"
49409      arguments="${tmp#* }"
49410
49411      # Cannot rely on the command "which" here since it doesn't always work.
49412      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49413      if test -z "$is_absolute_path"; then
49414        # Path to executable is not absolute. Find it.
49415        IFS_save="$IFS"
49416        IFS=:
49417        for p in $PATH; do
49418          if test -f "$p/$path" && test -x "$p/$path"; then
49419            new_path="$p/$path"
49420            break
49421          fi
49422        done
49423        IFS="$IFS_save"
49424      else
49425        # This is an absolute path, we can use it without further modifications.
49426        new_path="$path"
49427      fi
49428
49429      if test "x$new_path" = x; then
49430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49431$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49432        has_space=`$ECHO "$complete" | $GREP " "`
49433        if test "x$has_space" != x; then
49434          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49435$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49436        fi
49437        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49438      fi
49439    fi
49440
49441    # Now join together the path and the arguments once again
49442    if test "x$arguments" != xEOL; then
49443      new_complete="$new_path ${arguments% *}"
49444    else
49445      new_complete="$new_path"
49446    fi
49447
49448    if test "x$complete" != "x$new_complete"; then
49449      JTREGEXE="$new_complete"
49450      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49451$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49452    fi
49453  fi
49454
49455
49456  # Only process if variable expands to non-empty
49457
49458  if test "x$JT_HOME" != x; then
49459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49460
49461  # Input might be given as Windows format, start by converting to
49462  # unix format.
49463  path="$JT_HOME"
49464  new_path=`$CYGPATH -u "$path"`
49465
49466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49469  # "foo.exe" is OK but "foo" is an error.
49470  #
49471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49472  # It is also a way to make sure we got the proper file name for the real test later on.
49473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49474  if test "x$test_shortpath" = x; then
49475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49476$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49477    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49478  fi
49479
49480  # Call helper function which possibly converts this using DOS-style short mode.
49481  # If so, the updated path is stored in $new_path.
49482
49483  input_path="$new_path"
49484  # Check if we need to convert this using DOS-style short mode. If the path
49485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49486  # take no chances and rewrite it.
49487  # Note: m4 eats our [], so we need to use [ and ] instead.
49488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49489  if test "x$has_forbidden_chars" != x; then
49490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49494      # Going to short mode and back again did indeed matter. Since short mode is
49495      # case insensitive, let's make it lowercase to improve readability.
49496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49497      # Now convert it back to Unix-style (cygpath)
49498      input_path=`$CYGPATH -u "$shortmode_path"`
49499      new_path="$input_path"
49500    fi
49501  fi
49502
49503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49504  if test "x$test_cygdrive_prefix" = x; then
49505    # As a simple fix, exclude /usr/bin since it's not a real path.
49506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49508      # a path prefixed by /cygdrive for fixpath to work.
49509      new_path="$CYGWIN_ROOT_PATH$input_path"
49510    fi
49511  fi
49512
49513
49514  if test "x$path" != "x$new_path"; then
49515    JT_HOME="$new_path"
49516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49517$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49518  fi
49519
49520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49521
49522  path="$JT_HOME"
49523  has_colon=`$ECHO $path | $GREP ^.:`
49524  new_path="$path"
49525  if test "x$has_colon" = x; then
49526    # Not in mixed or Windows style, start by that.
49527    new_path=`cmd //c echo $path`
49528  fi
49529
49530
49531  input_path="$new_path"
49532  # Check if we need to convert this using DOS-style short mode. If the path
49533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49534  # take no chances and rewrite it.
49535  # Note: m4 eats our [], so we need to use [ and ] instead.
49536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49537  if test "x$has_forbidden_chars" != x; then
49538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49540  fi
49541
49542
49543  windows_path="$new_path"
49544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49545    unix_path=`$CYGPATH -u "$windows_path"`
49546    new_path="$unix_path"
49547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49549    new_path="$unix_path"
49550  fi
49551
49552  if test "x$path" != "x$new_path"; then
49553    JT_HOME="$new_path"
49554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49555$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49556  fi
49557
49558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49560
49561    else
49562      # We're on a unix platform. Hooray! :)
49563      path="$JT_HOME"
49564      has_space=`$ECHO "$path" | $GREP " "`
49565      if test "x$has_space" != x; then
49566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49567$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49569      fi
49570
49571      # Use eval to expand a potential ~
49572      eval path="$path"
49573      if test ! -f "$path" && test ! -d "$path"; then
49574        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49575      fi
49576
49577      if test -d "$path"; then
49578        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49579      else
49580        dir="`$DIRNAME "$path"`"
49581        base="`$BASENAME "$path"`"
49582        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49583      fi
49584    fi
49585  fi
49586
49587
49588
49589
49590
49591# Setup Jib dependency tool
49592
49593
49594# Check whether --with-jib was given.
49595if test "${with_jib+set}" = set; then :
49596  withval=$with_jib;
49597fi
49598
49599
49600  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49601    # jib disabled
49602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49603$as_echo_n "checking for jib... " >&6; }
49604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49605$as_echo "no" >&6; }
49606  elif test "x$with_jib" = xyes; then
49607    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49608  else
49609    JIB_HOME="${with_jib}"
49610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49611$as_echo_n "checking for jib... " >&6; }
49612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49613$as_echo "${JIB_HOME}" >&6; }
49614    if test ! -d "${JIB_HOME}"; then
49615      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49616    fi
49617    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49618    if test ! -f "${JIB_JAR}"; then
49619      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49620    fi
49621  fi
49622
49623
49624
49625
49626
49627  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49628  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49629  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49630  #                              commands produced by the link step (currently AIX only)
49631  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49632    COMPILER_TARGET_BITS_FLAG="-q"
49633    COMPILER_COMMAND_FILE_FLAG="-f"
49634    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49635  else
49636    COMPILER_TARGET_BITS_FLAG="-m"
49637    COMPILER_COMMAND_FILE_FLAG="@"
49638    COMPILER_BINDCMD_FILE_FLAG=""
49639
49640    # The solstudio linker does not support @-files.
49641    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49642      COMPILER_COMMAND_FILE_FLAG=
49643    fi
49644
49645    # Check if @file is supported by gcc
49646    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49648$as_echo_n "checking if @file is supported by gcc... " >&6; }
49649      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49650      $ECHO "" "--version" > command.file
49651      if $CXX @command.file 2>&5 >&5; then
49652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49653$as_echo "yes" >&6; }
49654        COMPILER_COMMAND_FILE_FLAG="@"
49655      else
49656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49657$as_echo "no" >&6; }
49658        COMPILER_COMMAND_FILE_FLAG=
49659      fi
49660      $RM command.file
49661    fi
49662  fi
49663
49664
49665
49666
49667  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49668  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49669    ARFLAGS="-r"
49670  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49671    ARFLAGS="-X64"
49672  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49673    # lib.exe is used as AR to create static libraries.
49674    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49675  else
49676    ARFLAGS=""
49677  fi
49678
49679
49680  ## Setup strip.
49681  # FIXME: should this really be per platform, or should it be per toolchain type?
49682  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49683  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49684  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49685    STRIPFLAGS="-g"
49686  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49687    STRIPFLAGS="-x"
49688  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49689    STRIPFLAGS="-S"
49690  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49691    STRIPFLAGS="-X32_64"
49692  fi
49693
49694
49695
49696  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49697    CC_OUT_OPTION=-Fo
49698    EXE_OUT_OPTION=-out:
49699    LD_OUT_OPTION=-out:
49700    AR_OUT_OPTION=-out:
49701  else
49702    # The option used to specify the target .o,.a or .so file.
49703    # When compiling, how to specify the to be created object file.
49704    CC_OUT_OPTION='-o$(SPACE)'
49705    # When linking, how to specify the to be created executable.
49706    EXE_OUT_OPTION='-o$(SPACE)'
49707    # When linking, how to specify the to be created dynamically linkable library.
49708    LD_OUT_OPTION='-o$(SPACE)'
49709    # When archiving, how to specify the to be create static archive for object files.
49710    AR_OUT_OPTION='rcs$(SPACE)'
49711  fi
49712
49713
49714
49715
49716
49717  # On Windows, we need to set RC flags.
49718  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49719    RC_FLAGS="-nologo -l0x409"
49720    JVM_RCFLAGS="-nologo"
49721    if test "x$DEBUG_LEVEL" = xrelease; then
49722      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49723      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49724    fi
49725
49726    # The version variables used to create RC_FLAGS may be overridden
49727    # in a custom configure script, or possibly the command line.
49728    # Let those variables be expanded at make time in spec.gmk.
49729    # The \$ are escaped to the shell, and the $(...) variables
49730    # are evaluated by make.
49731    RC_FLAGS="$RC_FLAGS \
49732        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49733        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49734        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49735        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49736        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49737        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49738        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49739
49740    JVM_RCFLAGS="$JVM_RCFLAGS \
49741        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49742        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49743        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49744        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49745        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49746        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49747        -D\"HS_FNAME=jvm.dll\" \
49748        -D\"HS_INTERNAL_NAME=jvm\""
49749  fi
49750
49751
49752
49753  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49754    # silence copyright notice and other headers.
49755    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49756  fi
49757
49758
49759# Now we can test some aspects on the target using configure macros.
49760
49761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49762$as_echo_n "checking for ANSI C header files... " >&6; }
49763if ${ac_cv_header_stdc+:} false; then :
49764  $as_echo_n "(cached) " >&6
49765else
49766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49767/* end confdefs.h.  */
49768#include <stdlib.h>
49769#include <stdarg.h>
49770#include <string.h>
49771#include <float.h>
49772
49773int
49774main ()
49775{
49776
49777  ;
49778  return 0;
49779}
49780_ACEOF
49781if ac_fn_cxx_try_compile "$LINENO"; then :
49782  ac_cv_header_stdc=yes
49783else
49784  ac_cv_header_stdc=no
49785fi
49786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49787
49788if test $ac_cv_header_stdc = yes; then
49789  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49791/* end confdefs.h.  */
49792#include <string.h>
49793
49794_ACEOF
49795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49796  $EGREP "memchr" >/dev/null 2>&1; then :
49797
49798else
49799  ac_cv_header_stdc=no
49800fi
49801rm -f conftest*
49802
49803fi
49804
49805if test $ac_cv_header_stdc = yes; then
49806  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49808/* end confdefs.h.  */
49809#include <stdlib.h>
49810
49811_ACEOF
49812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49813  $EGREP "free" >/dev/null 2>&1; then :
49814
49815else
49816  ac_cv_header_stdc=no
49817fi
49818rm -f conftest*
49819
49820fi
49821
49822if test $ac_cv_header_stdc = yes; then
49823  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49824  if test "$cross_compiling" = yes; then :
49825  :
49826else
49827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49828/* end confdefs.h.  */
49829#include <ctype.h>
49830#include <stdlib.h>
49831#if ((' ' & 0x0FF) == 0x020)
49832# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49833# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49834#else
49835# define ISLOWER(c) \
49836		   (('a' <= (c) && (c) <= 'i') \
49837		     || ('j' <= (c) && (c) <= 'r') \
49838		     || ('s' <= (c) && (c) <= 'z'))
49839# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49840#endif
49841
49842#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49843int
49844main ()
49845{
49846  int i;
49847  for (i = 0; i < 256; i++)
49848    if (XOR (islower (i), ISLOWER (i))
49849	|| toupper (i) != TOUPPER (i))
49850      return 2;
49851  return 0;
49852}
49853_ACEOF
49854if ac_fn_cxx_try_run "$LINENO"; then :
49855
49856else
49857  ac_cv_header_stdc=no
49858fi
49859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49860  conftest.$ac_objext conftest.beam conftest.$ac_ext
49861fi
49862
49863fi
49864fi
49865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49866$as_echo "$ac_cv_header_stdc" >&6; }
49867if test $ac_cv_header_stdc = yes; then
49868
49869$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49870
49871fi
49872
49873# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49874for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49875		  inttypes.h stdint.h unistd.h
49876do :
49877  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49878ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49879"
49880if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49881  cat >>confdefs.h <<_ACEOF
49882#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49883_ACEOF
49884
49885fi
49886
49887done
49888
49889
49890
49891  ###############################################################################
49892  #
49893  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49894  # (The JVM can use 32 or 64 bit Java pointers but that decision
49895  # is made at runtime.)
49896  #
49897
49898  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49899    # Always specify -m flag on Solaris
49900    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49901
49902  # When we add flags to the "official" CFLAGS etc, we need to
49903  # keep track of these additions in ADDED_CFLAGS etc. These
49904  # will later be checked to make sure only controlled additions
49905  # have been made to CFLAGS etc.
49906  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49907  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49908  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49909
49910  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49911  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49912  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49913
49914  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49915  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49916  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49917
49918  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49919  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49920  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49921
49922  elif test "x$COMPILE_TYPE" = xreduced; then
49923    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49924      # Specify -m if running reduced on unix platforms
49925
49926  # When we add flags to the "official" CFLAGS etc, we need to
49927  # keep track of these additions in ADDED_CFLAGS etc. These
49928  # will later be checked to make sure only controlled additions
49929  # have been made to CFLAGS etc.
49930  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49931  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49932  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49933
49934  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49935  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49936  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49937
49938  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49939  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49940  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49941
49942  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49943  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49944  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49945
49946    fi
49947  fi
49948  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49949    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49950    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49951    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49952  fi
49953
49954  # Make compilation sanity check
49955  for ac_header in stdio.h
49956do :
49957  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49958if test "x$ac_cv_header_stdio_h" = xyes; then :
49959  cat >>confdefs.h <<_ACEOF
49960#define HAVE_STDIO_H 1
49961_ACEOF
49962
49963else
49964
49965    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49966$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49967    if test "x$COMPILE_TYPE" = xreduced; then
49968
49969  # Print a helpful message on how to acquire the necessary build dependency.
49970  # reduced is the help tag: freetype, cups, alsa etc
49971  MISSING_DEPENDENCY=reduced
49972
49973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49974    cygwin_help $MISSING_DEPENDENCY
49975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49976    msys_help $MISSING_DEPENDENCY
49977  else
49978    PKGHANDLER_COMMAND=
49979
49980    case $PKGHANDLER in
49981      apt-get)
49982        apt_help     $MISSING_DEPENDENCY ;;
49983      yum)
49984        yum_help     $MISSING_DEPENDENCY ;;
49985      brew)
49986        brew_help    $MISSING_DEPENDENCY ;;
49987      port)
49988        port_help    $MISSING_DEPENDENCY ;;
49989      pkgutil)
49990        pkgutil_help $MISSING_DEPENDENCY ;;
49991      pkgadd)
49992        pkgadd_help  $MISSING_DEPENDENCY ;;
49993    esac
49994
49995    if test "x$PKGHANDLER_COMMAND" != x; then
49996      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49997    fi
49998  fi
49999
50000      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50001$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50002    elif test "x$COMPILE_TYPE" = xcross; then
50003      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50004$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50005    fi
50006    as_fn_error $? "Cannot continue." "$LINENO" 5
50007
50008fi
50009
50010done
50011
50012
50013  # The cast to long int works around a bug in the HP C Compiler
50014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50016# This bug is HP SR number 8606223364.
50017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50018$as_echo_n "checking size of int *... " >&6; }
50019if ${ac_cv_sizeof_int_p+:} false; then :
50020  $as_echo_n "(cached) " >&6
50021else
50022  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50023
50024else
50025  if test "$ac_cv_type_int_p" = yes; then
50026     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50028as_fn_error 77 "cannot compute sizeof (int *)
50029See \`config.log' for more details" "$LINENO" 5; }
50030   else
50031     ac_cv_sizeof_int_p=0
50032   fi
50033fi
50034
50035fi
50036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50037$as_echo "$ac_cv_sizeof_int_p" >&6; }
50038
50039
50040
50041cat >>confdefs.h <<_ACEOF
50042#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50043_ACEOF
50044
50045
50046
50047  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50048  if test "x$ac_cv_sizeof_int_p" = x; then
50049    # The test failed, lets stick to the assumed value.
50050    { $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
50051$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50052  else
50053    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50054
50055    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50056      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50057      # Let's try to implicitely set the compilers target architecture and retry the test
50058      { $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
50059$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;}
50060      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50061$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50062
50063  # When we add flags to the "official" CFLAGS etc, we need to
50064  # keep track of these additions in ADDED_CFLAGS etc. These
50065  # will later be checked to make sure only controlled additions
50066  # have been made to CFLAGS etc.
50067  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50068  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50069  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50070
50071  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50072  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50073  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50074
50075  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50076  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50077  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50078
50079  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50080  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50081  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50082
50083
50084      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50085      unset ac_cv_sizeof_int_p
50086      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50087      cat >>confdefs.h <<_ACEOF
50088#undef SIZEOF_INT_P
50089_ACEOF
50090
50091      # The cast to long int works around a bug in the HP C Compiler
50092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50094# This bug is HP SR number 8606223364.
50095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50096$as_echo_n "checking size of int *... " >&6; }
50097if ${ac_cv_sizeof_int_p+:} false; then :
50098  $as_echo_n "(cached) " >&6
50099else
50100  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50101
50102else
50103  if test "$ac_cv_type_int_p" = yes; then
50104     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50106as_fn_error 77 "cannot compute sizeof (int *)
50107See \`config.log' for more details" "$LINENO" 5; }
50108   else
50109     ac_cv_sizeof_int_p=0
50110   fi
50111fi
50112
50113fi
50114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50115$as_echo "$ac_cv_sizeof_int_p" >&6; }
50116
50117
50118
50119cat >>confdefs.h <<_ACEOF
50120#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50121_ACEOF
50122
50123
50124
50125      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50126
50127      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50128        { $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
50129$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;}
50130        if test "x$COMPILE_TYPE" = xreduced; then
50131
50132  # Print a helpful message on how to acquire the necessary build dependency.
50133  # reduced is the help tag: freetype, cups, alsa etc
50134  MISSING_DEPENDENCY=reduced
50135
50136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50137    cygwin_help $MISSING_DEPENDENCY
50138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50139    msys_help $MISSING_DEPENDENCY
50140  else
50141    PKGHANDLER_COMMAND=
50142
50143    case $PKGHANDLER in
50144      apt-get)
50145        apt_help     $MISSING_DEPENDENCY ;;
50146      yum)
50147        yum_help     $MISSING_DEPENDENCY ;;
50148      brew)
50149        brew_help    $MISSING_DEPENDENCY ;;
50150      port)
50151        port_help    $MISSING_DEPENDENCY ;;
50152      pkgutil)
50153        pkgutil_help $MISSING_DEPENDENCY ;;
50154      pkgadd)
50155        pkgadd_help  $MISSING_DEPENDENCY ;;
50156    esac
50157
50158    if test "x$PKGHANDLER_COMMAND" != x; then
50159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50160    fi
50161  fi
50162
50163          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50164$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50165        elif test "x$COMPILE_TYPE" = xcross; then
50166          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50167$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50168        fi
50169        as_fn_error $? "Cannot continue." "$LINENO" 5
50170      fi
50171    fi
50172  fi
50173
50174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50175$as_echo_n "checking for target address size... " >&6; }
50176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50177$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50178
50179
50180  ###############################################################################
50181  #
50182  # Is the target little of big endian?
50183  #
50184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50185$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50186if ${ac_cv_c_bigendian+:} false; then :
50187  $as_echo_n "(cached) " >&6
50188else
50189  ac_cv_c_bigendian=unknown
50190    # See if we're dealing with a universal compiler.
50191    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50192/* end confdefs.h.  */
50193#ifndef __APPLE_CC__
50194	       not a universal capable compiler
50195	     #endif
50196	     typedef int dummy;
50197
50198_ACEOF
50199if ac_fn_cxx_try_compile "$LINENO"; then :
50200
50201	# Check for potential -arch flags.  It is not universal unless
50202	# there are at least two -arch flags with different values.
50203	ac_arch=
50204	ac_prev=
50205	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50206	 if test -n "$ac_prev"; then
50207	   case $ac_word in
50208	     i?86 | x86_64 | ppc | ppc64)
50209	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50210		 ac_arch=$ac_word
50211	       else
50212		 ac_cv_c_bigendian=universal
50213		 break
50214	       fi
50215	       ;;
50216	   esac
50217	   ac_prev=
50218	 elif test "x$ac_word" = "x-arch"; then
50219	   ac_prev=arch
50220	 fi
50221       done
50222fi
50223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50224    if test $ac_cv_c_bigendian = unknown; then
50225      # See if sys/param.h defines the BYTE_ORDER macro.
50226      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50227/* end confdefs.h.  */
50228#include <sys/types.h>
50229	     #include <sys/param.h>
50230
50231int
50232main ()
50233{
50234#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50235		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50236		     && LITTLE_ENDIAN)
50237	      bogus endian macros
50238	     #endif
50239
50240  ;
50241  return 0;
50242}
50243_ACEOF
50244if ac_fn_cxx_try_compile "$LINENO"; then :
50245  # It does; now see whether it defined to BIG_ENDIAN or not.
50246	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50247/* end confdefs.h.  */
50248#include <sys/types.h>
50249		#include <sys/param.h>
50250
50251int
50252main ()
50253{
50254#if BYTE_ORDER != BIG_ENDIAN
50255		 not big endian
50256		#endif
50257
50258  ;
50259  return 0;
50260}
50261_ACEOF
50262if ac_fn_cxx_try_compile "$LINENO"; then :
50263  ac_cv_c_bigendian=yes
50264else
50265  ac_cv_c_bigendian=no
50266fi
50267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50268fi
50269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50270    fi
50271    if test $ac_cv_c_bigendian = unknown; then
50272      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50273      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50274/* end confdefs.h.  */
50275#include <limits.h>
50276
50277int
50278main ()
50279{
50280#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50281	      bogus endian macros
50282	     #endif
50283
50284  ;
50285  return 0;
50286}
50287_ACEOF
50288if ac_fn_cxx_try_compile "$LINENO"; then :
50289  # It does; now see whether it defined to _BIG_ENDIAN or not.
50290	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50291/* end confdefs.h.  */
50292#include <limits.h>
50293
50294int
50295main ()
50296{
50297#ifndef _BIG_ENDIAN
50298		 not big endian
50299		#endif
50300
50301  ;
50302  return 0;
50303}
50304_ACEOF
50305if ac_fn_cxx_try_compile "$LINENO"; then :
50306  ac_cv_c_bigendian=yes
50307else
50308  ac_cv_c_bigendian=no
50309fi
50310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50311fi
50312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50313    fi
50314    if test $ac_cv_c_bigendian = unknown; then
50315      # Compile a test program.
50316      if test "$cross_compiling" = yes; then :
50317  # Try to guess by grepping values from an object file.
50318	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50319/* end confdefs.h.  */
50320short int ascii_mm[] =
50321		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50322		short int ascii_ii[] =
50323		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50324		int use_ascii (int i) {
50325		  return ascii_mm[i] + ascii_ii[i];
50326		}
50327		short int ebcdic_ii[] =
50328		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50329		short int ebcdic_mm[] =
50330		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50331		int use_ebcdic (int i) {
50332		  return ebcdic_mm[i] + ebcdic_ii[i];
50333		}
50334		extern int foo;
50335
50336int
50337main ()
50338{
50339return use_ascii (foo) == use_ebcdic (foo);
50340  ;
50341  return 0;
50342}
50343_ACEOF
50344if ac_fn_cxx_try_compile "$LINENO"; then :
50345  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50346	      ac_cv_c_bigendian=yes
50347	    fi
50348	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50349	      if test "$ac_cv_c_bigendian" = unknown; then
50350		ac_cv_c_bigendian=no
50351	      else
50352		# finding both strings is unlikely to happen, but who knows?
50353		ac_cv_c_bigendian=unknown
50354	      fi
50355	    fi
50356fi
50357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50358else
50359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50360/* end confdefs.h.  */
50361$ac_includes_default
50362int
50363main ()
50364{
50365
50366	     /* Are we little or big endian?  From Harbison&Steele.  */
50367	     union
50368	     {
50369	       long int l;
50370	       char c[sizeof (long int)];
50371	     } u;
50372	     u.l = 1;
50373	     return u.c[sizeof (long int) - 1] == 1;
50374
50375  ;
50376  return 0;
50377}
50378_ACEOF
50379if ac_fn_cxx_try_run "$LINENO"; then :
50380  ac_cv_c_bigendian=no
50381else
50382  ac_cv_c_bigendian=yes
50383fi
50384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50385  conftest.$ac_objext conftest.beam conftest.$ac_ext
50386fi
50387
50388    fi
50389fi
50390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50391$as_echo "$ac_cv_c_bigendian" >&6; }
50392 case $ac_cv_c_bigendian in #(
50393   yes)
50394     ENDIAN="big";; #(
50395   no)
50396     ENDIAN="little" ;; #(
50397   universal)
50398     ENDIAN="universal_endianness"
50399     ;; #(
50400   *)
50401     ENDIAN="unknown" ;;
50402 esac
50403
50404
50405  if test "x$ENDIAN" = xuniversal_endianness; then
50406    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50407  fi
50408  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50409    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
50410  fi
50411
50412
50413# Configure flags for the tools
50414
50415  ###############################################################################
50416  #
50417  # How to compile shared libraries.
50418  #
50419
50420  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50421    PICFLAG="-fPIC"
50422    C_FLAG_REORDER=''
50423    CXX_FLAG_REORDER=''
50424
50425    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50426      # Linking is different on MacOSX
50427      if test "x$STATIC_BUILD" = xtrue; then
50428        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50429      else
50430        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50431        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50432      fi
50433      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50434      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50435      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50436      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50437    else
50438      # Default works for linux, might work on other platforms as well.
50439      SHARED_LIBRARY_FLAGS='-shared'
50440      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50441      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50442      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50443      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50444    fi
50445  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50446    C_FLAG_REORDER=''
50447    CXX_FLAG_REORDER=''
50448
50449    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50450      # Linking is different on MacOSX
50451      PICFLAG=''
50452      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50453      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50454      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50455      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50456      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50457
50458      if test "x$STATIC_BUILD" = xfalse; then
50459        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50460      fi
50461    else
50462      # Default works for linux, might work on other platforms as well.
50463      PICFLAG='-fPIC'
50464      SHARED_LIBRARY_FLAGS='-shared'
50465      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50466      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50467      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50468
50469      # arm specific settings
50470      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50471        # '-Wl,-z,origin' isn't used on arm.
50472        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50473      else
50474        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50475      fi
50476
50477    fi
50478  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50479    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50480      PICFLAG="-xcode=pic32"
50481    else
50482      PICFLAG="-KPIC"
50483    fi
50484    C_FLAG_REORDER='-xF'
50485    CXX_FLAG_REORDER='-xF'
50486    SHARED_LIBRARY_FLAGS="-G"
50487    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50488    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50489    SET_SHARED_LIBRARY_NAME='-h $1'
50490    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50491  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50492    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50493    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50494    # will have to patch this single instruction with a call to some out-of-order code which
50495    # does the load from the TOC. This is of course slow. But in that case we also would have
50496    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50497    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50498    # can be patched directly by the linker and does not require a jump to out-of-order code.
50499    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50500    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50501    # loads for accessing a global variable). But there are rumors that this may be seen as a
50502    # 'performance feature' because of improved code locality of the symbols used in a
50503    # compilation unit.
50504    PICFLAG="-qpic"
50505    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50506    C_FLAG_REORDER=''
50507    CXX_FLAG_REORDER=''
50508    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50509    SET_EXECUTABLE_ORIGIN=""
50510    SET_SHARED_LIBRARY_ORIGIN=''
50511    SET_SHARED_LIBRARY_NAME=''
50512    SET_SHARED_LIBRARY_MAPFILE=''
50513  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50514    PICFLAG=""
50515    C_FLAG_REORDER=''
50516    CXX_FLAG_REORDER=''
50517    SHARED_LIBRARY_FLAGS="-dll"
50518    SET_EXECUTABLE_ORIGIN=''
50519    SET_SHARED_LIBRARY_ORIGIN=''
50520    SET_SHARED_LIBRARY_NAME=''
50521    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50522  fi
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532  # The (cross) compiler is now configured, we can now test capabilities
50533  # of the target platform.
50534
50535
50536
50537  ###############################################################################
50538  #
50539  # Setup the opt flags for different compilers
50540  # and different operating systems.
50541  #
50542
50543  # FIXME: this was indirectly the old default, but just inherited.
50544  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50545  #   C_FLAG_DEPS="-MMD -MF"
50546  # fi
50547
50548  # Generate make dependency files
50549  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50550    C_FLAG_DEPS="-MMD -MF"
50551  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50552    C_FLAG_DEPS="-MMD -MF"
50553  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50554    C_FLAG_DEPS="-xMMD -xMF"
50555  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50556    C_FLAG_DEPS="-qmakedep=gcc -MF"
50557  fi
50558  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50559
50560
50561
50562  # Debug symbols
50563  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50564    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50565      # reduce from default "-g2" option to save space
50566      CFLAGS_DEBUG_SYMBOLS="-g1"
50567      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50568    else
50569      CFLAGS_DEBUG_SYMBOLS="-g"
50570      CXXFLAGS_DEBUG_SYMBOLS="-g"
50571    fi
50572  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50573    CFLAGS_DEBUG_SYMBOLS="-g"
50574    CXXFLAGS_DEBUG_SYMBOLS="-g"
50575  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50576    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50577    # -g0 enables debug symbols without disabling inlining.
50578    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50579  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50580    CFLAGS_DEBUG_SYMBOLS="-g"
50581    CXXFLAGS_DEBUG_SYMBOLS="-g"
50582  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50583    CFLAGS_DEBUG_SYMBOLS="-Zi"
50584    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50585  fi
50586
50587
50588
50589  # Debug symbols for JVM_CFLAGS
50590  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50591    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50592    if test "x$DEBUG_LEVEL" = xslowdebug; then
50593      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50594    else
50595      # -g0 does not disable inlining, which -g does.
50596      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50597    fi
50598  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50599    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50600  else
50601    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50602  fi
50603
50604
50605  # bounds, memory and behavior checking options
50606  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50607    case $DEBUG_LEVEL in
50608    release )
50609      # no adjustment
50610      ;;
50611    fastdebug )
50612      # no adjustment
50613      ;;
50614    slowdebug )
50615      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50616      # get's added conditionally on whether we produce debug symbols or not.
50617      # This is most likely not really correct.
50618
50619      # Add runtime stack smashing and undefined behavior checks.
50620      # Not all versions of gcc support -fstack-protector
50621      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664    # Execute function body
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
50708
50709
50710
50711
50712
50713    # Execute function body
50714
50715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50716$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50717  supports=yes
50718
50719  saved_cflags="$CFLAGS"
50720  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50721  ac_ext=c
50722ac_cpp='$CPP $CPPFLAGS'
50723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50725ac_compiler_gnu=$ac_cv_c_compiler_gnu
50726
50727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50728/* end confdefs.h.  */
50729int i;
50730_ACEOF
50731if ac_fn_c_try_compile "$LINENO"; then :
50732
50733else
50734  supports=no
50735fi
50736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50737  ac_ext=cpp
50738ac_cpp='$CXXCPP $CPPFLAGS'
50739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50742
50743  CFLAGS="$saved_cflags"
50744
50745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50746$as_echo "$supports" >&6; }
50747  if test "x$supports" = "xyes" ; then
50748    :
50749    C_COMP_SUPPORTS="yes"
50750  else
50751    :
50752    C_COMP_SUPPORTS="no"
50753  fi
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813    # Execute function body
50814
50815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50816$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50817  supports=yes
50818
50819  saved_cxxflags="$CXXFLAGS"
50820  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50821  ac_ext=cpp
50822ac_cpp='$CXXCPP $CPPFLAGS'
50823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50826
50827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50828/* end confdefs.h.  */
50829int i;
50830_ACEOF
50831if ac_fn_cxx_try_compile "$LINENO"; then :
50832
50833else
50834  supports=no
50835fi
50836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50837  ac_ext=cpp
50838ac_cpp='$CXXCPP $CPPFLAGS'
50839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50842
50843  CXXFLAGS="$saved_cxxflags"
50844
50845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50846$as_echo "$supports" >&6; }
50847  if test "x$supports" = "xyes" ; then
50848    :
50849    CXX_COMP_SUPPORTS="yes"
50850  else
50851    :
50852    CXX_COMP_SUPPORTS="no"
50853  fi
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50868$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50869  supports=no
50870  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50871
50872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50873$as_echo "$supports" >&6; }
50874  if test "x$supports" = "xyes" ; then
50875    :
50876
50877  else
50878    :
50879    STACK_PROTECTOR_CFLAG=""
50880  fi
50881
50882
50883
50884
50885
50886
50887
50888      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50889      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50890      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50891        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50892      fi
50893      ;;
50894    esac
50895  fi
50896
50897  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50898    if test "x$DEBUG_LEVEL" != xrelease; then
50899      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50900        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50901      fi
50902    fi
50903  fi
50904
50905  # Optimization levels
50906  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50907    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50908
50909    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50910      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50911      C_O_FLAG_HIGHEST_JVM="-xO4"
50912      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50913      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50914      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50915      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50916      C_O_FLAG_DEBUG_JVM=""
50917      C_O_FLAG_NONE="-xregs=no%frameptr"
50918      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50919      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50920      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50921      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50922      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50923      CXX_O_FLAG_DEBUG_JVM=""
50924      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50925      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50926        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50927        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50928      fi
50929    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50930      C_O_FLAG_HIGHEST_JVM="-xO4"
50931      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50932      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50933      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50934      C_O_FLAG_DEBUG=""
50935      C_O_FLAG_DEBUG_JVM=""
50936      C_O_FLAG_NONE=""
50937      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50938      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50939      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50940      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50941      CXX_O_FLAG_DEBUG=""
50942      CXX_O_FLAG_DEBUG_JVM=""
50943      CXX_O_FLAG_NONE=""
50944    fi
50945  else
50946    # The remaining toolchains share opt flags between CC and CXX;
50947    # setup for C and duplicate afterwards.
50948    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50949      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50950        # On MacOSX we optimize for size, something
50951        # we should do for all platforms?
50952        C_O_FLAG_HIGHEST_JVM="-Os"
50953        C_O_FLAG_HIGHEST="-Os"
50954        C_O_FLAG_HI="-Os"
50955        C_O_FLAG_NORM="-Os"
50956        C_O_FLAG_SIZE="-Os"
50957      else
50958        C_O_FLAG_HIGHEST_JVM="-O3"
50959        C_O_FLAG_HIGHEST="-O3"
50960        C_O_FLAG_HI="-O3"
50961        C_O_FLAG_NORM="-O2"
50962        C_O_FLAG_SIZE="-Os"
50963      fi
50964      C_O_FLAG_DEBUG="-O0"
50965      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50966        C_O_FLAG_DEBUG_JVM=""
50967      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50968        C_O_FLAG_DEBUG_JVM="-O0"
50969      fi
50970      C_O_FLAG_NONE="-O0"
50971    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50972      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50973        # On MacOSX we optimize for size, something
50974        # we should do for all platforms?
50975        C_O_FLAG_HIGHEST_JVM="-Os"
50976        C_O_FLAG_HIGHEST="-Os"
50977        C_O_FLAG_HI="-Os"
50978        C_O_FLAG_NORM="-Os"
50979        C_O_FLAG_SIZE="-Os"
50980      else
50981        C_O_FLAG_HIGHEST_JVM="-O3"
50982        C_O_FLAG_HIGHEST="-O3"
50983        C_O_FLAG_HI="-O3"
50984        C_O_FLAG_NORM="-O2"
50985        C_O_FLAG_SIZE="-Os"
50986      fi
50987      C_O_FLAG_DEBUG="-O0"
50988      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50989        C_O_FLAG_DEBUG_JVM=""
50990      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50991        C_O_FLAG_DEBUG_JVM="-O0"
50992      fi
50993      C_O_FLAG_NONE="-O0"
50994    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50995      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50996      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50997      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50998      C_O_FLAG_NORM="-O2"
50999      C_O_FLAG_DEBUG="-qnoopt"
51000      # FIXME: Value below not verified.
51001      C_O_FLAG_DEBUG_JVM=""
51002      C_O_FLAG_NONE="-qnoopt"
51003    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51004      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
51005      C_O_FLAG_HIGHEST="-O2"
51006      C_O_FLAG_HI="-O1"
51007      C_O_FLAG_NORM="-O1"
51008      C_O_FLAG_DEBUG="-Od"
51009      C_O_FLAG_DEBUG_JVM=""
51010      C_O_FLAG_NONE="-Od"
51011      C_O_FLAG_SIZE="-Os"
51012    fi
51013    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51014    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51015    CXX_O_FLAG_HI="$C_O_FLAG_HI"
51016    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51017    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51018    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51019    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51020    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51021  fi
51022
51023  # Adjust optimization flags according to debug level.
51024  case $DEBUG_LEVEL in
51025    release )
51026      # no adjustment
51027      ;;
51028    fastdebug )
51029      # Not quite so much optimization
51030      C_O_FLAG_HI="$C_O_FLAG_NORM"
51031      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51032      ;;
51033    slowdebug )
51034      # Disable optimization
51035      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51036      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51037      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51038      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51039      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51040      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51041      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51042      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51043      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51044      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51045      ;;
51046  esac
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067# Check whether --with-abi-profile was given.
51068if test "${with_abi_profile+set}" = set; then :
51069  withval=$with_abi_profile;
51070fi
51071
51072
51073  if test "x$with_abi_profile" != x; then
51074    if test "x$OPENJDK_TARGET_CPU" != xarm && \
51075        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51076      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51077    fi
51078
51079    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51081$as_echo_n "checking for ABI profle... " >&6; }
51082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51083$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51084
51085    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51086      ARM_FLOAT_TYPE=vfp-sflt
51087      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51088    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51089      ARM_FLOAT_TYPE=vfp-hflt
51090      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51091    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51092      ARM_FLOAT_TYPE=sflt
51093      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51094    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51095      ARM_FLOAT_TYPE=vfp-sflt
51096      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51097    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51098      ARM_FLOAT_TYPE=vfp-hflt
51099      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51100    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51101      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51102      ARM_FLOAT_TYPE=
51103      ARM_ARCH_TYPE_FLAGS=
51104    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51105      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51106      ARM_FLOAT_TYPE=
51107      ARM_ARCH_TYPE_FLAGS=
51108    else
51109      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51110    fi
51111
51112    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51113      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51114    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51115      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51116    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51117      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51118    fi
51119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51120$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51122$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51123
51124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51125$as_echo_n "checking for arch type flags... " >&6; }
51126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51127$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51128
51129    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51130    # autoconf target triplet.
51131     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51132    # Sanity check that it is a known ABI.
51133    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51134        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51135        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51136          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51137$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51138    fi
51139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51140$as_echo_n "checking for ABI property name... " >&6; }
51141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51142$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51143
51144
51145    # Pass these on to the open part of configure as if they were set using
51146    # --with-extra-c[xx]flags.
51147    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51148    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51149    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51150    # FIXME: This should not really be set using extra_cflags.
51151    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51152        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51153        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51154    fi
51155    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51156    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51157    # And pass the architecture flags to the linker as well
51158    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51159  fi
51160
51161  # When building with an abi profile, the name of that profile is appended on the
51162  # bundle platform, which is used in bundle names.
51163  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51164    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51165  fi
51166
51167
51168  # Optional POSIX functionality needed by the JVM
51169  #
51170  # Check if clock_gettime is available and in which library. This indicates
51171  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51172  # don't let it update LIBS.
51173  save_LIBS="$LIBS"
51174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51175$as_echo_n "checking for library containing clock_gettime... " >&6; }
51176if ${ac_cv_search_clock_gettime+:} false; then :
51177  $as_echo_n "(cached) " >&6
51178else
51179  ac_func_search_save_LIBS=$LIBS
51180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51181/* end confdefs.h.  */
51182
51183/* Override any GCC internal prototype to avoid an error.
51184   Use char because int might match the return type of a GCC
51185   builtin and then its argument prototype would still apply.  */
51186#ifdef __cplusplus
51187extern "C"
51188#endif
51189char clock_gettime ();
51190int
51191main ()
51192{
51193return clock_gettime ();
51194  ;
51195  return 0;
51196}
51197_ACEOF
51198for ac_lib in '' rt; do
51199  if test -z "$ac_lib"; then
51200    ac_res="none required"
51201  else
51202    ac_res=-l$ac_lib
51203    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51204  fi
51205  if ac_fn_cxx_try_link "$LINENO"; then :
51206  ac_cv_search_clock_gettime=$ac_res
51207fi
51208rm -f core conftest.err conftest.$ac_objext \
51209    conftest$ac_exeext
51210  if ${ac_cv_search_clock_gettime+:} false; then :
51211  break
51212fi
51213done
51214if ${ac_cv_search_clock_gettime+:} false; then :
51215
51216else
51217  ac_cv_search_clock_gettime=no
51218fi
51219rm conftest.$ac_ext
51220LIBS=$ac_func_search_save_LIBS
51221fi
51222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51223$as_echo "$ac_cv_search_clock_gettime" >&6; }
51224ac_res=$ac_cv_search_clock_gettime
51225if test "$ac_res" != no; then :
51226  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51227  HAS_CLOCK_GETTIME=true
51228fi
51229
51230  if test "x$LIBS" = "x-lrt "; then
51231    CLOCK_GETTIME_IN_LIBRT=true
51232  fi
51233  LIBS="$save_LIBS"
51234
51235
51236  # Special extras...
51237  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51238    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51239      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51240      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51241    fi
51242    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51243    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51244  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51245    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51246    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51247  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51248    CXXSTD_CXXFLAG="-std=gnu++98"
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291    # Execute function body
51292
51293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51294$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51295  supports=yes
51296
51297  saved_cxxflags="$CXXFLAGS"
51298  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51299  ac_ext=cpp
51300ac_cpp='$CXXCPP $CPPFLAGS'
51301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51304
51305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51306/* end confdefs.h.  */
51307int i;
51308_ACEOF
51309if ac_fn_cxx_try_compile "$LINENO"; then :
51310
51311else
51312  supports=no
51313fi
51314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51315  ac_ext=cpp
51316ac_cpp='$CXXCPP $CPPFLAGS'
51317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51320
51321  CXXFLAGS="$saved_cxxflags"
51322
51323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51324$as_echo "$supports" >&6; }
51325  if test "x$supports" = "xyes" ; then
51326    :
51327
51328  else
51329    :
51330    CXXSTD_CXXFLAG=""
51331  fi
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51345    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51346
51347  fi
51348  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51349    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51350    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51351  fi
51352
51353  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51354  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51355  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51356
51357  ###############################################################################
51358  #
51359  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51360  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51361  #
51362
51363  # Setup compiler/platform specific flags into
51364  #    CFLAGS_JDK    - C Compiler flags
51365  #    CXXFLAGS_JDK  - C++ Compiler flags
51366  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51367  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51368    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51369    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51370    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51371    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51372      # Force compatibility with i586 on 32 bit intel platforms.
51373      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51374      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51375    fi
51376    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51377        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51378    case $OPENJDK_TARGET_CPU_ARCH in
51379      arm )
51380        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51381        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51382        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51383        ;;
51384      ppc )
51385        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51386        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51387        ;;
51388      s390 )
51389        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51390        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51391        ;;
51392      * )
51393        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51394        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51395        ;;
51396    esac
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451    # Execute function body
51452
51453  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51454  REFERENCE_VERSION=6
51455
51456  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51457    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51458  fi
51459
51460  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51461    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51462  fi
51463
51464  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51465  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51466
51467  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51468    :
51469
51470  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51471  # runs afoul of the more aggressive versions of these optimisations.
51472  # Notably, value range propagation now assumes that the this pointer of C++
51473  # member functions is non-null.
51474  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51475        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51476        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51477$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51478  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51479  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51480
51481  else
51482    :
51483
51484  fi
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51500    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51501
51502    # Restrict the debug information created by Clang to avoid
51503    # too big object files and speed the build up a little bit
51504    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51505    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51506    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51507      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51508        # Force compatibility with i586 on 32 bit intel platforms.
51509        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51510        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51511      fi
51512      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51513      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51514          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51515      case $OPENJDK_TARGET_CPU_ARCH in
51516        ppc )
51517          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51518          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51519          ;;
51520        * )
51521          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51522          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51523          ;;
51524      esac
51525    fi
51526  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51527    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51528    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51529    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51530      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51531    fi
51532
51533    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51534    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51535  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51536    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51537    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51538    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51539  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51540    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51541        -MD -Zc:wchar_t- -W3 -wd4800 \
51542        -DWIN32_LEAN_AND_MEAN \
51543        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51544        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51545        -DWIN32 -DIAL"
51546    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51547      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51548    else
51549      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51550    fi
51551    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51552    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51553    # studio.
51554    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51555      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51556      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51557      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51558    fi
51559  fi
51560
51561  ###############################################################################
51562
51563  # Adjust flags according to debug level.
51564  case $DEBUG_LEVEL in
51565    fastdebug | slowdebug )
51566      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51567      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51568      ;;
51569    release )
51570      ;;
51571    * )
51572      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51573      ;;
51574  esac
51575
51576  # Set some common defines. These works for all compilers, but assume
51577  # -D is universally accepted.
51578
51579  # Setup endianness
51580  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51581    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51582    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51583    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51584    #   Note: -Dmacro         is the same as    #define macro 1
51585    #         -Dmacro=        is the same as    #define macro
51586    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51587      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51588    else
51589      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51590    fi
51591  else
51592    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51593    # are defined in the system?
51594    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51595      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51596    else
51597      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51598    fi
51599  fi
51600
51601  # Always enable optional macros for VM.
51602  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51603  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51604  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51605
51606  # Setup target OS define. Use OS target name but in upper case.
51607  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51608  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51609
51610  # Setup target CPU
51611  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51612      $OPENJDK_TARGET_ADD_LP64 \
51613      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51614
51615  # Setup debug/release defines
51616  if test "x$DEBUG_LEVEL" = xrelease; then
51617    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51618    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51619      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51620    fi
51621  else
51622    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51623  fi
51624
51625  # Optional POSIX functionality needed by the VM
51626
51627  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51628    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51629    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51630      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51631    fi
51632  fi
51633
51634
51635  # Set some additional per-OS defines.
51636  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51637    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51638    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51639        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51640  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51641    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51642    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51643        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51644  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51645    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51646    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51647    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51648    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51649        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51650        -fno-omit-frame-pointer"
51651  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51652    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51653    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51654        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51655        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51656    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51657    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51658    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51659    if test "x$DEBUG_LEVEL" = xslowdebug; then
51660      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51661    fi
51662  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51663    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51664  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51665    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51666    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51667  fi
51668
51669  # Set some additional per-CPU defines.
51670  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51671    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51672  elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51673    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51674  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51675    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51676      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51677      # fixes `relocation truncated to fit' error for gcc 4.1.
51678      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51679      # Use ppc64 instructions, but schedule for power5
51680      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51681    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51682      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51683    fi
51684  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51685    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51686      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51687      # Little endian machine uses ELFv2 ABI.
51688      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51689      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51690      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51691    fi
51692  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51693    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51694      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51695    fi
51696  fi
51697
51698  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51699    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51700  fi
51701
51702  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51703    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51704      # Solaris does not have _LP64=1 in the old build.
51705      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51706      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51707    fi
51708  fi
51709
51710  # Set JVM_CFLAGS warning handling
51711  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51712    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51713        -Wunused-value -Woverloaded-virtual"
51714
51715    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770    # Execute function body
51771
51772  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51773  REFERENCE_VERSION=4.8
51774
51775  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51776    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51777  fi
51778
51779  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51780    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51781  fi
51782
51783  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51784  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51785
51786  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51787    :
51788
51789            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51790            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51791
51792
51793  else
51794    :
51795
51796  fi
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811    fi
51812    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51813      # Non-zero builds have stricter warnings
51814      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51815    else
51816      if test "x$TOOLCHAIN_TYPE" = xclang; then
51817        # Some versions of llvm do not like -Wundef
51818        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51819      fi
51820    fi
51821  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51822    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51823        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51824  fi
51825
51826  # Additional macosx handling
51827  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51828    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51829    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51830    # JDK can be built and makes the linked binaries compatible even if built on
51831    # a newer version of the OS.
51832    MACOSX_VERSION_MIN=10.7.0
51833
51834
51835    # Setting --with-macosx-version-max=<version> makes it an error to build or
51836    # link to macosx APIs that are newer than the given OS version. The expected
51837    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51838
51839# Check whether --with-macosx-version-max was given.
51840if test "${with_macosx_version_max+set}" = set; then :
51841  withval=$with_macosx_version_max;
51842          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51843              MACOSX_VERSION_MAX=$with_macosx_version_max
51844          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51845              MACOSX_VERSION_MAX=$with_macosx_version_max
51846          elif test "x$with_macosx_version_max" = "xno"; then
51847              # Use build system default
51848              MACOSX_VERSION_MAX=
51849          else
51850              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51851          fi
51852
51853else
51854  MACOSX_VERSION_MAX=
51855
51856fi
51857
51858
51859
51860    # Let the flags variables get resolved in make for easier override on make
51861    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51862    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51863        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51864        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51865    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51866    JVM_CFLAGS="$JVM_CFLAGS \
51867        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51868        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51869
51870    if test -n "$MACOSX_VERSION_MAX"; then
51871        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51872            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51873        JVM_CFLAGS="$JVM_CFLAGS \
51874            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51875    fi
51876  fi
51877
51878  # Setup some hard coded includes
51879  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51880      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51881      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51882      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51883      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51884      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51885      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51886
51887  # The shared libraries are compiled using the picflag.
51888  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51889      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51890  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51891      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51892
51893  # Executable flags
51894  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51895  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51896
51897
51898
51899
51900
51901
51902  # Setup LDFLAGS et al.
51903  #
51904
51905  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51906    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51907    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51908    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51909    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51910      LDFLAGS_SAFESH="-safeseh"
51911      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51912      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51913      # NOTE: Old build added -machine. Probably not needed.
51914      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51915    else
51916      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51917    fi
51918  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51919      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51920      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51921        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51922        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51923    fi
51924  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51925    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51926    # We have previously set HAS_GNU_HASH if this is the case
51927    if test -n "$HAS_GNU_HASH"; then
51928      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51929      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51930      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51931    fi
51932      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51933        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51934    fi
51935    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51936      # And since we now know that the linker is gnu, then add -z defs, to forbid
51937      # undefined symbols in object files.
51938      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51939      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51940      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51941      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51942      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51943      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51944        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51945      fi
51946      case $DEBUG_LEVEL in
51947        release )
51948          # tell linker to optimize libraries.
51949          # Should this be supplied to the OSS linker as well?
51950          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51951          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51952          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51953          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51954            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51955          fi
51956          ;;
51957        slowdebug )
51958          # Hotspot always let the linker optimize
51959          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51960          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51961            # do relocations at load
51962            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51963            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51964            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51965          fi
51966          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51967            # mark relocations read only
51968            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51969            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51970            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51971          fi
51972          ;;
51973        fastdebug )
51974          # Hotspot always let the linker optimize
51975          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51976          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51977            # mark relocations read only
51978            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51979            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51980            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51981          fi
51982          ;;
51983        * )
51984          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51985          ;;
51986        esac
51987    fi
51988  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51989    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51990    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51991    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51992    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51993    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51994    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51995      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51996    fi
51997  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51998    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51999    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
52000    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
52001    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52002    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52003    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52004    if test "x$DEBUG_LEVEL" = xslowdebug; then
52005      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
52006    fi
52007  fi
52008
52009  # Customize LDFLAGS for executables
52010
52011  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52012
52013  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52014    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52015      LDFLAGS_STACK_SIZE=1048576
52016    else
52017      LDFLAGS_STACK_SIZE=327680
52018    fi
52019    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52020  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52021    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52022  fi
52023
52024  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52025
52026  # Customize LDFLAGS for libs
52027  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52028
52029  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52030  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52031    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52032        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52033    JDKLIB_LIBS=""
52034  else
52035    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52036        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52037
52038    if test "xTARGET" = "xTARGET"; then
52039      # On some platforms (mac) the linker warns about non existing -L dirs.
52040      # For any of the variants server, client or minimal, the dir matches the
52041      # variant name. The "main" variant should be used for linking. For the
52042      # rest, the dir is just server.
52043      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52044          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52045        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52046            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52047      else
52048        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52049            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52050      fi
52051    elif test "xTARGET" = "xBUILD"; then
52052      # When building a buildjdk, it's always only the server variant
52053      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52054          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52055    fi
52056
52057    JDKLIB_LIBS="-ljava -ljvm"
52058    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52059      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52060    fi
52061
52062  fi
52063
52064LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52065
52066  # Set JVM_LIBS (per os)
52067  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52068    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52069  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52070    # FIXME: This hard-coded path is not really proper.
52071    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52072      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52073    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52074      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52075    fi
52076    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52077        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52078  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52079    JVM_LIBS="$JVM_LIBS -lm"
52080  elif test "x$OPENJDK_TARGET_OS" = xaix; then
52081    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52082  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52083    JVM_LIBS="$JVM_LIBS -lm"
52084  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52085    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52086        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52087        wsock32.lib winmm.lib version.lib psapi.lib"
52088    fi
52089
52090  # Set JVM_ASFLAGS
52091  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52092    if test "x$OPENJDK_TARGET_CPU" = xx86; then
52093      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52094    fi
52095  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52096    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52097  fi
52098
52099  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115  # Special extras...
52116  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52117    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52118      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52119      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52120    fi
52121    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52122    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52124    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52125    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52126  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52127    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170    # Execute function body
52171
52172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52173$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52174  supports=yes
52175
52176  saved_cxxflags="$CXXFLAGS"
52177  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52178  ac_ext=cpp
52179ac_cpp='$CXXCPP $CPPFLAGS'
52180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52183
52184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52185/* end confdefs.h.  */
52186int i;
52187_ACEOF
52188if ac_fn_cxx_try_compile "$LINENO"; then :
52189
52190else
52191  supports=no
52192fi
52193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52194  ac_ext=cpp
52195ac_cpp='$CXXCPP $CPPFLAGS'
52196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52199
52200  CXXFLAGS="$saved_cxxflags"
52201
52202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52203$as_echo "$supports" >&6; }
52204  if test "x$supports" = "xyes" ; then
52205    :
52206
52207  else
52208    :
52209    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52210  fi
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52224    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52225
52226  fi
52227  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52228    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52229    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52230  fi
52231
52232  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52233  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52234  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52235
52236  ###############################################################################
52237  #
52238  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52239  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52240  #
52241
52242  # Setup compiler/platform specific flags into
52243  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52244  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52245  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52246  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52247    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52248    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52249    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52250    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52251      # Force compatibility with i586 on 32 bit intel platforms.
52252      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52253      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52254    fi
52255    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52256        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52257    case $OPENJDK_BUILD_CPU_ARCH in
52258      arm )
52259        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52260        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52261        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52262        ;;
52263      ppc )
52264        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52265        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52266        ;;
52267      s390 )
52268        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52269        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52270        ;;
52271      * )
52272        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52273        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52274        ;;
52275    esac
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330    # Execute function body
52331
52332  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52333  REFERENCE_VERSION=6
52334
52335  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52336    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52337  fi
52338
52339  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52340    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52341  fi
52342
52343  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52344  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52345
52346  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52347    :
52348
52349  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52350  # runs afoul of the more aggressive versions of these optimisations.
52351  # Notably, value range propagation now assumes that the this pointer of C++
52352  # member functions is non-null.
52353  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52354        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52355        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52356$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52357  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52358  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52359
52360  else
52361    :
52362
52363  fi
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52379    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52380
52381    # Restrict the debug information created by Clang to avoid
52382    # too big object files and speed the build up a little bit
52383    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52384    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52385    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52386      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52387        # Force compatibility with i586 on 32 bit intel platforms.
52388        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52389        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52390      fi
52391      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52392      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52393          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52394      case $OPENJDK_BUILD_CPU_ARCH in
52395        ppc )
52396          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52397          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52398          ;;
52399        * )
52400          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52401          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52402          ;;
52403      esac
52404    fi
52405  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52406    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52407    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52408    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52409      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52410    fi
52411
52412    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52413    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52414  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52415    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52416    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52417    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52418  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52419    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52420        -MD -Zc:wchar_t- -W3 -wd4800 \
52421        -DWIN32_LEAN_AND_MEAN \
52422        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52423        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52424        -DWIN32 -DIAL"
52425    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52426      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52427    else
52428      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52429    fi
52430    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52431    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52432    # studio.
52433    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52434      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52435      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52436      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52437    fi
52438  fi
52439
52440  ###############################################################################
52441
52442  # Adjust flags according to debug level.
52443  case $DEBUG_LEVEL in
52444    fastdebug | slowdebug )
52445      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52446      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52447      ;;
52448    release )
52449      ;;
52450    * )
52451      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52452      ;;
52453  esac
52454
52455  # Set some common defines. These works for all compilers, but assume
52456  # -D is universally accepted.
52457
52458  # Setup endianness
52459  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52460    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52461    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52462    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52463    #   Note: -Dmacro         is the same as    #define macro 1
52464    #         -Dmacro=        is the same as    #define macro
52465    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52466      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52467    else
52468      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52469    fi
52470  else
52471    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52472    # are defined in the system?
52473    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52474      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52475    else
52476      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52477    fi
52478  fi
52479
52480  # Always enable optional macros for VM.
52481  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52482  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52483  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52484
52485  # Setup target OS define. Use OS target name but in upper case.
52486  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52487  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52488
52489  # Setup target CPU
52490  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52491      $OPENJDK_BUILD_ADD_LP64 \
52492      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52493
52494  # Setup debug/release defines
52495  if test "x$DEBUG_LEVEL" = xrelease; then
52496    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52497    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52498      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52499    fi
52500  else
52501    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52502  fi
52503
52504  # Optional POSIX functionality needed by the VM
52505
52506  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52507    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52508    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52509      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52510    fi
52511  fi
52512
52513
52514  # Set some additional per-OS defines.
52515  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52516    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52517    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52518        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52519  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52520    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52521    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52522        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52523  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52524    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52525    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52526    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52527    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52528        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52529        -fno-omit-frame-pointer"
52530  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52531    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52532    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52533        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52534        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52535    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52536    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52537    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52538    if test "x$DEBUG_LEVEL" = xslowdebug; then
52539      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52540    fi
52541  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52542    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52543  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52544    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52545    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52546  fi
52547
52548  # Set some additional per-CPU defines.
52549  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52550    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52551  elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52552    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52553  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52554    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52555      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52556      # fixes `relocation truncated to fit' error for gcc 4.1.
52557      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52558      # Use ppc64 instructions, but schedule for power5
52559      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52560    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52561      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52562    fi
52563  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52564    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52565      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52566      # Little endian machine uses ELFv2 ABI.
52567      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52568      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52569      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52570    fi
52571  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52572    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52573      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52574    fi
52575  fi
52576
52577  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52578    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52579  fi
52580
52581  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52582    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52583      # Solaris does not have _LP64=1 in the old build.
52584      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52585      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52586    fi
52587  fi
52588
52589  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52590  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52591    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52592        -Wunused-value -Woverloaded-virtual"
52593
52594    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649    # Execute function body
52650
52651  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52652  REFERENCE_VERSION=4.8
52653
52654  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52655    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52656  fi
52657
52658  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52659    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52660  fi
52661
52662  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52663  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52664
52665  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52666    :
52667
52668            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52669            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52670
52671
52672  else
52673    :
52674
52675  fi
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690    fi
52691    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52692      # Non-zero builds have stricter warnings
52693      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52694    else
52695      if test "x$TOOLCHAIN_TYPE" = xclang; then
52696        # Some versions of llvm do not like -Wundef
52697        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52698      fi
52699    fi
52700  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52701    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52702        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52703  fi
52704
52705  # Additional macosx handling
52706  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52707    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52708    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52709    # JDK can be built and makes the linked binaries compatible even if built on
52710    # a newer version of the OS.
52711    MACOSX_VERSION_MIN=10.7.0
52712
52713
52714    # Setting --with-macosx-version-max=<version> makes it an error to build or
52715    # link to macosx APIs that are newer than the given OS version. The expected
52716    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52717
52718# Check whether --with-macosx-version-max was given.
52719if test "${with_macosx_version_max+set}" = set; then :
52720  withval=$with_macosx_version_max;
52721          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52722              MACOSX_VERSION_MAX=$with_macosx_version_max
52723          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52724              MACOSX_VERSION_MAX=$with_macosx_version_max
52725          elif test "x$with_macosx_version_max" = "xno"; then
52726              # Use build system default
52727              MACOSX_VERSION_MAX=
52728          else
52729              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52730          fi
52731
52732else
52733  MACOSX_VERSION_MAX=
52734
52735fi
52736
52737
52738
52739    # Let the flags variables get resolved in make for easier override on make
52740    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52741    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52742        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52743        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52744    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52745    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52746        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52747        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52748
52749    if test -n "$MACOSX_VERSION_MAX"; then
52750        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52751            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52752        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52753            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52754    fi
52755  fi
52756
52757  # Setup some hard coded includes
52758  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52759      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52760      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52761      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52762      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52763      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52764      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52765
52766  # The shared libraries are compiled using the picflag.
52767  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52768      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52769  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52770      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52771
52772  # Executable flags
52773  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52774  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52775
52776
52777
52778
52779
52780
52781  # Setup LDFLAGS et al.
52782  #
52783
52784  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52785    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52786    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52787    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52788    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52789      LDFLAGS_SAFESH="-safeseh"
52790      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52791      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52792      # NOTE: Old build added -machine. Probably not needed.
52793      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52794    else
52795      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52796    fi
52797  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52798      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52799      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52800        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52801        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52802    fi
52803  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52804    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52805    # We have previously set HAS_GNU_HASH if this is the case
52806    if test -n "$HAS_GNU_HASH"; then
52807      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52808      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52809      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52810    fi
52811      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52812        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52813    fi
52814    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52815      # And since we now know that the linker is gnu, then add -z defs, to forbid
52816      # undefined symbols in object files.
52817      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52818      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52819      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52820      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52821      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52822      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52823        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52824      fi
52825      case $DEBUG_LEVEL in
52826        release )
52827          # tell linker to optimize libraries.
52828          # Should this be supplied to the OSS linker as well?
52829          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52830          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52831          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52832          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52833            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52834          fi
52835          ;;
52836        slowdebug )
52837          # Hotspot always let the linker optimize
52838          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52839          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52840            # do relocations at load
52841            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52842            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52843            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52844          fi
52845          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52846            # mark relocations read only
52847            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52848            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52849            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52850          fi
52851          ;;
52852        fastdebug )
52853          # Hotspot always let the linker optimize
52854          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52855          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52856            # mark relocations read only
52857            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52858            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52859            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52860          fi
52861          ;;
52862        * )
52863          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52864          ;;
52865        esac
52866    fi
52867  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52868    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52869    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52870    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52871    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52872    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52873    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52874      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52875    fi
52876  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52877    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52878    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52879    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52880    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52881    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52882    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52883    if test "x$DEBUG_LEVEL" = xslowdebug; then
52884      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52885    fi
52886  fi
52887
52888  # Customize LDFLAGS for executables
52889
52890  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52891
52892  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52893    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52894      LDFLAGS_STACK_SIZE=1048576
52895    else
52896      LDFLAGS_STACK_SIZE=327680
52897    fi
52898    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52899  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52900    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52901  fi
52902
52903  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52904
52905  # Customize LDFLAGS for libs
52906  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52907
52908  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52909  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52910    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52911        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52912    OPENJDK_BUILD_JDKLIB_LIBS=""
52913  else
52914    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52915        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52916
52917    if test "xBUILD" = "xTARGET"; then
52918      # On some platforms (mac) the linker warns about non existing -L dirs.
52919      # For any of the variants server, client or minimal, the dir matches the
52920      # variant name. The "main" variant should be used for linking. For the
52921      # rest, the dir is just server.
52922      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52923          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52924        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52925            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52926      else
52927        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52928            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52929      fi
52930    elif test "xBUILD" = "xBUILD"; then
52931      # When building a buildjdk, it's always only the server variant
52932      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52933          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52934    fi
52935
52936    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52937    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52938      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52939    fi
52940
52941  fi
52942
52943OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52944
52945  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52946  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52947    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52948  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52949    # FIXME: This hard-coded path is not really proper.
52950    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52951      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52952    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52953      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52954    fi
52955    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52956        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52957  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52958    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52959  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52960    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52961  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52962    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52963  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52964    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52965        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52966        wsock32.lib winmm.lib version.lib psapi.lib"
52967    fi
52968
52969  # Set OPENJDK_BUILD_JVM_ASFLAGS
52970  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52971    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52972      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52973    fi
52974  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52975    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52976  fi
52977
52978  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994  # Tests are only ever compiled for TARGET
52995  # Flags for compiling test libraries
52996  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52997  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52998
52999  # Flags for compiling test executables
53000  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
53001  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
53002
53003
53004
53005
53006
53007
53008  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
53009  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53010
53011
53012
53013
53014
53015
53016  # Check that the compiler supports -mX (or -qX on AIX) flags
53017  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065    # Execute function body
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
53109
53110
53111
53112
53113
53114    # Execute function body
53115
53116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53117$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53118  supports=yes
53119
53120  saved_cflags="$CFLAGS"
53121  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53122  ac_ext=c
53123ac_cpp='$CPP $CPPFLAGS'
53124ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53125ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53126ac_compiler_gnu=$ac_cv_c_compiler_gnu
53127
53128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53129/* end confdefs.h.  */
53130int i;
53131_ACEOF
53132if ac_fn_c_try_compile "$LINENO"; then :
53133
53134else
53135  supports=no
53136fi
53137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53138  ac_ext=cpp
53139ac_cpp='$CXXCPP $CPPFLAGS'
53140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53143
53144  CFLAGS="$saved_cflags"
53145
53146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53147$as_echo "$supports" >&6; }
53148  if test "x$supports" = "xyes" ; then
53149    :
53150    C_COMP_SUPPORTS="yes"
53151  else
53152    :
53153    C_COMP_SUPPORTS="no"
53154  fi
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214    # Execute function body
53215
53216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53217$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53218  supports=yes
53219
53220  saved_cxxflags="$CXXFLAGS"
53221  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53222  ac_ext=cpp
53223ac_cpp='$CXXCPP $CPPFLAGS'
53224ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53225ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53226ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53227
53228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53229/* end confdefs.h.  */
53230int i;
53231_ACEOF
53232if ac_fn_cxx_try_compile "$LINENO"; then :
53233
53234else
53235  supports=no
53236fi
53237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53238  ac_ext=cpp
53239ac_cpp='$CXXCPP $CPPFLAGS'
53240ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53241ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53242ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53243
53244  CXXFLAGS="$saved_cxxflags"
53245
53246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53247$as_echo "$supports" >&6; }
53248  if test "x$supports" = "xyes" ; then
53249    :
53250    CXX_COMP_SUPPORTS="yes"
53251  else
53252    :
53253    CXX_COMP_SUPPORTS="no"
53254  fi
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53269$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53270  supports=no
53271  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53272
53273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53274$as_echo "$supports" >&6; }
53275  if test "x$supports" = "xyes" ; then
53276    :
53277    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53278  else
53279    :
53280    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53281  fi
53282
53283
53284
53285
53286
53287
53288
53289
53290  # Check whether --enable-warnings-as-errors was given.
53291if test "${enable_warnings_as_errors+set}" = set; then :
53292  enableval=$enable_warnings_as_errors;
53293fi
53294
53295
53296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53297$as_echo_n "checking if native warnings are errors... " >&6; }
53298  if test "x$enable_warnings_as_errors" = "xyes"; then
53299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53300$as_echo "yes (explicitly set)" >&6; }
53301    WARNINGS_AS_ERRORS=true
53302  elif test "x$enable_warnings_as_errors" = "xno"; then
53303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53304$as_echo "no" >&6; }
53305    WARNINGS_AS_ERRORS=false
53306  elif test "x$enable_warnings_as_errors" = "x"; then
53307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53308$as_echo "yes (default)" >&6; }
53309    WARNINGS_AS_ERRORS=true
53310  else
53311    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53312  fi
53313
53314
53315
53316  case "${TOOLCHAIN_TYPE}" in
53317    microsoft)
53318      DISABLE_WARNING_PREFIX="-wd"
53319      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53320      ;;
53321    solstudio)
53322      DISABLE_WARNING_PREFIX="-erroff="
53323      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53324      ;;
53325    gcc)
53326      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53327
53328
53329
53330
53331
53332
53333
53334
53335
53336
53337
53338
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374    # Execute function body
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
53418
53419
53420
53421
53422
53423    # Execute function body
53424
53425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53426$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53427  supports=yes
53428
53429  saved_cflags="$CFLAGS"
53430  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53431  ac_ext=c
53432ac_cpp='$CPP $CPPFLAGS'
53433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53435ac_compiler_gnu=$ac_cv_c_compiler_gnu
53436
53437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53438/* end confdefs.h.  */
53439int i;
53440_ACEOF
53441if ac_fn_c_try_compile "$LINENO"; then :
53442
53443else
53444  supports=no
53445fi
53446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53447  ac_ext=cpp
53448ac_cpp='$CXXCPP $CPPFLAGS'
53449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53452
53453  CFLAGS="$saved_cflags"
53454
53455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53456$as_echo "$supports" >&6; }
53457  if test "x$supports" = "xyes" ; then
53458    :
53459    C_COMP_SUPPORTS="yes"
53460  else
53461    :
53462    C_COMP_SUPPORTS="no"
53463  fi
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523    # Execute function body
53524
53525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53526$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53527  supports=yes
53528
53529  saved_cxxflags="$CXXFLAGS"
53530  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53531  ac_ext=cpp
53532ac_cpp='$CXXCPP $CPPFLAGS'
53533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53536
53537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53538/* end confdefs.h.  */
53539int i;
53540_ACEOF
53541if ac_fn_cxx_try_compile "$LINENO"; then :
53542
53543else
53544  supports=no
53545fi
53546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53547  ac_ext=cpp
53548ac_cpp='$CXXCPP $CPPFLAGS'
53549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53552
53553  CXXFLAGS="$saved_cxxflags"
53554
53555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53556$as_echo "$supports" >&6; }
53557  if test "x$supports" = "xyes" ; then
53558    :
53559    CXX_COMP_SUPPORTS="yes"
53560  else
53561    :
53562    CXX_COMP_SUPPORTS="no"
53563  fi
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53578$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53579  supports=no
53580  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53581
53582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53583$as_echo "$supports" >&6; }
53584  if test "x$supports" = "xyes" ; then
53585    :
53586    GCC_CAN_DISABLE_WARNINGS=true
53587  else
53588    :
53589    GCC_CAN_DISABLE_WARNINGS=false
53590
53591  fi
53592
53593
53594
53595
53596
53597
53598      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53599        DISABLE_WARNING_PREFIX="-Wno-"
53600      else
53601        DISABLE_WARNING_PREFIX=
53602      fi
53603      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53604      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53605      # CFLAGS since any target specific flags will likely not work with the
53606      # build compiler
53607      CC_OLD="$CC"
53608      CXX_OLD="$CXX"
53609      CC="$BUILD_CC"
53610      CXX="$BUILD_CXX"
53611      CFLAGS_OLD="$CFLAGS"
53612      CFLAGS=""
53613
53614
53615
53616
53617
53618
53619
53620
53621
53622
53623
53624
53625
53626
53627
53628
53629
53630
53631
53632
53633
53634
53635
53636
53637
53638
53639
53640
53641
53642
53643
53644
53645
53646
53647
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660    # Execute function body
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
53704
53705
53706
53707
53708
53709    # Execute function body
53710
53711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53712$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53713  supports=yes
53714
53715  saved_cflags="$CFLAGS"
53716  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53717  ac_ext=c
53718ac_cpp='$CPP $CPPFLAGS'
53719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53721ac_compiler_gnu=$ac_cv_c_compiler_gnu
53722
53723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53724/* end confdefs.h.  */
53725int i;
53726_ACEOF
53727if ac_fn_c_try_compile "$LINENO"; then :
53728
53729else
53730  supports=no
53731fi
53732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53733  ac_ext=cpp
53734ac_cpp='$CXXCPP $CPPFLAGS'
53735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53738
53739  CFLAGS="$saved_cflags"
53740
53741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53742$as_echo "$supports" >&6; }
53743  if test "x$supports" = "xyes" ; then
53744    :
53745    C_COMP_SUPPORTS="yes"
53746  else
53747    :
53748    C_COMP_SUPPORTS="no"
53749  fi
53750
53751
53752
53753
53754
53755
53756
53757
53758
53759
53760
53761
53762
53763
53764
53765
53766
53767
53768
53769
53770
53771
53772
53773
53774
53775
53776
53777
53778
53779
53780
53781
53782
53783
53784
53785
53786
53787
53788
53789
53790
53791
53792
53793
53794
53795
53796
53797
53798
53799
53800
53801
53802
53803
53804
53805
53806
53807
53808
53809    # Execute function body
53810
53811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53812$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53813  supports=yes
53814
53815  saved_cxxflags="$CXXFLAGS"
53816  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53817  ac_ext=cpp
53818ac_cpp='$CXXCPP $CPPFLAGS'
53819ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53820ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53821ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53822
53823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53824/* end confdefs.h.  */
53825int i;
53826_ACEOF
53827if ac_fn_cxx_try_compile "$LINENO"; then :
53828
53829else
53830  supports=no
53831fi
53832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53833  ac_ext=cpp
53834ac_cpp='$CXXCPP $CPPFLAGS'
53835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53838
53839  CXXFLAGS="$saved_cxxflags"
53840
53841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53842$as_echo "$supports" >&6; }
53843  if test "x$supports" = "xyes" ; then
53844    :
53845    CXX_COMP_SUPPORTS="yes"
53846  else
53847    :
53848    CXX_COMP_SUPPORTS="no"
53849  fi
53850
53851
53852
53853
53854
53855
53856
53857
53858
53859
53860
53861
53862
53863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53864$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53865  supports=no
53866  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53867
53868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53869$as_echo "$supports" >&6; }
53870  if test "x$supports" = "xyes" ; then
53871    :
53872    BUILD_CC_CAN_DISABLE_WARNINGS=true
53873  else
53874    :
53875    BUILD_CC_CAN_DISABLE_WARNINGS=false
53876
53877  fi
53878
53879
53880
53881
53882
53883
53884      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53885        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53886      else
53887        BUILD_CC_DISABLE_WARNING_PREFIX=
53888      fi
53889      CC="$CC_OLD"
53890      CXX="$CXX_OLD"
53891      CFLAGS="$CFLAGS_OLD"
53892      ;;
53893    clang)
53894      DISABLE_WARNING_PREFIX="-Wno-"
53895      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53896      ;;
53897    xlc)
53898      DISABLE_WARNING_PREFIX="-qsuppress="
53899      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53900      ;;
53901  esac
53902
53903
53904
53905
53906
53907# Setup debug symbols (need objcopy from the toolchain for that)
53908
53909  #
53910  # NATIVE_DEBUG_SYMBOLS
53911  # This must be done after the toolchain is setup, since we're looking at objcopy.
53912  #
53913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53914$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53915
53916# Check whether --with-native-debug-symbols was given.
53917if test "${with_native_debug_symbols+set}" = set; then :
53918  withval=$with_native_debug_symbols;
53919        if test "x$OPENJDK_TARGET_OS" = xaix; then
53920          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53921            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53922          fi
53923        fi
53924
53925else
53926
53927        if test "x$OPENJDK_TARGET_OS" = xaix; then
53928          # AIX doesn't support 'zipped' so use 'internal' as default
53929          with_native_debug_symbols="internal"
53930        else
53931          if test "x$STATIC_BUILD" = xtrue; then
53932            with_native_debug_symbols="none"
53933          else
53934            with_native_debug_symbols="zipped"
53935          fi
53936        fi
53937
53938fi
53939
53940  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53942$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53943
53944  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53945
53946    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53947      if test "x$OBJCOPY" = x; then
53948        # enabling of enable-debug-symbols and can't find objcopy
53949        # this is an error
53950        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53951      fi
53952    fi
53953
53954    COMPILE_WITH_DEBUG_SYMBOLS=true
53955    COPY_DEBUG_SYMBOLS=true
53956    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53957  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53958    COMPILE_WITH_DEBUG_SYMBOLS=false
53959    COPY_DEBUG_SYMBOLS=false
53960    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53961  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53962    COMPILE_WITH_DEBUG_SYMBOLS=true
53963    COPY_DEBUG_SYMBOLS=false
53964    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53965  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53966
53967    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53968      if test "x$OBJCOPY" = x; then
53969        # enabling of enable-debug-symbols and can't find objcopy
53970        # this is an error
53971        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53972      fi
53973    fi
53974
53975    COMPILE_WITH_DEBUG_SYMBOLS=true
53976    COPY_DEBUG_SYMBOLS=true
53977    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53978  else
53979    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53980  fi
53981
53982  # --enable-debug-symbols is deprecated.
53983  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53984
53985  # Check whether --enable-debug-symbols was given.
53986if test "${enable_debug_symbols+set}" = set; then :
53987  enableval=$enable_debug_symbols;
53988fi
53989
53990  if test "x$enable_debug_symbols" != x; then
53991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53992$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53993
53994    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53995      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53996$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53997    fi
53998
53999  fi
54000
54001
54002  # --enable-zip-debug-info is deprecated.
54003  # Please use --with-native-debug-symbols=zipped .
54004
54005  # Check whether --enable-zip-debug-info was given.
54006if test "${enable_zip_debug_info+set}" = set; then :
54007  enableval=$enable_zip_debug_info;
54008fi
54009
54010  if test "x$enable_zip_debug_info" != x; then
54011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54012$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54013
54014    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54015      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54016$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54017    fi
54018
54019  fi
54020
54021
54022
54023
54024
54025
54026
54027  # Check whether --enable-native-coverage was given.
54028if test "${enable_native_coverage+set}" = set; then :
54029  enableval=$enable_native_coverage;
54030fi
54031
54032  GCOV_ENABLED="false"
54033  if test "x$enable_native_coverage" = "xyes"; then
54034    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54036$as_echo_n "checking if native coverage is enabled... " >&6; }
54037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54038$as_echo "yes" >&6; }
54039      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54040      GCOV_LDFLAGS="-fprofile-arcs"
54041      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54042      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54043      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54044      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54045      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54046      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54047      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54048      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54049      GCOV_ENABLED="true"
54050    else
54051      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54052    fi
54053  elif test "x$enable_native_coverage" = "xno"; then
54054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54055$as_echo_n "checking if native coverage is enabled... " >&6; }
54056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54057$as_echo "no" >&6; }
54058  elif test "x$enable_native_coverage" != "x"; then
54059    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54060  fi
54061
54062
54063
54064
54065# Need toolchain to setup dtrace
54066
54067  # Test for dtrace dependencies
54068  # Check whether --enable-dtrace was given.
54069if test "${enable_dtrace+set}" = set; then :
54070  enableval=$enable_dtrace;
54071fi
54072
54073
54074  DTRACE_DEP_MISSING=false
54075
54076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54077$as_echo_n "checking for dtrace tool... " >&6; }
54078  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54080$as_echo "$DTRACE" >&6; }
54081  else
54082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54083$as_echo "not found, cannot build dtrace" >&6; }
54084    DTRACE_DEP_MISSING=true
54085  fi
54086
54087  for ac_header in sys/sdt.h
54088do :
54089  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54090if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54091  cat >>confdefs.h <<_ACEOF
54092#define HAVE_SYS_SDT_H 1
54093_ACEOF
54094 DTRACE_HEADERS_OK=yes
54095else
54096  DTRACE_HEADERS_OK=no
54097fi
54098
54099done
54100
54101  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54102    DTRACE_DEP_MISSING=true
54103  fi
54104
54105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54106$as_echo_n "checking if dtrace should be built... " >&6; }
54107  if test "x$enable_dtrace" = "xyes"; then
54108    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54110$as_echo "no, missing dependencies" >&6; }
54111
54112  # Print a helpful message on how to acquire the necessary build dependency.
54113  # dtrace is the help tag: freetype, cups, alsa etc
54114  MISSING_DEPENDENCY=dtrace
54115
54116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54117    cygwin_help $MISSING_DEPENDENCY
54118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54119    msys_help $MISSING_DEPENDENCY
54120  else
54121    PKGHANDLER_COMMAND=
54122
54123    case $PKGHANDLER in
54124      apt-get)
54125        apt_help     $MISSING_DEPENDENCY ;;
54126      yum)
54127        yum_help     $MISSING_DEPENDENCY ;;
54128      brew)
54129        brew_help    $MISSING_DEPENDENCY ;;
54130      port)
54131        port_help    $MISSING_DEPENDENCY ;;
54132      pkgutil)
54133        pkgutil_help $MISSING_DEPENDENCY ;;
54134      pkgadd)
54135        pkgadd_help  $MISSING_DEPENDENCY ;;
54136    esac
54137
54138    if test "x$PKGHANDLER_COMMAND" != x; then
54139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54140    fi
54141  fi
54142
54143      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54144    else
54145      INCLUDE_DTRACE=true
54146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54147$as_echo "yes, forced" >&6; }
54148    fi
54149  elif test "x$enable_dtrace" = "xno"; then
54150    INCLUDE_DTRACE=false
54151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54152$as_echo "no, forced" >&6; }
54153  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54154    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54155      INCLUDE_DTRACE=false
54156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54157$as_echo "no, missing dependencies" >&6; }
54158    else
54159      INCLUDE_DTRACE=true
54160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54161$as_echo "yes, dependencies present" >&6; }
54162    fi
54163  else
54164    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54165  fi
54166
54167
54168  # Check whether --enable-aot was given.
54169if test "${enable_aot+set}" = set; then :
54170  enableval=$enable_aot;
54171fi
54172
54173
54174  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54175    ENABLE_AOT="true"
54176  elif test "x$enable_aot" = "xyes"; then
54177    ENABLE_AOT="true"
54178  elif test "x$enable_aot" = "xno"; then
54179    ENABLE_AOT="false"
54180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54181$as_echo_n "checking if aot should be enabled... " >&6; }
54182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54183$as_echo "no, forced" >&6; }
54184  else
54185    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54186  fi
54187
54188  if test "x$ENABLE_AOT" = "xtrue"; then
54189    # Only enable AOT on X64 platforms.
54190    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54191      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
54192        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
54193          ENABLE_AOT="true"
54194        else
54195          ENABLE_AOT="false"
54196          if test "x$enable_aot" = "xyes"; then
54197            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54198          fi
54199        fi
54200      else
54201        ENABLE_AOT="false"
54202        if test "x$enable_aot" = "xyes"; then
54203          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54204        fi
54205      fi
54206    else
54207      ENABLE_AOT="false"
54208      if test "x$enable_aot" = "xyes"; then
54209        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54210      fi
54211    fi
54212  fi
54213
54214
54215
54216
54217  # Check whether --enable-cds was given.
54218if test "${enable_cds+set}" = set; then :
54219  enableval=$enable_cds;
54220fi
54221
54222
54223  if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
54224    ENABLE_CDS="true"
54225  elif test "x$enable_cds" = "xno"; then
54226    ENABLE_CDS="false"
54227  else
54228    as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
54229  fi
54230
54231
54232
54233
54234  # Check whether --enable-hotspot-gtest was given.
54235if test "${enable_hotspot_gtest+set}" = set; then :
54236  enableval=$enable_hotspot_gtest;
54237fi
54238
54239
54240  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54241    GTEST_DIR_EXISTS="true"
54242  else
54243    GTEST_DIR_EXISTS="false"
54244  fi
54245
54246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54247$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54248  if test "x$enable_hotspot_gtest" = "xyes"; then
54249    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54251$as_echo "yes, forced" >&6; }
54252      BUILD_GTEST="true"
54253    else
54254      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54255    fi
54256  elif test "x$enable_hotspot_gtest" = "xno"; then
54257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54258$as_echo "no, forced" >&6; }
54259    BUILD_GTEST="false"
54260  elif test "x$enable_hotspot_gtest" = "x"; then
54261    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54263$as_echo "yes" >&6; }
54264      BUILD_GTEST="true"
54265    else
54266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54267$as_echo "no" >&6; }
54268      BUILD_GTEST="false"
54269    fi
54270  else
54271    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54272  fi
54273
54274
54275
54276
54277###############################################################################
54278#
54279# Check dependencies for external and internal libraries.
54280#
54281###############################################################################
54282
54283# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54284
54285  # When using cygwin or msys, we need a wrapper binary that renames
54286  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54287  # @files and rewrites these too! This wrapper binary is
54288  # called fixpath.
54289  FIXPATH=
54290  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54292$as_echo_n "checking if fixpath can be created... " >&6; }
54293    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54294    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54295    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54296    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54297      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54298      FIXPATH="$FIXPATH_BIN -c"
54299    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54300      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54301      # @ was chosen as separator to minimize risk of other tools messing around with it
54302      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54303          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54304      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54305      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54306    fi
54307    FIXPATH_SRC_W="$FIXPATH_SRC"
54308    FIXPATH_BIN_W="$FIXPATH_BIN"
54309
54310  unix_path="$FIXPATH_SRC_W"
54311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54312    windows_path=`$CYGPATH -m "$unix_path"`
54313    FIXPATH_SRC_W="$windows_path"
54314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54315    windows_path=`cmd //c echo $unix_path`
54316    FIXPATH_SRC_W="$windows_path"
54317  fi
54318
54319
54320  unix_path="$FIXPATH_BIN_W"
54321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54322    windows_path=`$CYGPATH -m "$unix_path"`
54323    FIXPATH_BIN_W="$windows_path"
54324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54325    windows_path=`cmd //c echo $unix_path`
54326    FIXPATH_BIN_W="$windows_path"
54327  fi
54328
54329    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54330    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54331    cd $FIXPATH_DIR
54332    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54333    cd $CURDIR
54334
54335    if test ! -x $FIXPATH_BIN; then
54336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54337$as_echo "no" >&6; }
54338      cat $FIXPATH_DIR/fixpath1.log
54339      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54340    fi
54341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54342$as_echo "yes" >&6; }
54343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54344$as_echo_n "checking if fixpath.exe works... " >&6; }
54345    cd $FIXPATH_DIR
54346    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54347        > $FIXPATH_DIR/fixpath2.log 2>&1
54348    cd $CURDIR
54349    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54351$as_echo "no" >&6; }
54352      cat $FIXPATH_DIR/fixpath2.log
54353      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54354    fi
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54356$as_echo "yes" >&6; }
54357
54358    FIXPATH_DETACH_FLAG="--detach"
54359  fi
54360
54361
54362
54363
54364
54365
54366  # Check if X11 is needed
54367  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54368    # No X11 support on windows or macosx
54369    NEEDS_LIB_X11=false
54370  else
54371    # All other instances need X11, even if building headless only, libawt still
54372    # needs X11 headers.
54373    NEEDS_LIB_X11=true
54374  fi
54375
54376  # Check if cups is needed
54377  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54378    # Windows have a separate print system
54379    NEEDS_LIB_CUPS=false
54380  else
54381    NEEDS_LIB_CUPS=true
54382  fi
54383
54384  # A custom hook may have set this already
54385  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54386    NEEDS_LIB_FREETYPE=true
54387  fi
54388
54389  # Check if alsa is needed
54390  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54391    NEEDS_LIB_ALSA=true
54392  else
54393    NEEDS_LIB_ALSA=false
54394  fi
54395
54396  # Check if ffi is needed
54397  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54398    NEEDS_LIB_FFI=true
54399  else
54400    NEEDS_LIB_FFI=false
54401  fi
54402
54403
54404  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54405  # dynamic build is configured on command line.
54406
54407# Check whether --with-stdc++lib was given.
54408if test "${with_stdc__lib+set}" = set; then :
54409  withval=$with_stdc__lib;
54410        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54411                && test "x$with_stdc__lib" != xdefault; then
54412          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54413        fi
54414
54415else
54416  with_stdc__lib=default
54417
54418fi
54419
54420
54421  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54422    # Test if stdc++ can be linked statically.
54423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54424$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54425    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54426    ac_ext=cpp
54427ac_cpp='$CXXCPP $CPPFLAGS'
54428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54431
54432    OLD_LIBS="$LIBS"
54433    LIBS="$STATIC_STDCXX_FLAGS"
54434    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54435/* end confdefs.h.  */
54436
54437int
54438main ()
54439{
54440return 0;
54441  ;
54442  return 0;
54443}
54444_ACEOF
54445if ac_fn_cxx_try_link "$LINENO"; then :
54446  has_static_libstdcxx=yes
54447else
54448  has_static_libstdcxx=no
54449fi
54450rm -f core conftest.err conftest.$ac_objext \
54451    conftest$ac_exeext conftest.$ac_ext
54452    LIBS="$OLD_LIBS"
54453    ac_ext=cpp
54454ac_cpp='$CXXCPP $CPPFLAGS'
54455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54458
54459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54460$as_echo "$has_static_libstdcxx" >&6; }
54461
54462    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54463      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54464    fi
54465
54466    # If dynamic was requested, it's available since it would fail above otherwise.
54467    # If dynamic wasn't requested, go with static unless it isn't available.
54468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54469$as_echo_n "checking how to link with libstdc++... " >&6; }
54470    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54471        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54473$as_echo "dynamic" >&6; }
54474    else
54475      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54476      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54477      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54478      # just use the same setting as for the TARGET toolchain.
54479      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54481$as_echo "static" >&6; }
54482    fi
54483  fi
54484
54485  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54486  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54487    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54488  fi
54489
54490
54491
54492  # Setup Windows runtime dlls
54493  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54494
54495
54496# Check whether --with-msvcr-dll was given.
54497if test "${with_msvcr_dll+set}" = set; then :
54498  withval=$with_msvcr_dll;
54499fi
54500
54501
54502  if test "x$with_msvcr_dll" != x; then
54503    # If given explicitly by user, do not probe. If not present, fail directly.
54504
54505  DLL_NAME="$MSVCR_NAME"
54506  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54507  METHOD="--with-msvcr-dll"
54508  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54510$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54511
54512    # Need to check if the found msvcr is correct architecture
54513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54514$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54515    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54517      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54518      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54520        CORRECT_MSVCR_ARCH="PE32 executable"
54521      else
54522        CORRECT_MSVCR_ARCH="PE32+ executable"
54523      fi
54524    else
54525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54526        CORRECT_MSVCR_ARCH=386
54527      else
54528        CORRECT_MSVCR_ARCH=x86-64
54529      fi
54530    fi
54531    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54533$as_echo "ok" >&6; }
54534      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54535
54536  # Only process if variable expands to non-empty
54537
54538  if test "x$MSVC_DLL" != x; then
54539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54540
54541  # Input might be given as Windows format, start by converting to
54542  # unix format.
54543  path="$MSVC_DLL"
54544  new_path=`$CYGPATH -u "$path"`
54545
54546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54549  # "foo.exe" is OK but "foo" is an error.
54550  #
54551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54552  # It is also a way to make sure we got the proper file name for the real test later on.
54553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54554  if test "x$test_shortpath" = x; then
54555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54556$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54557    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54558  fi
54559
54560  # Call helper function which possibly converts this using DOS-style short mode.
54561  # If so, the updated path is stored in $new_path.
54562
54563  input_path="$new_path"
54564  # Check if we need to convert this using DOS-style short mode. If the path
54565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54566  # take no chances and rewrite it.
54567  # Note: m4 eats our [], so we need to use [ and ] instead.
54568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54569  if test "x$has_forbidden_chars" != x; then
54570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54574      # Going to short mode and back again did indeed matter. Since short mode is
54575      # case insensitive, let's make it lowercase to improve readability.
54576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54577      # Now convert it back to Unix-style (cygpath)
54578      input_path=`$CYGPATH -u "$shortmode_path"`
54579      new_path="$input_path"
54580    fi
54581  fi
54582
54583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54584  if test "x$test_cygdrive_prefix" = x; then
54585    # As a simple fix, exclude /usr/bin since it's not a real path.
54586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54588      # a path prefixed by /cygdrive for fixpath to work.
54589      new_path="$CYGWIN_ROOT_PATH$input_path"
54590    fi
54591  fi
54592
54593
54594  if test "x$path" != "x$new_path"; then
54595    MSVC_DLL="$new_path"
54596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54598  fi
54599
54600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601
54602  path="$MSVC_DLL"
54603  has_colon=`$ECHO $path | $GREP ^.:`
54604  new_path="$path"
54605  if test "x$has_colon" = x; then
54606    # Not in mixed or Windows style, start by that.
54607    new_path=`cmd //c echo $path`
54608  fi
54609
54610
54611  input_path="$new_path"
54612  # Check if we need to convert this using DOS-style short mode. If the path
54613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54614  # take no chances and rewrite it.
54615  # Note: m4 eats our [], so we need to use [ and ] instead.
54616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54617  if test "x$has_forbidden_chars" != x; then
54618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54620  fi
54621
54622
54623  windows_path="$new_path"
54624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54625    unix_path=`$CYGPATH -u "$windows_path"`
54626    new_path="$unix_path"
54627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54629    new_path="$unix_path"
54630  fi
54631
54632  if test "x$path" != "x$new_path"; then
54633    MSVC_DLL="$new_path"
54634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54635$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54636  fi
54637
54638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54640
54641    else
54642      # We're on a unix platform. Hooray! :)
54643      path="$MSVC_DLL"
54644      has_space=`$ECHO "$path" | $GREP " "`
54645      if test "x$has_space" != x; then
54646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54647$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54649      fi
54650
54651      # Use eval to expand a potential ~
54652      eval path="$path"
54653      if test ! -f "$path" && test ! -d "$path"; then
54654        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54655      fi
54656
54657      if test -d "$path"; then
54658        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54659      else
54660        dir="`$DIRNAME "$path"`"
54661        base="`$BASENAME "$path"`"
54662        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54663      fi
54664    fi
54665  fi
54666
54667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54668$as_echo_n "checking for $DLL_NAME... " >&6; }
54669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54670$as_echo "$MSVC_DLL" >&6; }
54671    else
54672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54673$as_echo "incorrect, ignoring" >&6; }
54674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54676    fi
54677  fi
54678
54679    if test "x$MSVC_DLL" = x; then
54680      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54681    fi
54682    MSVCR_DLL="$MSVC_DLL"
54683  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54684
54685  DLL_NAME="$MSVCR_NAME"
54686  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54687  METHOD="devkit"
54688  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54689    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54690$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54691
54692    # Need to check if the found msvcr is correct architecture
54693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54694$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54695    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54697      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54698      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54699      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54700        CORRECT_MSVCR_ARCH="PE32 executable"
54701      else
54702        CORRECT_MSVCR_ARCH="PE32+ executable"
54703      fi
54704    else
54705      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54706        CORRECT_MSVCR_ARCH=386
54707      else
54708        CORRECT_MSVCR_ARCH=x86-64
54709      fi
54710    fi
54711    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54713$as_echo "ok" >&6; }
54714      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54715
54716  # Only process if variable expands to non-empty
54717
54718  if test "x$MSVC_DLL" != x; then
54719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54720
54721  # Input might be given as Windows format, start by converting to
54722  # unix format.
54723  path="$MSVC_DLL"
54724  new_path=`$CYGPATH -u "$path"`
54725
54726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54729  # "foo.exe" is OK but "foo" is an error.
54730  #
54731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54732  # It is also a way to make sure we got the proper file name for the real test later on.
54733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54734  if test "x$test_shortpath" = x; then
54735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54736$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54737    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54738  fi
54739
54740  # Call helper function which possibly converts this using DOS-style short mode.
54741  # If so, the updated path is stored in $new_path.
54742
54743  input_path="$new_path"
54744  # Check if we need to convert this using DOS-style short mode. If the path
54745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54746  # take no chances and rewrite it.
54747  # Note: m4 eats our [], so we need to use [ and ] instead.
54748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54749  if test "x$has_forbidden_chars" != x; then
54750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54754      # Going to short mode and back again did indeed matter. Since short mode is
54755      # case insensitive, let's make it lowercase to improve readability.
54756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54757      # Now convert it back to Unix-style (cygpath)
54758      input_path=`$CYGPATH -u "$shortmode_path"`
54759      new_path="$input_path"
54760    fi
54761  fi
54762
54763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54764  if test "x$test_cygdrive_prefix" = x; then
54765    # As a simple fix, exclude /usr/bin since it's not a real path.
54766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54768      # a path prefixed by /cygdrive for fixpath to work.
54769      new_path="$CYGWIN_ROOT_PATH$input_path"
54770    fi
54771  fi
54772
54773
54774  if test "x$path" != "x$new_path"; then
54775    MSVC_DLL="$new_path"
54776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54777$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54778  fi
54779
54780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54781
54782  path="$MSVC_DLL"
54783  has_colon=`$ECHO $path | $GREP ^.:`
54784  new_path="$path"
54785  if test "x$has_colon" = x; then
54786    # Not in mixed or Windows style, start by that.
54787    new_path=`cmd //c echo $path`
54788  fi
54789
54790
54791  input_path="$new_path"
54792  # Check if we need to convert this using DOS-style short mode. If the path
54793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54794  # take no chances and rewrite it.
54795  # Note: m4 eats our [], so we need to use [ and ] instead.
54796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54797  if test "x$has_forbidden_chars" != x; then
54798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54800  fi
54801
54802
54803  windows_path="$new_path"
54804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54805    unix_path=`$CYGPATH -u "$windows_path"`
54806    new_path="$unix_path"
54807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54809    new_path="$unix_path"
54810  fi
54811
54812  if test "x$path" != "x$new_path"; then
54813    MSVC_DLL="$new_path"
54814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54815$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54816  fi
54817
54818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54820
54821    else
54822      # We're on a unix platform. Hooray! :)
54823      path="$MSVC_DLL"
54824      has_space=`$ECHO "$path" | $GREP " "`
54825      if test "x$has_space" != x; then
54826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54827$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54829      fi
54830
54831      # Use eval to expand a potential ~
54832      eval path="$path"
54833      if test ! -f "$path" && test ! -d "$path"; then
54834        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54835      fi
54836
54837      if test -d "$path"; then
54838        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54839      else
54840        dir="`$DIRNAME "$path"`"
54841        base="`$BASENAME "$path"`"
54842        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54843      fi
54844    fi
54845  fi
54846
54847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54848$as_echo_n "checking for $DLL_NAME... " >&6; }
54849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54850$as_echo "$MSVC_DLL" >&6; }
54851    else
54852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54853$as_echo "incorrect, ignoring" >&6; }
54854      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54855$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54856    fi
54857  fi
54858
54859    if test "x$MSVC_DLL" = x; then
54860      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54861    fi
54862    MSVCR_DLL="$MSVC_DLL"
54863  else
54864
54865  DLL_NAME="${MSVCR_NAME}"
54866  MSVC_DLL=
54867
54868  if test "x$MSVC_DLL" = x; then
54869    # Probe: Using well-known location from Visual Studio 10.0
54870    if test "x$VCINSTALLDIR" != x; then
54871      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54872
54873  windows_path="$CYGWIN_VC_INSTALL_DIR"
54874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54875    unix_path=`$CYGPATH -u "$windows_path"`
54876    CYGWIN_VC_INSTALL_DIR="$unix_path"
54877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54879    CYGWIN_VC_INSTALL_DIR="$unix_path"
54880  fi
54881
54882      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54883        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54884      else
54885        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54886      fi
54887      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54888
54889  DLL_NAME="$DLL_NAME"
54890  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54891  METHOD="well-known location in VCINSTALLDIR"
54892  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54893    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54894$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54895
54896    # Need to check if the found msvcr is correct architecture
54897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54898$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54899    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54901      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54902      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54903      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54904        CORRECT_MSVCR_ARCH="PE32 executable"
54905      else
54906        CORRECT_MSVCR_ARCH="PE32+ executable"
54907      fi
54908    else
54909      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54910        CORRECT_MSVCR_ARCH=386
54911      else
54912        CORRECT_MSVCR_ARCH=x86-64
54913      fi
54914    fi
54915    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54917$as_echo "ok" >&6; }
54918      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54919
54920  # Only process if variable expands to non-empty
54921
54922  if test "x$MSVC_DLL" != x; then
54923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54924
54925  # Input might be given as Windows format, start by converting to
54926  # unix format.
54927  path="$MSVC_DLL"
54928  new_path=`$CYGPATH -u "$path"`
54929
54930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54933  # "foo.exe" is OK but "foo" is an error.
54934  #
54935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54936  # It is also a way to make sure we got the proper file name for the real test later on.
54937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54938  if test "x$test_shortpath" = x; then
54939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54940$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54941    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54942  fi
54943
54944  # Call helper function which possibly converts this using DOS-style short mode.
54945  # If so, the updated path is stored in $new_path.
54946
54947  input_path="$new_path"
54948  # Check if we need to convert this using DOS-style short mode. If the path
54949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54950  # take no chances and rewrite it.
54951  # Note: m4 eats our [], so we need to use [ and ] instead.
54952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54953  if test "x$has_forbidden_chars" != x; then
54954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54958      # Going to short mode and back again did indeed matter. Since short mode is
54959      # case insensitive, let's make it lowercase to improve readability.
54960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54961      # Now convert it back to Unix-style (cygpath)
54962      input_path=`$CYGPATH -u "$shortmode_path"`
54963      new_path="$input_path"
54964    fi
54965  fi
54966
54967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54968  if test "x$test_cygdrive_prefix" = x; then
54969    # As a simple fix, exclude /usr/bin since it's not a real path.
54970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54972      # a path prefixed by /cygdrive for fixpath to work.
54973      new_path="$CYGWIN_ROOT_PATH$input_path"
54974    fi
54975  fi
54976
54977
54978  if test "x$path" != "x$new_path"; then
54979    MSVC_DLL="$new_path"
54980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54981$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54982  fi
54983
54984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54985
54986  path="$MSVC_DLL"
54987  has_colon=`$ECHO $path | $GREP ^.:`
54988  new_path="$path"
54989  if test "x$has_colon" = x; then
54990    # Not in mixed or Windows style, start by that.
54991    new_path=`cmd //c echo $path`
54992  fi
54993
54994
54995  input_path="$new_path"
54996  # Check if we need to convert this using DOS-style short mode. If the path
54997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54998  # take no chances and rewrite it.
54999  # Note: m4 eats our [], so we need to use [ and ] instead.
55000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55001  if test "x$has_forbidden_chars" != x; then
55002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55004  fi
55005
55006
55007  windows_path="$new_path"
55008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55009    unix_path=`$CYGPATH -u "$windows_path"`
55010    new_path="$unix_path"
55011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55013    new_path="$unix_path"
55014  fi
55015
55016  if test "x$path" != "x$new_path"; then
55017    MSVC_DLL="$new_path"
55018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55019$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55020  fi
55021
55022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55024
55025    else
55026      # We're on a unix platform. Hooray! :)
55027      path="$MSVC_DLL"
55028      has_space=`$ECHO "$path" | $GREP " "`
55029      if test "x$has_space" != x; then
55030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55031$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55033      fi
55034
55035      # Use eval to expand a potential ~
55036      eval path="$path"
55037      if test ! -f "$path" && test ! -d "$path"; then
55038        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55039      fi
55040
55041      if test -d "$path"; then
55042        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55043      else
55044        dir="`$DIRNAME "$path"`"
55045        base="`$BASENAME "$path"`"
55046        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55047      fi
55048    fi
55049  fi
55050
55051      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55052$as_echo_n "checking for $DLL_NAME... " >&6; }
55053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55054$as_echo "$MSVC_DLL" >&6; }
55055    else
55056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55057$as_echo "incorrect, ignoring" >&6; }
55058      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55059$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55060    fi
55061  fi
55062
55063    fi
55064  fi
55065
55066  if test "x$MSVC_DLL" = x; then
55067    # Probe: Check in the Boot JDK directory.
55068    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55069
55070  DLL_NAME="$DLL_NAME"
55071  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55072  METHOD="well-known location in Boot JDK"
55073  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55074    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55075$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55076
55077    # Need to check if the found msvcr is correct architecture
55078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55079$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55080    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55082      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55083      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55084      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55085        CORRECT_MSVCR_ARCH="PE32 executable"
55086      else
55087        CORRECT_MSVCR_ARCH="PE32+ executable"
55088      fi
55089    else
55090      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55091        CORRECT_MSVCR_ARCH=386
55092      else
55093        CORRECT_MSVCR_ARCH=x86-64
55094      fi
55095    fi
55096    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55098$as_echo "ok" >&6; }
55099      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55100
55101  # Only process if variable expands to non-empty
55102
55103  if test "x$MSVC_DLL" != x; then
55104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55105
55106  # Input might be given as Windows format, start by converting to
55107  # unix format.
55108  path="$MSVC_DLL"
55109  new_path=`$CYGPATH -u "$path"`
55110
55111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55114  # "foo.exe" is OK but "foo" is an error.
55115  #
55116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55117  # It is also a way to make sure we got the proper file name for the real test later on.
55118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55119  if test "x$test_shortpath" = x; then
55120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55121$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55122    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55123  fi
55124
55125  # Call helper function which possibly converts this using DOS-style short mode.
55126  # If so, the updated path is stored in $new_path.
55127
55128  input_path="$new_path"
55129  # Check if we need to convert this using DOS-style short mode. If the path
55130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55131  # take no chances and rewrite it.
55132  # Note: m4 eats our [], so we need to use [ and ] instead.
55133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55134  if test "x$has_forbidden_chars" != x; then
55135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55139      # Going to short mode and back again did indeed matter. Since short mode is
55140      # case insensitive, let's make it lowercase to improve readability.
55141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55142      # Now convert it back to Unix-style (cygpath)
55143      input_path=`$CYGPATH -u "$shortmode_path"`
55144      new_path="$input_path"
55145    fi
55146  fi
55147
55148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55149  if test "x$test_cygdrive_prefix" = x; then
55150    # As a simple fix, exclude /usr/bin since it's not a real path.
55151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55153      # a path prefixed by /cygdrive for fixpath to work.
55154      new_path="$CYGWIN_ROOT_PATH$input_path"
55155    fi
55156  fi
55157
55158
55159  if test "x$path" != "x$new_path"; then
55160    MSVC_DLL="$new_path"
55161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55162$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55163  fi
55164
55165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55166
55167  path="$MSVC_DLL"
55168  has_colon=`$ECHO $path | $GREP ^.:`
55169  new_path="$path"
55170  if test "x$has_colon" = x; then
55171    # Not in mixed or Windows style, start by that.
55172    new_path=`cmd //c echo $path`
55173  fi
55174
55175
55176  input_path="$new_path"
55177  # Check if we need to convert this using DOS-style short mode. If the path
55178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55179  # take no chances and rewrite it.
55180  # Note: m4 eats our [], so we need to use [ and ] instead.
55181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55182  if test "x$has_forbidden_chars" != x; then
55183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55185  fi
55186
55187
55188  windows_path="$new_path"
55189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55190    unix_path=`$CYGPATH -u "$windows_path"`
55191    new_path="$unix_path"
55192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55194    new_path="$unix_path"
55195  fi
55196
55197  if test "x$path" != "x$new_path"; then
55198    MSVC_DLL="$new_path"
55199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55200$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55201  fi
55202
55203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55205
55206    else
55207      # We're on a unix platform. Hooray! :)
55208      path="$MSVC_DLL"
55209      has_space=`$ECHO "$path" | $GREP " "`
55210      if test "x$has_space" != x; then
55211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55212$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55214      fi
55215
55216      # Use eval to expand a potential ~
55217      eval path="$path"
55218      if test ! -f "$path" && test ! -d "$path"; then
55219        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55220      fi
55221
55222      if test -d "$path"; then
55223        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55224      else
55225        dir="`$DIRNAME "$path"`"
55226        base="`$BASENAME "$path"`"
55227        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55228      fi
55229    fi
55230  fi
55231
55232      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55233$as_echo_n "checking for $DLL_NAME... " >&6; }
55234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55235$as_echo "$MSVC_DLL" >&6; }
55236    else
55237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55238$as_echo "incorrect, ignoring" >&6; }
55239      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55240$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55241    fi
55242  fi
55243
55244  fi
55245
55246  if test "x$MSVC_DLL" = x; then
55247    # Probe: Look in the Windows system32 directory
55248    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55249
55250  windows_path="$CYGWIN_SYSTEMROOT"
55251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55252    unix_path=`$CYGPATH -u "$windows_path"`
55253    CYGWIN_SYSTEMROOT="$unix_path"
55254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55256    CYGWIN_SYSTEMROOT="$unix_path"
55257  fi
55258
55259    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55260
55261  DLL_NAME="$DLL_NAME"
55262  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55263  METHOD="well-known location in SYSTEMROOT"
55264  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55265    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55266$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55267
55268    # Need to check if the found msvcr is correct architecture
55269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55270$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55271    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55273      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55274      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55275      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55276        CORRECT_MSVCR_ARCH="PE32 executable"
55277      else
55278        CORRECT_MSVCR_ARCH="PE32+ executable"
55279      fi
55280    else
55281      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55282        CORRECT_MSVCR_ARCH=386
55283      else
55284        CORRECT_MSVCR_ARCH=x86-64
55285      fi
55286    fi
55287    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55289$as_echo "ok" >&6; }
55290      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55291
55292  # Only process if variable expands to non-empty
55293
55294  if test "x$MSVC_DLL" != x; then
55295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55296
55297  # Input might be given as Windows format, start by converting to
55298  # unix format.
55299  path="$MSVC_DLL"
55300  new_path=`$CYGPATH -u "$path"`
55301
55302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55305  # "foo.exe" is OK but "foo" is an error.
55306  #
55307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55308  # It is also a way to make sure we got the proper file name for the real test later on.
55309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55310  if test "x$test_shortpath" = x; then
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55312$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55313    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55314  fi
55315
55316  # Call helper function which possibly converts this using DOS-style short mode.
55317  # If so, the updated path is stored in $new_path.
55318
55319  input_path="$new_path"
55320  # Check if we need to convert this using DOS-style short mode. If the path
55321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55322  # take no chances and rewrite it.
55323  # Note: m4 eats our [], so we need to use [ and ] instead.
55324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55325  if test "x$has_forbidden_chars" != x; then
55326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55330      # Going to short mode and back again did indeed matter. Since short mode is
55331      # case insensitive, let's make it lowercase to improve readability.
55332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55333      # Now convert it back to Unix-style (cygpath)
55334      input_path=`$CYGPATH -u "$shortmode_path"`
55335      new_path="$input_path"
55336    fi
55337  fi
55338
55339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55340  if test "x$test_cygdrive_prefix" = x; then
55341    # As a simple fix, exclude /usr/bin since it's not a real path.
55342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55344      # a path prefixed by /cygdrive for fixpath to work.
55345      new_path="$CYGWIN_ROOT_PATH$input_path"
55346    fi
55347  fi
55348
55349
55350  if test "x$path" != "x$new_path"; then
55351    MSVC_DLL="$new_path"
55352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55353$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55354  fi
55355
55356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55357
55358  path="$MSVC_DLL"
55359  has_colon=`$ECHO $path | $GREP ^.:`
55360  new_path="$path"
55361  if test "x$has_colon" = x; then
55362    # Not in mixed or Windows style, start by that.
55363    new_path=`cmd //c echo $path`
55364  fi
55365
55366
55367  input_path="$new_path"
55368  # Check if we need to convert this using DOS-style short mode. If the path
55369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55370  # take no chances and rewrite it.
55371  # Note: m4 eats our [], so we need to use [ and ] instead.
55372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55373  if test "x$has_forbidden_chars" != x; then
55374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55376  fi
55377
55378
55379  windows_path="$new_path"
55380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55381    unix_path=`$CYGPATH -u "$windows_path"`
55382    new_path="$unix_path"
55383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55385    new_path="$unix_path"
55386  fi
55387
55388  if test "x$path" != "x$new_path"; then
55389    MSVC_DLL="$new_path"
55390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55391$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55392  fi
55393
55394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55396
55397    else
55398      # We're on a unix platform. Hooray! :)
55399      path="$MSVC_DLL"
55400      has_space=`$ECHO "$path" | $GREP " "`
55401      if test "x$has_space" != x; then
55402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55403$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55405      fi
55406
55407      # Use eval to expand a potential ~
55408      eval path="$path"
55409      if test ! -f "$path" && test ! -d "$path"; then
55410        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55411      fi
55412
55413      if test -d "$path"; then
55414        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55415      else
55416        dir="`$DIRNAME "$path"`"
55417        base="`$BASENAME "$path"`"
55418        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55419      fi
55420    fi
55421  fi
55422
55423      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55424$as_echo_n "checking for $DLL_NAME... " >&6; }
55425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55426$as_echo "$MSVC_DLL" >&6; }
55427    else
55428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55429$as_echo "incorrect, ignoring" >&6; }
55430      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55431$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55432    fi
55433  fi
55434
55435  fi
55436
55437  if test "x$MSVC_DLL" = x; then
55438    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55439    if test "x$VS100COMNTOOLS" != x; then
55440      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55441
55442  windows_path="$CYGWIN_VS_TOOLS_DIR"
55443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55444    unix_path=`$CYGPATH -u "$windows_path"`
55445    CYGWIN_VS_TOOLS_DIR="$unix_path"
55446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55448    CYGWIN_VS_TOOLS_DIR="$unix_path"
55449  fi
55450
55451      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55452        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55453	    | $GREP -i /x64/ | $HEAD --lines 1`
55454      else
55455        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55456	    | $GREP -i /x86/ | $HEAD --lines 1`
55457      fi
55458
55459  DLL_NAME="$DLL_NAME"
55460  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55461  METHOD="search of VS100COMNTOOLS"
55462  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55464$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55465
55466    # Need to check if the found msvcr is correct architecture
55467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55468$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55469    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55471      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55472      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55473      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55474        CORRECT_MSVCR_ARCH="PE32 executable"
55475      else
55476        CORRECT_MSVCR_ARCH="PE32+ executable"
55477      fi
55478    else
55479      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55480        CORRECT_MSVCR_ARCH=386
55481      else
55482        CORRECT_MSVCR_ARCH=x86-64
55483      fi
55484    fi
55485    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55487$as_echo "ok" >&6; }
55488      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55489
55490  # Only process if variable expands to non-empty
55491
55492  if test "x$MSVC_DLL" != x; then
55493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55494
55495  # Input might be given as Windows format, start by converting to
55496  # unix format.
55497  path="$MSVC_DLL"
55498  new_path=`$CYGPATH -u "$path"`
55499
55500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55503  # "foo.exe" is OK but "foo" is an error.
55504  #
55505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55506  # It is also a way to make sure we got the proper file name for the real test later on.
55507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55508  if test "x$test_shortpath" = x; then
55509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55510$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55511    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55512  fi
55513
55514  # Call helper function which possibly converts this using DOS-style short mode.
55515  # If so, the updated path is stored in $new_path.
55516
55517  input_path="$new_path"
55518  # Check if we need to convert this using DOS-style short mode. If the path
55519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55520  # take no chances and rewrite it.
55521  # Note: m4 eats our [], so we need to use [ and ] instead.
55522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55523  if test "x$has_forbidden_chars" != x; then
55524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55528      # Going to short mode and back again did indeed matter. Since short mode is
55529      # case insensitive, let's make it lowercase to improve readability.
55530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55531      # Now convert it back to Unix-style (cygpath)
55532      input_path=`$CYGPATH -u "$shortmode_path"`
55533      new_path="$input_path"
55534    fi
55535  fi
55536
55537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55538  if test "x$test_cygdrive_prefix" = x; then
55539    # As a simple fix, exclude /usr/bin since it's not a real path.
55540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55542      # a path prefixed by /cygdrive for fixpath to work.
55543      new_path="$CYGWIN_ROOT_PATH$input_path"
55544    fi
55545  fi
55546
55547
55548  if test "x$path" != "x$new_path"; then
55549    MSVC_DLL="$new_path"
55550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55551$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55552  fi
55553
55554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55555
55556  path="$MSVC_DLL"
55557  has_colon=`$ECHO $path | $GREP ^.:`
55558  new_path="$path"
55559  if test "x$has_colon" = x; then
55560    # Not in mixed or Windows style, start by that.
55561    new_path=`cmd //c echo $path`
55562  fi
55563
55564
55565  input_path="$new_path"
55566  # Check if we need to convert this using DOS-style short mode. If the path
55567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55568  # take no chances and rewrite it.
55569  # Note: m4 eats our [], so we need to use [ and ] instead.
55570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55571  if test "x$has_forbidden_chars" != x; then
55572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55574  fi
55575
55576
55577  windows_path="$new_path"
55578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55579    unix_path=`$CYGPATH -u "$windows_path"`
55580    new_path="$unix_path"
55581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55583    new_path="$unix_path"
55584  fi
55585
55586  if test "x$path" != "x$new_path"; then
55587    MSVC_DLL="$new_path"
55588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55589$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55590  fi
55591
55592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55594
55595    else
55596      # We're on a unix platform. Hooray! :)
55597      path="$MSVC_DLL"
55598      has_space=`$ECHO "$path" | $GREP " "`
55599      if test "x$has_space" != x; then
55600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55601$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55603      fi
55604
55605      # Use eval to expand a potential ~
55606      eval path="$path"
55607      if test ! -f "$path" && test ! -d "$path"; then
55608        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55609      fi
55610
55611      if test -d "$path"; then
55612        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55613      else
55614        dir="`$DIRNAME "$path"`"
55615        base="`$BASENAME "$path"`"
55616        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55617      fi
55618    fi
55619  fi
55620
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55622$as_echo_n "checking for $DLL_NAME... " >&6; }
55623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55624$as_echo "$MSVC_DLL" >&6; }
55625    else
55626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55627$as_echo "incorrect, ignoring" >&6; }
55628      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55629$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55630    fi
55631  fi
55632
55633    fi
55634  fi
55635
55636  if test "x$MSVC_DLL" = x; then
55637    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55638    # (This was the original behaviour; kept since it might turn something up)
55639    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55640      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55641        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55642	    | $GREP x64 | $HEAD --lines 1`
55643      else
55644        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55645	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55646        if test "x$POSSIBLE_MSVC_DLL" = x; then
55647          # We're grasping at straws now...
55648          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55649	      | $HEAD --lines 1`
55650        fi
55651      fi
55652
55653
55654  DLL_NAME="$DLL_NAME"
55655  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55656  METHOD="search of VCINSTALLDIR"
55657  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55659$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55660
55661    # Need to check if the found msvcr is correct architecture
55662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55663$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55664    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55666      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55667      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55668      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55669        CORRECT_MSVCR_ARCH="PE32 executable"
55670      else
55671        CORRECT_MSVCR_ARCH="PE32+ executable"
55672      fi
55673    else
55674      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55675        CORRECT_MSVCR_ARCH=386
55676      else
55677        CORRECT_MSVCR_ARCH=x86-64
55678      fi
55679    fi
55680    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55682$as_echo "ok" >&6; }
55683      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55684
55685  # Only process if variable expands to non-empty
55686
55687  if test "x$MSVC_DLL" != x; then
55688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55689
55690  # Input might be given as Windows format, start by converting to
55691  # unix format.
55692  path="$MSVC_DLL"
55693  new_path=`$CYGPATH -u "$path"`
55694
55695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55698  # "foo.exe" is OK but "foo" is an error.
55699  #
55700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55701  # It is also a way to make sure we got the proper file name for the real test later on.
55702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55703  if test "x$test_shortpath" = x; then
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55705$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55706    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55707  fi
55708
55709  # Call helper function which possibly converts this using DOS-style short mode.
55710  # If so, the updated path is stored in $new_path.
55711
55712  input_path="$new_path"
55713  # Check if we need to convert this using DOS-style short mode. If the path
55714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55715  # take no chances and rewrite it.
55716  # Note: m4 eats our [], so we need to use [ and ] instead.
55717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55718  if test "x$has_forbidden_chars" != x; then
55719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55723      # Going to short mode and back again did indeed matter. Since short mode is
55724      # case insensitive, let's make it lowercase to improve readability.
55725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55726      # Now convert it back to Unix-style (cygpath)
55727      input_path=`$CYGPATH -u "$shortmode_path"`
55728      new_path="$input_path"
55729    fi
55730  fi
55731
55732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55733  if test "x$test_cygdrive_prefix" = x; then
55734    # As a simple fix, exclude /usr/bin since it's not a real path.
55735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55737      # a path prefixed by /cygdrive for fixpath to work.
55738      new_path="$CYGWIN_ROOT_PATH$input_path"
55739    fi
55740  fi
55741
55742
55743  if test "x$path" != "x$new_path"; then
55744    MSVC_DLL="$new_path"
55745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55746$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55747  fi
55748
55749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750
55751  path="$MSVC_DLL"
55752  has_colon=`$ECHO $path | $GREP ^.:`
55753  new_path="$path"
55754  if test "x$has_colon" = x; then
55755    # Not in mixed or Windows style, start by that.
55756    new_path=`cmd //c echo $path`
55757  fi
55758
55759
55760  input_path="$new_path"
55761  # Check if we need to convert this using DOS-style short mode. If the path
55762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55763  # take no chances and rewrite it.
55764  # Note: m4 eats our [], so we need to use [ and ] instead.
55765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55766  if test "x$has_forbidden_chars" != x; then
55767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55769  fi
55770
55771
55772  windows_path="$new_path"
55773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55774    unix_path=`$CYGPATH -u "$windows_path"`
55775    new_path="$unix_path"
55776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55778    new_path="$unix_path"
55779  fi
55780
55781  if test "x$path" != "x$new_path"; then
55782    MSVC_DLL="$new_path"
55783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55784$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55785  fi
55786
55787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55789
55790    else
55791      # We're on a unix platform. Hooray! :)
55792      path="$MSVC_DLL"
55793      has_space=`$ECHO "$path" | $GREP " "`
55794      if test "x$has_space" != x; then
55795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55796$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55798      fi
55799
55800      # Use eval to expand a potential ~
55801      eval path="$path"
55802      if test ! -f "$path" && test ! -d "$path"; then
55803        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55804      fi
55805
55806      if test -d "$path"; then
55807        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55808      else
55809        dir="`$DIRNAME "$path"`"
55810        base="`$BASENAME "$path"`"
55811        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55812      fi
55813    fi
55814  fi
55815
55816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55817$as_echo_n "checking for $DLL_NAME... " >&6; }
55818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55819$as_echo "$MSVC_DLL" >&6; }
55820    else
55821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55822$as_echo "incorrect, ignoring" >&6; }
55823      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55824$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55825    fi
55826  fi
55827
55828    fi
55829  fi
55830
55831  if test "x$MSVC_DLL" = x; then
55832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55833$as_echo_n "checking for $DLL_NAME... " >&6; }
55834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55835$as_echo "no" >&6; }
55836    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55837  fi
55838
55839    MSVCR_DLL="$MSVC_DLL"
55840  fi
55841
55842
55843
55844# Check whether --with-msvcp-dll was given.
55845if test "${with_msvcp_dll+set}" = set; then :
55846  withval=$with_msvcp_dll;
55847fi
55848
55849
55850  if test "x$MSVCP_NAME" != "x"; then
55851    if test "x$with_msvcp_dll" != x; then
55852      # If given explicitly by user, do not probe. If not present, fail directly.
55853
55854  DLL_NAME="$MSVCP_NAME"
55855  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55856  METHOD="--with-msvcp-dll"
55857  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55858    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55859$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55860
55861    # Need to check if the found msvcr is correct architecture
55862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55863$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55864    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55866      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55867      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55868      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55869        CORRECT_MSVCR_ARCH="PE32 executable"
55870      else
55871        CORRECT_MSVCR_ARCH="PE32+ executable"
55872      fi
55873    else
55874      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55875        CORRECT_MSVCR_ARCH=386
55876      else
55877        CORRECT_MSVCR_ARCH=x86-64
55878      fi
55879    fi
55880    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55882$as_echo "ok" >&6; }
55883      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55884
55885  # Only process if variable expands to non-empty
55886
55887  if test "x$MSVC_DLL" != x; then
55888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55889
55890  # Input might be given as Windows format, start by converting to
55891  # unix format.
55892  path="$MSVC_DLL"
55893  new_path=`$CYGPATH -u "$path"`
55894
55895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55898  # "foo.exe" is OK but "foo" is an error.
55899  #
55900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55901  # It is also a way to make sure we got the proper file name for the real test later on.
55902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55903  if test "x$test_shortpath" = x; then
55904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55905$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55906    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55907  fi
55908
55909  # Call helper function which possibly converts this using DOS-style short mode.
55910  # If so, the updated path is stored in $new_path.
55911
55912  input_path="$new_path"
55913  # Check if we need to convert this using DOS-style short mode. If the path
55914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55915  # take no chances and rewrite it.
55916  # Note: m4 eats our [], so we need to use [ and ] instead.
55917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55918  if test "x$has_forbidden_chars" != x; then
55919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55923      # Going to short mode and back again did indeed matter. Since short mode is
55924      # case insensitive, let's make it lowercase to improve readability.
55925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55926      # Now convert it back to Unix-style (cygpath)
55927      input_path=`$CYGPATH -u "$shortmode_path"`
55928      new_path="$input_path"
55929    fi
55930  fi
55931
55932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55933  if test "x$test_cygdrive_prefix" = x; then
55934    # As a simple fix, exclude /usr/bin since it's not a real path.
55935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55937      # a path prefixed by /cygdrive for fixpath to work.
55938      new_path="$CYGWIN_ROOT_PATH$input_path"
55939    fi
55940  fi
55941
55942
55943  if test "x$path" != "x$new_path"; then
55944    MSVC_DLL="$new_path"
55945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55946$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55947  fi
55948
55949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55950
55951  path="$MSVC_DLL"
55952  has_colon=`$ECHO $path | $GREP ^.:`
55953  new_path="$path"
55954  if test "x$has_colon" = x; then
55955    # Not in mixed or Windows style, start by that.
55956    new_path=`cmd //c echo $path`
55957  fi
55958
55959
55960  input_path="$new_path"
55961  # Check if we need to convert this using DOS-style short mode. If the path
55962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55963  # take no chances and rewrite it.
55964  # Note: m4 eats our [], so we need to use [ and ] instead.
55965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55966  if test "x$has_forbidden_chars" != x; then
55967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55969  fi
55970
55971
55972  windows_path="$new_path"
55973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55974    unix_path=`$CYGPATH -u "$windows_path"`
55975    new_path="$unix_path"
55976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55978    new_path="$unix_path"
55979  fi
55980
55981  if test "x$path" != "x$new_path"; then
55982    MSVC_DLL="$new_path"
55983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55984$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55985  fi
55986
55987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55989
55990    else
55991      # We're on a unix platform. Hooray! :)
55992      path="$MSVC_DLL"
55993      has_space=`$ECHO "$path" | $GREP " "`
55994      if test "x$has_space" != x; then
55995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55998      fi
55999
56000      # Use eval to expand a potential ~
56001      eval path="$path"
56002      if test ! -f "$path" && test ! -d "$path"; then
56003        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56004      fi
56005
56006      if test -d "$path"; then
56007        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56008      else
56009        dir="`$DIRNAME "$path"`"
56010        base="`$BASENAME "$path"`"
56011        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56012      fi
56013    fi
56014  fi
56015
56016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56017$as_echo_n "checking for $DLL_NAME... " >&6; }
56018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56019$as_echo "$MSVC_DLL" >&6; }
56020    else
56021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56022$as_echo "incorrect, ignoring" >&6; }
56023      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56024$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56025    fi
56026  fi
56027
56028      if test "x$MSVC_DLL" = x; then
56029        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56030      fi
56031      MSVCP_DLL="$MSVC_DLL"
56032    elif test "x$DEVKIT_MSVCP_DLL" != x; then
56033
56034  DLL_NAME="$MSVCP_NAME"
56035  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56036  METHOD="devkit"
56037  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56038    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56039$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56040
56041    # Need to check if the found msvcr is correct architecture
56042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56043$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56044    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56046      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56047      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56048      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56049        CORRECT_MSVCR_ARCH="PE32 executable"
56050      else
56051        CORRECT_MSVCR_ARCH="PE32+ executable"
56052      fi
56053    else
56054      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56055        CORRECT_MSVCR_ARCH=386
56056      else
56057        CORRECT_MSVCR_ARCH=x86-64
56058      fi
56059    fi
56060    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56062$as_echo "ok" >&6; }
56063      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56064
56065  # Only process if variable expands to non-empty
56066
56067  if test "x$MSVC_DLL" != x; then
56068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56069
56070  # Input might be given as Windows format, start by converting to
56071  # unix format.
56072  path="$MSVC_DLL"
56073  new_path=`$CYGPATH -u "$path"`
56074
56075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56078  # "foo.exe" is OK but "foo" is an error.
56079  #
56080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56081  # It is also a way to make sure we got the proper file name for the real test later on.
56082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56083  if test "x$test_shortpath" = x; then
56084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56085$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56086    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56087  fi
56088
56089  # Call helper function which possibly converts this using DOS-style short mode.
56090  # If so, the updated path is stored in $new_path.
56091
56092  input_path="$new_path"
56093  # Check if we need to convert this using DOS-style short mode. If the path
56094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56095  # take no chances and rewrite it.
56096  # Note: m4 eats our [], so we need to use [ and ] instead.
56097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56098  if test "x$has_forbidden_chars" != x; then
56099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56103      # Going to short mode and back again did indeed matter. Since short mode is
56104      # case insensitive, let's make it lowercase to improve readability.
56105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56106      # Now convert it back to Unix-style (cygpath)
56107      input_path=`$CYGPATH -u "$shortmode_path"`
56108      new_path="$input_path"
56109    fi
56110  fi
56111
56112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56113  if test "x$test_cygdrive_prefix" = x; then
56114    # As a simple fix, exclude /usr/bin since it's not a real path.
56115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56117      # a path prefixed by /cygdrive for fixpath to work.
56118      new_path="$CYGWIN_ROOT_PATH$input_path"
56119    fi
56120  fi
56121
56122
56123  if test "x$path" != "x$new_path"; then
56124    MSVC_DLL="$new_path"
56125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56127  fi
56128
56129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56130
56131  path="$MSVC_DLL"
56132  has_colon=`$ECHO $path | $GREP ^.:`
56133  new_path="$path"
56134  if test "x$has_colon" = x; then
56135    # Not in mixed or Windows style, start by that.
56136    new_path=`cmd //c echo $path`
56137  fi
56138
56139
56140  input_path="$new_path"
56141  # Check if we need to convert this using DOS-style short mode. If the path
56142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56143  # take no chances and rewrite it.
56144  # Note: m4 eats our [], so we need to use [ and ] instead.
56145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56146  if test "x$has_forbidden_chars" != x; then
56147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56149  fi
56150
56151
56152  windows_path="$new_path"
56153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56154    unix_path=`$CYGPATH -u "$windows_path"`
56155    new_path="$unix_path"
56156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56158    new_path="$unix_path"
56159  fi
56160
56161  if test "x$path" != "x$new_path"; then
56162    MSVC_DLL="$new_path"
56163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56164$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56165  fi
56166
56167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56169
56170    else
56171      # We're on a unix platform. Hooray! :)
56172      path="$MSVC_DLL"
56173      has_space=`$ECHO "$path" | $GREP " "`
56174      if test "x$has_space" != x; then
56175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56178      fi
56179
56180      # Use eval to expand a potential ~
56181      eval path="$path"
56182      if test ! -f "$path" && test ! -d "$path"; then
56183        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56184      fi
56185
56186      if test -d "$path"; then
56187        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56188      else
56189        dir="`$DIRNAME "$path"`"
56190        base="`$BASENAME "$path"`"
56191        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56192      fi
56193    fi
56194  fi
56195
56196      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56197$as_echo_n "checking for $DLL_NAME... " >&6; }
56198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56199$as_echo "$MSVC_DLL" >&6; }
56200    else
56201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56202$as_echo "incorrect, ignoring" >&6; }
56203      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56204$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56205    fi
56206  fi
56207
56208      if test "x$MSVC_DLL" = x; then
56209        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56210      fi
56211      MSVCP_DLL="$MSVC_DLL"
56212    else
56213
56214  DLL_NAME="${MSVCP_NAME}"
56215  MSVC_DLL=
56216
56217  if test "x$MSVC_DLL" = x; then
56218    # Probe: Using well-known location from Visual Studio 10.0
56219    if test "x$VCINSTALLDIR" != x; then
56220      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56221
56222  windows_path="$CYGWIN_VC_INSTALL_DIR"
56223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56224    unix_path=`$CYGPATH -u "$windows_path"`
56225    CYGWIN_VC_INSTALL_DIR="$unix_path"
56226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56228    CYGWIN_VC_INSTALL_DIR="$unix_path"
56229  fi
56230
56231      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56232        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56233      else
56234        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56235      fi
56236      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56237
56238  DLL_NAME="$DLL_NAME"
56239  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56240  METHOD="well-known location in VCINSTALLDIR"
56241  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56242    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56243$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56244
56245    # Need to check if the found msvcr is correct architecture
56246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56247$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56248    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56250      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56251      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56252      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56253        CORRECT_MSVCR_ARCH="PE32 executable"
56254      else
56255        CORRECT_MSVCR_ARCH="PE32+ executable"
56256      fi
56257    else
56258      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56259        CORRECT_MSVCR_ARCH=386
56260      else
56261        CORRECT_MSVCR_ARCH=x86-64
56262      fi
56263    fi
56264    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56266$as_echo "ok" >&6; }
56267      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56268
56269  # Only process if variable expands to non-empty
56270
56271  if test "x$MSVC_DLL" != x; then
56272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56273
56274  # Input might be given as Windows format, start by converting to
56275  # unix format.
56276  path="$MSVC_DLL"
56277  new_path=`$CYGPATH -u "$path"`
56278
56279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56282  # "foo.exe" is OK but "foo" is an error.
56283  #
56284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56285  # It is also a way to make sure we got the proper file name for the real test later on.
56286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56287  if test "x$test_shortpath" = x; then
56288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56289$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56290    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56291  fi
56292
56293  # Call helper function which possibly converts this using DOS-style short mode.
56294  # If so, the updated path is stored in $new_path.
56295
56296  input_path="$new_path"
56297  # Check if we need to convert this using DOS-style short mode. If the path
56298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56299  # take no chances and rewrite it.
56300  # Note: m4 eats our [], so we need to use [ and ] instead.
56301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56302  if test "x$has_forbidden_chars" != x; then
56303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56307      # Going to short mode and back again did indeed matter. Since short mode is
56308      # case insensitive, let's make it lowercase to improve readability.
56309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56310      # Now convert it back to Unix-style (cygpath)
56311      input_path=`$CYGPATH -u "$shortmode_path"`
56312      new_path="$input_path"
56313    fi
56314  fi
56315
56316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56317  if test "x$test_cygdrive_prefix" = x; then
56318    # As a simple fix, exclude /usr/bin since it's not a real path.
56319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56321      # a path prefixed by /cygdrive for fixpath to work.
56322      new_path="$CYGWIN_ROOT_PATH$input_path"
56323    fi
56324  fi
56325
56326
56327  if test "x$path" != "x$new_path"; then
56328    MSVC_DLL="$new_path"
56329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56330$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56331  fi
56332
56333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56334
56335  path="$MSVC_DLL"
56336  has_colon=`$ECHO $path | $GREP ^.:`
56337  new_path="$path"
56338  if test "x$has_colon" = x; then
56339    # Not in mixed or Windows style, start by that.
56340    new_path=`cmd //c echo $path`
56341  fi
56342
56343
56344  input_path="$new_path"
56345  # Check if we need to convert this using DOS-style short mode. If the path
56346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56347  # take no chances and rewrite it.
56348  # Note: m4 eats our [], so we need to use [ and ] instead.
56349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56350  if test "x$has_forbidden_chars" != x; then
56351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56353  fi
56354
56355
56356  windows_path="$new_path"
56357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56358    unix_path=`$CYGPATH -u "$windows_path"`
56359    new_path="$unix_path"
56360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56362    new_path="$unix_path"
56363  fi
56364
56365  if test "x$path" != "x$new_path"; then
56366    MSVC_DLL="$new_path"
56367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56368$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56369  fi
56370
56371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56373
56374    else
56375      # We're on a unix platform. Hooray! :)
56376      path="$MSVC_DLL"
56377      has_space=`$ECHO "$path" | $GREP " "`
56378      if test "x$has_space" != x; then
56379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56380$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56382      fi
56383
56384      # Use eval to expand a potential ~
56385      eval path="$path"
56386      if test ! -f "$path" && test ! -d "$path"; then
56387        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56388      fi
56389
56390      if test -d "$path"; then
56391        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56392      else
56393        dir="`$DIRNAME "$path"`"
56394        base="`$BASENAME "$path"`"
56395        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56396      fi
56397    fi
56398  fi
56399
56400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56401$as_echo_n "checking for $DLL_NAME... " >&6; }
56402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56403$as_echo "$MSVC_DLL" >&6; }
56404    else
56405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56406$as_echo "incorrect, ignoring" >&6; }
56407      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56408$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56409    fi
56410  fi
56411
56412    fi
56413  fi
56414
56415  if test "x$MSVC_DLL" = x; then
56416    # Probe: Check in the Boot JDK directory.
56417    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56418
56419  DLL_NAME="$DLL_NAME"
56420  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56421  METHOD="well-known location in Boot JDK"
56422  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56424$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56425
56426    # Need to check if the found msvcr is correct architecture
56427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56428$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56429    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56431      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56432      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56433      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56434        CORRECT_MSVCR_ARCH="PE32 executable"
56435      else
56436        CORRECT_MSVCR_ARCH="PE32+ executable"
56437      fi
56438    else
56439      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56440        CORRECT_MSVCR_ARCH=386
56441      else
56442        CORRECT_MSVCR_ARCH=x86-64
56443      fi
56444    fi
56445    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56447$as_echo "ok" >&6; }
56448      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56449
56450  # Only process if variable expands to non-empty
56451
56452  if test "x$MSVC_DLL" != x; then
56453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56454
56455  # Input might be given as Windows format, start by converting to
56456  # unix format.
56457  path="$MSVC_DLL"
56458  new_path=`$CYGPATH -u "$path"`
56459
56460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56463  # "foo.exe" is OK but "foo" is an error.
56464  #
56465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56466  # It is also a way to make sure we got the proper file name for the real test later on.
56467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56468  if test "x$test_shortpath" = x; then
56469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56470$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56471    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56472  fi
56473
56474  # Call helper function which possibly converts this using DOS-style short mode.
56475  # If so, the updated path is stored in $new_path.
56476
56477  input_path="$new_path"
56478  # Check if we need to convert this using DOS-style short mode. If the path
56479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56480  # take no chances and rewrite it.
56481  # Note: m4 eats our [], so we need to use [ and ] instead.
56482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56483  if test "x$has_forbidden_chars" != x; then
56484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56488      # Going to short mode and back again did indeed matter. Since short mode is
56489      # case insensitive, let's make it lowercase to improve readability.
56490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56491      # Now convert it back to Unix-style (cygpath)
56492      input_path=`$CYGPATH -u "$shortmode_path"`
56493      new_path="$input_path"
56494    fi
56495  fi
56496
56497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56498  if test "x$test_cygdrive_prefix" = x; then
56499    # As a simple fix, exclude /usr/bin since it's not a real path.
56500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56502      # a path prefixed by /cygdrive for fixpath to work.
56503      new_path="$CYGWIN_ROOT_PATH$input_path"
56504    fi
56505  fi
56506
56507
56508  if test "x$path" != "x$new_path"; then
56509    MSVC_DLL="$new_path"
56510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56511$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56512  fi
56513
56514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56515
56516  path="$MSVC_DLL"
56517  has_colon=`$ECHO $path | $GREP ^.:`
56518  new_path="$path"
56519  if test "x$has_colon" = x; then
56520    # Not in mixed or Windows style, start by that.
56521    new_path=`cmd //c echo $path`
56522  fi
56523
56524
56525  input_path="$new_path"
56526  # Check if we need to convert this using DOS-style short mode. If the path
56527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56528  # take no chances and rewrite it.
56529  # Note: m4 eats our [], so we need to use [ and ] instead.
56530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56531  if test "x$has_forbidden_chars" != x; then
56532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56534  fi
56535
56536
56537  windows_path="$new_path"
56538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56539    unix_path=`$CYGPATH -u "$windows_path"`
56540    new_path="$unix_path"
56541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56543    new_path="$unix_path"
56544  fi
56545
56546  if test "x$path" != "x$new_path"; then
56547    MSVC_DLL="$new_path"
56548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56549$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56550  fi
56551
56552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56554
56555    else
56556      # We're on a unix platform. Hooray! :)
56557      path="$MSVC_DLL"
56558      has_space=`$ECHO "$path" | $GREP " "`
56559      if test "x$has_space" != x; then
56560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56561$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56563      fi
56564
56565      # Use eval to expand a potential ~
56566      eval path="$path"
56567      if test ! -f "$path" && test ! -d "$path"; then
56568        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56569      fi
56570
56571      if test -d "$path"; then
56572        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56573      else
56574        dir="`$DIRNAME "$path"`"
56575        base="`$BASENAME "$path"`"
56576        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56577      fi
56578    fi
56579  fi
56580
56581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56582$as_echo_n "checking for $DLL_NAME... " >&6; }
56583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56584$as_echo "$MSVC_DLL" >&6; }
56585    else
56586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56587$as_echo "incorrect, ignoring" >&6; }
56588      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56589$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56590    fi
56591  fi
56592
56593  fi
56594
56595  if test "x$MSVC_DLL" = x; then
56596    # Probe: Look in the Windows system32 directory
56597    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56598
56599  windows_path="$CYGWIN_SYSTEMROOT"
56600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56601    unix_path=`$CYGPATH -u "$windows_path"`
56602    CYGWIN_SYSTEMROOT="$unix_path"
56603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56605    CYGWIN_SYSTEMROOT="$unix_path"
56606  fi
56607
56608    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56609
56610  DLL_NAME="$DLL_NAME"
56611  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56612  METHOD="well-known location in SYSTEMROOT"
56613  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56615$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56616
56617    # Need to check if the found msvcr is correct architecture
56618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56619$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56620    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56622      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56623      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56624      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56625        CORRECT_MSVCR_ARCH="PE32 executable"
56626      else
56627        CORRECT_MSVCR_ARCH="PE32+ executable"
56628      fi
56629    else
56630      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56631        CORRECT_MSVCR_ARCH=386
56632      else
56633        CORRECT_MSVCR_ARCH=x86-64
56634      fi
56635    fi
56636    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56638$as_echo "ok" >&6; }
56639      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56640
56641  # Only process if variable expands to non-empty
56642
56643  if test "x$MSVC_DLL" != x; then
56644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56645
56646  # Input might be given as Windows format, start by converting to
56647  # unix format.
56648  path="$MSVC_DLL"
56649  new_path=`$CYGPATH -u "$path"`
56650
56651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56654  # "foo.exe" is OK but "foo" is an error.
56655  #
56656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56657  # It is also a way to make sure we got the proper file name for the real test later on.
56658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56659  if test "x$test_shortpath" = x; then
56660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56661$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56662    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56663  fi
56664
56665  # Call helper function which possibly converts this using DOS-style short mode.
56666  # If so, the updated path is stored in $new_path.
56667
56668  input_path="$new_path"
56669  # Check if we need to convert this using DOS-style short mode. If the path
56670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56671  # take no chances and rewrite it.
56672  # Note: m4 eats our [], so we need to use [ and ] instead.
56673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56674  if test "x$has_forbidden_chars" != x; then
56675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56679      # Going to short mode and back again did indeed matter. Since short mode is
56680      # case insensitive, let's make it lowercase to improve readability.
56681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56682      # Now convert it back to Unix-style (cygpath)
56683      input_path=`$CYGPATH -u "$shortmode_path"`
56684      new_path="$input_path"
56685    fi
56686  fi
56687
56688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56689  if test "x$test_cygdrive_prefix" = x; then
56690    # As a simple fix, exclude /usr/bin since it's not a real path.
56691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56693      # a path prefixed by /cygdrive for fixpath to work.
56694      new_path="$CYGWIN_ROOT_PATH$input_path"
56695    fi
56696  fi
56697
56698
56699  if test "x$path" != "x$new_path"; then
56700    MSVC_DLL="$new_path"
56701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56702$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56703  fi
56704
56705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56706
56707  path="$MSVC_DLL"
56708  has_colon=`$ECHO $path | $GREP ^.:`
56709  new_path="$path"
56710  if test "x$has_colon" = x; then
56711    # Not in mixed or Windows style, start by that.
56712    new_path=`cmd //c echo $path`
56713  fi
56714
56715
56716  input_path="$new_path"
56717  # Check if we need to convert this using DOS-style short mode. If the path
56718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56719  # take no chances and rewrite it.
56720  # Note: m4 eats our [], so we need to use [ and ] instead.
56721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56722  if test "x$has_forbidden_chars" != x; then
56723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56725  fi
56726
56727
56728  windows_path="$new_path"
56729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56730    unix_path=`$CYGPATH -u "$windows_path"`
56731    new_path="$unix_path"
56732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56734    new_path="$unix_path"
56735  fi
56736
56737  if test "x$path" != "x$new_path"; then
56738    MSVC_DLL="$new_path"
56739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56740$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56741  fi
56742
56743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56745
56746    else
56747      # We're on a unix platform. Hooray! :)
56748      path="$MSVC_DLL"
56749      has_space=`$ECHO "$path" | $GREP " "`
56750      if test "x$has_space" != x; then
56751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56752$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56754      fi
56755
56756      # Use eval to expand a potential ~
56757      eval path="$path"
56758      if test ! -f "$path" && test ! -d "$path"; then
56759        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56760      fi
56761
56762      if test -d "$path"; then
56763        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56764      else
56765        dir="`$DIRNAME "$path"`"
56766        base="`$BASENAME "$path"`"
56767        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56768      fi
56769    fi
56770  fi
56771
56772      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56773$as_echo_n "checking for $DLL_NAME... " >&6; }
56774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56775$as_echo "$MSVC_DLL" >&6; }
56776    else
56777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56778$as_echo "incorrect, ignoring" >&6; }
56779      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56780$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56781    fi
56782  fi
56783
56784  fi
56785
56786  if test "x$MSVC_DLL" = x; then
56787    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56788    if test "x$VS100COMNTOOLS" != x; then
56789      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56790
56791  windows_path="$CYGWIN_VS_TOOLS_DIR"
56792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56793    unix_path=`$CYGPATH -u "$windows_path"`
56794    CYGWIN_VS_TOOLS_DIR="$unix_path"
56795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56797    CYGWIN_VS_TOOLS_DIR="$unix_path"
56798  fi
56799
56800      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56801        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56802	    | $GREP -i /x64/ | $HEAD --lines 1`
56803      else
56804        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56805	    | $GREP -i /x86/ | $HEAD --lines 1`
56806      fi
56807
56808  DLL_NAME="$DLL_NAME"
56809  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56810  METHOD="search of VS100COMNTOOLS"
56811  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56813$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56814
56815    # Need to check if the found msvcr is correct architecture
56816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56817$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56818    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56820      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56821      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56822      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56823        CORRECT_MSVCR_ARCH="PE32 executable"
56824      else
56825        CORRECT_MSVCR_ARCH="PE32+ executable"
56826      fi
56827    else
56828      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56829        CORRECT_MSVCR_ARCH=386
56830      else
56831        CORRECT_MSVCR_ARCH=x86-64
56832      fi
56833    fi
56834    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56836$as_echo "ok" >&6; }
56837      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56838
56839  # Only process if variable expands to non-empty
56840
56841  if test "x$MSVC_DLL" != x; then
56842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56843
56844  # Input might be given as Windows format, start by converting to
56845  # unix format.
56846  path="$MSVC_DLL"
56847  new_path=`$CYGPATH -u "$path"`
56848
56849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56852  # "foo.exe" is OK but "foo" is an error.
56853  #
56854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56855  # It is also a way to make sure we got the proper file name for the real test later on.
56856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56857  if test "x$test_shortpath" = x; then
56858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56859$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56860    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56861  fi
56862
56863  # Call helper function which possibly converts this using DOS-style short mode.
56864  # If so, the updated path is stored in $new_path.
56865
56866  input_path="$new_path"
56867  # Check if we need to convert this using DOS-style short mode. If the path
56868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56869  # take no chances and rewrite it.
56870  # Note: m4 eats our [], so we need to use [ and ] instead.
56871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56872  if test "x$has_forbidden_chars" != x; then
56873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56877      # Going to short mode and back again did indeed matter. Since short mode is
56878      # case insensitive, let's make it lowercase to improve readability.
56879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56880      # Now convert it back to Unix-style (cygpath)
56881      input_path=`$CYGPATH -u "$shortmode_path"`
56882      new_path="$input_path"
56883    fi
56884  fi
56885
56886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56887  if test "x$test_cygdrive_prefix" = x; then
56888    # As a simple fix, exclude /usr/bin since it's not a real path.
56889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56891      # a path prefixed by /cygdrive for fixpath to work.
56892      new_path="$CYGWIN_ROOT_PATH$input_path"
56893    fi
56894  fi
56895
56896
56897  if test "x$path" != "x$new_path"; then
56898    MSVC_DLL="$new_path"
56899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56901  fi
56902
56903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56904
56905  path="$MSVC_DLL"
56906  has_colon=`$ECHO $path | $GREP ^.:`
56907  new_path="$path"
56908  if test "x$has_colon" = x; then
56909    # Not in mixed or Windows style, start by that.
56910    new_path=`cmd //c echo $path`
56911  fi
56912
56913
56914  input_path="$new_path"
56915  # Check if we need to convert this using DOS-style short mode. If the path
56916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56917  # take no chances and rewrite it.
56918  # Note: m4 eats our [], so we need to use [ and ] instead.
56919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56920  if test "x$has_forbidden_chars" != x; then
56921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56923  fi
56924
56925
56926  windows_path="$new_path"
56927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56928    unix_path=`$CYGPATH -u "$windows_path"`
56929    new_path="$unix_path"
56930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56932    new_path="$unix_path"
56933  fi
56934
56935  if test "x$path" != "x$new_path"; then
56936    MSVC_DLL="$new_path"
56937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56938$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56939  fi
56940
56941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56943
56944    else
56945      # We're on a unix platform. Hooray! :)
56946      path="$MSVC_DLL"
56947      has_space=`$ECHO "$path" | $GREP " "`
56948      if test "x$has_space" != x; then
56949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56952      fi
56953
56954      # Use eval to expand a potential ~
56955      eval path="$path"
56956      if test ! -f "$path" && test ! -d "$path"; then
56957        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56958      fi
56959
56960      if test -d "$path"; then
56961        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56962      else
56963        dir="`$DIRNAME "$path"`"
56964        base="`$BASENAME "$path"`"
56965        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56966      fi
56967    fi
56968  fi
56969
56970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56971$as_echo_n "checking for $DLL_NAME... " >&6; }
56972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56973$as_echo "$MSVC_DLL" >&6; }
56974    else
56975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56976$as_echo "incorrect, ignoring" >&6; }
56977      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56978$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56979    fi
56980  fi
56981
56982    fi
56983  fi
56984
56985  if test "x$MSVC_DLL" = x; then
56986    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56987    # (This was the original behaviour; kept since it might turn something up)
56988    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56989      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56990        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56991	    | $GREP x64 | $HEAD --lines 1`
56992      else
56993        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56994	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56995        if test "x$POSSIBLE_MSVC_DLL" = x; then
56996          # We're grasping at straws now...
56997          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56998	      | $HEAD --lines 1`
56999        fi
57000      fi
57001
57002
57003  DLL_NAME="$DLL_NAME"
57004  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57005  METHOD="search of VCINSTALLDIR"
57006  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57007    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57008$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57009
57010    # Need to check if the found msvcr is correct architecture
57011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57012$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57013    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57015      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57016      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57017      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57018        CORRECT_MSVCR_ARCH="PE32 executable"
57019      else
57020        CORRECT_MSVCR_ARCH="PE32+ executable"
57021      fi
57022    else
57023      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57024        CORRECT_MSVCR_ARCH=386
57025      else
57026        CORRECT_MSVCR_ARCH=x86-64
57027      fi
57028    fi
57029    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57031$as_echo "ok" >&6; }
57032      MSVC_DLL="$POSSIBLE_MSVC_DLL"
57033
57034  # Only process if variable expands to non-empty
57035
57036  if test "x$MSVC_DLL" != x; then
57037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57038
57039  # Input might be given as Windows format, start by converting to
57040  # unix format.
57041  path="$MSVC_DLL"
57042  new_path=`$CYGPATH -u "$path"`
57043
57044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57047  # "foo.exe" is OK but "foo" is an error.
57048  #
57049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57050  # It is also a way to make sure we got the proper file name for the real test later on.
57051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57052  if test "x$test_shortpath" = x; then
57053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57054$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57055    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57056  fi
57057
57058  # Call helper function which possibly converts this using DOS-style short mode.
57059  # If so, the updated path is stored in $new_path.
57060
57061  input_path="$new_path"
57062  # Check if we need to convert this using DOS-style short mode. If the path
57063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57064  # take no chances and rewrite it.
57065  # Note: m4 eats our [], so we need to use [ and ] instead.
57066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57067  if test "x$has_forbidden_chars" != x; then
57068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57072      # Going to short mode and back again did indeed matter. Since short mode is
57073      # case insensitive, let's make it lowercase to improve readability.
57074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57075      # Now convert it back to Unix-style (cygpath)
57076      input_path=`$CYGPATH -u "$shortmode_path"`
57077      new_path="$input_path"
57078    fi
57079  fi
57080
57081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57082  if test "x$test_cygdrive_prefix" = x; then
57083    # As a simple fix, exclude /usr/bin since it's not a real path.
57084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57086      # a path prefixed by /cygdrive for fixpath to work.
57087      new_path="$CYGWIN_ROOT_PATH$input_path"
57088    fi
57089  fi
57090
57091
57092  if test "x$path" != "x$new_path"; then
57093    MSVC_DLL="$new_path"
57094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57095$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57096  fi
57097
57098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57099
57100  path="$MSVC_DLL"
57101  has_colon=`$ECHO $path | $GREP ^.:`
57102  new_path="$path"
57103  if test "x$has_colon" = x; then
57104    # Not in mixed or Windows style, start by that.
57105    new_path=`cmd //c echo $path`
57106  fi
57107
57108
57109  input_path="$new_path"
57110  # Check if we need to convert this using DOS-style short mode. If the path
57111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57112  # take no chances and rewrite it.
57113  # Note: m4 eats our [], so we need to use [ and ] instead.
57114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57115  if test "x$has_forbidden_chars" != x; then
57116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57118  fi
57119
57120
57121  windows_path="$new_path"
57122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57123    unix_path=`$CYGPATH -u "$windows_path"`
57124    new_path="$unix_path"
57125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57127    new_path="$unix_path"
57128  fi
57129
57130  if test "x$path" != "x$new_path"; then
57131    MSVC_DLL="$new_path"
57132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57133$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57134  fi
57135
57136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57138
57139    else
57140      # We're on a unix platform. Hooray! :)
57141      path="$MSVC_DLL"
57142      has_space=`$ECHO "$path" | $GREP " "`
57143      if test "x$has_space" != x; then
57144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57145$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57147      fi
57148
57149      # Use eval to expand a potential ~
57150      eval path="$path"
57151      if test ! -f "$path" && test ! -d "$path"; then
57152        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57153      fi
57154
57155      if test -d "$path"; then
57156        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57157      else
57158        dir="`$DIRNAME "$path"`"
57159        base="`$BASENAME "$path"`"
57160        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57161      fi
57162    fi
57163  fi
57164
57165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57166$as_echo_n "checking for $DLL_NAME... " >&6; }
57167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57168$as_echo "$MSVC_DLL" >&6; }
57169    else
57170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57171$as_echo "incorrect, ignoring" >&6; }
57172      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57173$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57174    fi
57175  fi
57176
57177    fi
57178  fi
57179
57180  if test "x$MSVC_DLL" = x; then
57181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57182$as_echo_n "checking for $DLL_NAME... " >&6; }
57183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57184$as_echo "no" >&6; }
57185    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57186  fi
57187
57188      MSVCP_DLL="$MSVC_DLL"
57189    fi
57190
57191  fi
57192
57193  fi
57194
57195
57196  if test "x$NEEDS_LIB_X11" = xfalse; then
57197    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57198      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57199$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57200    fi
57201    X_CFLAGS=
57202    X_LIBS=
57203  else
57204
57205    if test "x${with_x}" = xno; then
57206      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57207    fi
57208
57209    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57210      # The user has specified a X11 base directory. Use it for includes and
57211      # libraries, unless explicitly overridden.
57212      if test "x$x_includes" = xNONE; then
57213        x_includes="${with_x}/include"
57214      fi
57215      if test "x$x_libraries" = xNONE; then
57216        x_libraries="${with_x}/lib"
57217      fi
57218    else
57219      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57220      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57221      # --x-libraries for the sysroot, if that seems to be correct.
57222      if test "x$SYSROOT" != "x"; then
57223        if test "x$x_includes" = xNONE; then
57224          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57225            x_includes="$SYSROOT/usr/X11R6/include"
57226          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57227            x_includes="$SYSROOT/usr/include"
57228          fi
57229        fi
57230        if test "x$x_libraries" = xNONE; then
57231          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57232            x_libraries="$SYSROOT/usr/X11R6/lib"
57233          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57234            x_libraries="$SYSROOT/usr/lib64"
57235          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57236            x_libraries="$SYSROOT/usr/lib"
57237          fi
57238        fi
57239      fi
57240    fi
57241
57242    # Now let autoconf do it's magic
57243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57244$as_echo_n "checking for X... " >&6; }
57245
57246
57247# Check whether --with-x was given.
57248if test "${with_x+set}" = set; then :
57249  withval=$with_x;
57250fi
57251
57252# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57253if test "x$with_x" = xno; then
57254  # The user explicitly disabled X.
57255  have_x=disabled
57256else
57257  case $x_includes,$x_libraries in #(
57258    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57259    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57260  $as_echo_n "(cached) " >&6
57261else
57262  # One or both of the vars are not set, and there is no cached value.
57263ac_x_includes=no ac_x_libraries=no
57264rm -f -r conftest.dir
57265if mkdir conftest.dir; then
57266  cd conftest.dir
57267  cat >Imakefile <<'_ACEOF'
57268incroot:
57269	@echo incroot='${INCROOT}'
57270usrlibdir:
57271	@echo usrlibdir='${USRLIBDIR}'
57272libdir:
57273	@echo libdir='${LIBDIR}'
57274_ACEOF
57275  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57276    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57277    for ac_var in incroot usrlibdir libdir; do
57278      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57279    done
57280    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57281    for ac_extension in a so sl dylib la dll; do
57282      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57283	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57284	ac_im_usrlibdir=$ac_im_libdir; break
57285      fi
57286    done
57287    # Screen out bogus values from the imake configuration.  They are
57288    # bogus both because they are the default anyway, and because
57289    # using them would break gcc on systems where it needs fixed includes.
57290    case $ac_im_incroot in
57291	/usr/include) ac_x_includes= ;;
57292	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57293    esac
57294    case $ac_im_usrlibdir in
57295	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57296	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57297    esac
57298  fi
57299  cd ..
57300  rm -f -r conftest.dir
57301fi
57302
57303# Standard set of common directories for X headers.
57304# Check X11 before X11Rn because it is often a symlink to the current release.
57305ac_x_header_dirs='
57306/usr/X11/include
57307/usr/X11R7/include
57308/usr/X11R6/include
57309/usr/X11R5/include
57310/usr/X11R4/include
57311
57312/usr/include/X11
57313/usr/include/X11R7
57314/usr/include/X11R6
57315/usr/include/X11R5
57316/usr/include/X11R4
57317
57318/usr/local/X11/include
57319/usr/local/X11R7/include
57320/usr/local/X11R6/include
57321/usr/local/X11R5/include
57322/usr/local/X11R4/include
57323
57324/usr/local/include/X11
57325/usr/local/include/X11R7
57326/usr/local/include/X11R6
57327/usr/local/include/X11R5
57328/usr/local/include/X11R4
57329
57330/usr/X386/include
57331/usr/x386/include
57332/usr/XFree86/include/X11
57333
57334/usr/include
57335/usr/local/include
57336/usr/unsupported/include
57337/usr/athena/include
57338/usr/local/x11r5/include
57339/usr/lpp/Xamples/include
57340
57341/usr/openwin/include
57342/usr/openwin/share/include'
57343
57344if test "$ac_x_includes" = no; then
57345  # Guess where to find include files, by looking for Xlib.h.
57346  # First, try using that file with no special directory specified.
57347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57348/* end confdefs.h.  */
57349#include <X11/Xlib.h>
57350_ACEOF
57351if ac_fn_cxx_try_cpp "$LINENO"; then :
57352  # We can compile using X headers with no special include directory.
57353ac_x_includes=
57354else
57355  for ac_dir in $ac_x_header_dirs; do
57356  if test -r "$ac_dir/X11/Xlib.h"; then
57357    ac_x_includes=$ac_dir
57358    break
57359  fi
57360done
57361fi
57362rm -f conftest.err conftest.i conftest.$ac_ext
57363fi # $ac_x_includes = no
57364
57365if test "$ac_x_libraries" = no; then
57366  # Check for the libraries.
57367  # See if we find them without any special options.
57368  # Don't add to $LIBS permanently.
57369  ac_save_LIBS=$LIBS
57370  LIBS="-lX11 $LIBS"
57371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57372/* end confdefs.h.  */
57373#include <X11/Xlib.h>
57374int
57375main ()
57376{
57377XrmInitialize ()
57378  ;
57379  return 0;
57380}
57381_ACEOF
57382if ac_fn_cxx_try_link "$LINENO"; then :
57383  LIBS=$ac_save_LIBS
57384# We can link X programs with no special library path.
57385ac_x_libraries=
57386else
57387  LIBS=$ac_save_LIBS
57388for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57389do
57390  # Don't even attempt the hair of trying to link an X program!
57391  for ac_extension in a so sl dylib la dll; do
57392    if test -r "$ac_dir/libX11.$ac_extension"; then
57393      ac_x_libraries=$ac_dir
57394      break 2
57395    fi
57396  done
57397done
57398fi
57399rm -f core conftest.err conftest.$ac_objext \
57400    conftest$ac_exeext conftest.$ac_ext
57401fi # $ac_x_libraries = no
57402
57403case $ac_x_includes,$ac_x_libraries in #(
57404  no,* | *,no | *\'*)
57405    # Didn't find X, or a directory has "'" in its name.
57406    ac_cv_have_x="have_x=no";; #(
57407  *)
57408    # Record where we found X for the cache.
57409    ac_cv_have_x="have_x=yes\
57410	ac_x_includes='$ac_x_includes'\
57411	ac_x_libraries='$ac_x_libraries'"
57412esac
57413fi
57414;; #(
57415    *) have_x=yes;;
57416  esac
57417  eval "$ac_cv_have_x"
57418fi # $with_x != no
57419
57420if test "$have_x" != yes; then
57421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57422$as_echo "$have_x" >&6; }
57423  no_x=yes
57424else
57425  # If each of the values was on the command line, it overrides each guess.
57426  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57427  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57428  # Update the cache value to reflect the command line values.
57429  ac_cv_have_x="have_x=yes\
57430	ac_x_includes='$x_includes'\
57431	ac_x_libraries='$x_libraries'"
57432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57433$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57434fi
57435
57436    if test "$no_x" = yes; then
57437  # Not all programs may use this symbol, but it does not hurt to define it.
57438
57439$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57440
57441  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57442else
57443  if test -n "$x_includes"; then
57444    X_CFLAGS="$X_CFLAGS -I$x_includes"
57445  fi
57446
57447  # It would also be nice to do this for all -L options, not just this one.
57448  if test -n "$x_libraries"; then
57449    X_LIBS="$X_LIBS -L$x_libraries"
57450    # For Solaris; some versions of Sun CC require a space after -R and
57451    # others require no space.  Words are not sufficient . . . .
57452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57453$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57454    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57455    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57456    ac_cxx_werror_flag=yes
57457    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57458/* end confdefs.h.  */
57459
57460int
57461main ()
57462{
57463
57464  ;
57465  return 0;
57466}
57467_ACEOF
57468if ac_fn_cxx_try_link "$LINENO"; then :
57469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57470$as_echo "no" >&6; }
57471       X_LIBS="$X_LIBS -R$x_libraries"
57472else
57473  LIBS="$ac_xsave_LIBS -R $x_libraries"
57474       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57475/* end confdefs.h.  */
57476
57477int
57478main ()
57479{
57480
57481  ;
57482  return 0;
57483}
57484_ACEOF
57485if ac_fn_cxx_try_link "$LINENO"; then :
57486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57487$as_echo "yes" >&6; }
57488	  X_LIBS="$X_LIBS -R $x_libraries"
57489else
57490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57491$as_echo "neither works" >&6; }
57492fi
57493rm -f core conftest.err conftest.$ac_objext \
57494    conftest$ac_exeext conftest.$ac_ext
57495fi
57496rm -f core conftest.err conftest.$ac_objext \
57497    conftest$ac_exeext conftest.$ac_ext
57498    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57499    LIBS=$ac_xsave_LIBS
57500  fi
57501
57502  # Check for system-dependent libraries X programs must link with.
57503  # Do this before checking for the system-independent R6 libraries
57504  # (-lICE), since we may need -lsocket or whatever for X linking.
57505
57506  if test "$ISC" = yes; then
57507    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57508  else
57509    # Martyn Johnson says this is needed for Ultrix, if the X
57510    # libraries were built with DECnet support.  And Karl Berry says
57511    # the Alpha needs dnet_stub (dnet does not exist).
57512    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57513    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57514/* end confdefs.h.  */
57515
57516/* Override any GCC internal prototype to avoid an error.
57517   Use char because int might match the return type of a GCC
57518   builtin and then its argument prototype would still apply.  */
57519#ifdef __cplusplus
57520extern "C"
57521#endif
57522char XOpenDisplay ();
57523int
57524main ()
57525{
57526return XOpenDisplay ();
57527  ;
57528  return 0;
57529}
57530_ACEOF
57531if ac_fn_cxx_try_link "$LINENO"; then :
57532
57533else
57534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57535$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57536if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57537  $as_echo_n "(cached) " >&6
57538else
57539  ac_check_lib_save_LIBS=$LIBS
57540LIBS="-ldnet  $LIBS"
57541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57542/* end confdefs.h.  */
57543
57544/* Override any GCC internal prototype to avoid an error.
57545   Use char because int might match the return type of a GCC
57546   builtin and then its argument prototype would still apply.  */
57547#ifdef __cplusplus
57548extern "C"
57549#endif
57550char dnet_ntoa ();
57551int
57552main ()
57553{
57554return dnet_ntoa ();
57555  ;
57556  return 0;
57557}
57558_ACEOF
57559if ac_fn_cxx_try_link "$LINENO"; then :
57560  ac_cv_lib_dnet_dnet_ntoa=yes
57561else
57562  ac_cv_lib_dnet_dnet_ntoa=no
57563fi
57564rm -f core conftest.err conftest.$ac_objext \
57565    conftest$ac_exeext conftest.$ac_ext
57566LIBS=$ac_check_lib_save_LIBS
57567fi
57568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57569$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57570if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57571  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57572fi
57573
57574    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57576$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57577if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57578  $as_echo_n "(cached) " >&6
57579else
57580  ac_check_lib_save_LIBS=$LIBS
57581LIBS="-ldnet_stub  $LIBS"
57582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57583/* end confdefs.h.  */
57584
57585/* Override any GCC internal prototype to avoid an error.
57586   Use char because int might match the return type of a GCC
57587   builtin and then its argument prototype would still apply.  */
57588#ifdef __cplusplus
57589extern "C"
57590#endif
57591char dnet_ntoa ();
57592int
57593main ()
57594{
57595return dnet_ntoa ();
57596  ;
57597  return 0;
57598}
57599_ACEOF
57600if ac_fn_cxx_try_link "$LINENO"; then :
57601  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57602else
57603  ac_cv_lib_dnet_stub_dnet_ntoa=no
57604fi
57605rm -f core conftest.err conftest.$ac_objext \
57606    conftest$ac_exeext conftest.$ac_ext
57607LIBS=$ac_check_lib_save_LIBS
57608fi
57609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57610$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57611if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57612  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57613fi
57614
57615    fi
57616fi
57617rm -f core conftest.err conftest.$ac_objext \
57618    conftest$ac_exeext conftest.$ac_ext
57619    LIBS="$ac_xsave_LIBS"
57620
57621    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57622    # to get the SysV transport functions.
57623    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57624    # needs -lnsl.
57625    # The nsl library prevents programs from opening the X display
57626    # on Irix 5.2, according to T.E. Dickey.
57627    # The functions gethostbyname, getservbyname, and inet_addr are
57628    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57629    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57630if test "x$ac_cv_func_gethostbyname" = xyes; then :
57631
57632fi
57633
57634    if test $ac_cv_func_gethostbyname = no; then
57635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57636$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57637if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57638  $as_echo_n "(cached) " >&6
57639else
57640  ac_check_lib_save_LIBS=$LIBS
57641LIBS="-lnsl  $LIBS"
57642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57643/* end confdefs.h.  */
57644
57645/* Override any GCC internal prototype to avoid an error.
57646   Use char because int might match the return type of a GCC
57647   builtin and then its argument prototype would still apply.  */
57648#ifdef __cplusplus
57649extern "C"
57650#endif
57651char gethostbyname ();
57652int
57653main ()
57654{
57655return gethostbyname ();
57656  ;
57657  return 0;
57658}
57659_ACEOF
57660if ac_fn_cxx_try_link "$LINENO"; then :
57661  ac_cv_lib_nsl_gethostbyname=yes
57662else
57663  ac_cv_lib_nsl_gethostbyname=no
57664fi
57665rm -f core conftest.err conftest.$ac_objext \
57666    conftest$ac_exeext conftest.$ac_ext
57667LIBS=$ac_check_lib_save_LIBS
57668fi
57669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57670$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57671if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57672  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57673fi
57674
57675      if test $ac_cv_lib_nsl_gethostbyname = no; then
57676	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57677$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57678if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57679  $as_echo_n "(cached) " >&6
57680else
57681  ac_check_lib_save_LIBS=$LIBS
57682LIBS="-lbsd  $LIBS"
57683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57684/* end confdefs.h.  */
57685
57686/* Override any GCC internal prototype to avoid an error.
57687   Use char because int might match the return type of a GCC
57688   builtin and then its argument prototype would still apply.  */
57689#ifdef __cplusplus
57690extern "C"
57691#endif
57692char gethostbyname ();
57693int
57694main ()
57695{
57696return gethostbyname ();
57697  ;
57698  return 0;
57699}
57700_ACEOF
57701if ac_fn_cxx_try_link "$LINENO"; then :
57702  ac_cv_lib_bsd_gethostbyname=yes
57703else
57704  ac_cv_lib_bsd_gethostbyname=no
57705fi
57706rm -f core conftest.err conftest.$ac_objext \
57707    conftest$ac_exeext conftest.$ac_ext
57708LIBS=$ac_check_lib_save_LIBS
57709fi
57710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57711$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57712if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57713  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57714fi
57715
57716      fi
57717    fi
57718
57719    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57720    # socket/setsockopt and other routines are undefined under SCO ODT
57721    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57722    # on later versions), says Simon Leinen: it contains gethostby*
57723    # variants that don't use the name server (or something).  -lsocket
57724    # must be given before -lnsl if both are needed.  We assume that
57725    # if connect needs -lnsl, so does gethostbyname.
57726    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57727if test "x$ac_cv_func_connect" = xyes; then :
57728
57729fi
57730
57731    if test $ac_cv_func_connect = no; then
57732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57733$as_echo_n "checking for connect in -lsocket... " >&6; }
57734if ${ac_cv_lib_socket_connect+:} false; then :
57735  $as_echo_n "(cached) " >&6
57736else
57737  ac_check_lib_save_LIBS=$LIBS
57738LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57740/* end confdefs.h.  */
57741
57742/* Override any GCC internal prototype to avoid an error.
57743   Use char because int might match the return type of a GCC
57744   builtin and then its argument prototype would still apply.  */
57745#ifdef __cplusplus
57746extern "C"
57747#endif
57748char connect ();
57749int
57750main ()
57751{
57752return connect ();
57753  ;
57754  return 0;
57755}
57756_ACEOF
57757if ac_fn_cxx_try_link "$LINENO"; then :
57758  ac_cv_lib_socket_connect=yes
57759else
57760  ac_cv_lib_socket_connect=no
57761fi
57762rm -f core conftest.err conftest.$ac_objext \
57763    conftest$ac_exeext conftest.$ac_ext
57764LIBS=$ac_check_lib_save_LIBS
57765fi
57766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57767$as_echo "$ac_cv_lib_socket_connect" >&6; }
57768if test "x$ac_cv_lib_socket_connect" = xyes; then :
57769  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57770fi
57771
57772    fi
57773
57774    # Guillermo Gomez says -lposix is necessary on A/UX.
57775    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57776if test "x$ac_cv_func_remove" = xyes; then :
57777
57778fi
57779
57780    if test $ac_cv_func_remove = no; then
57781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57782$as_echo_n "checking for remove in -lposix... " >&6; }
57783if ${ac_cv_lib_posix_remove+:} false; then :
57784  $as_echo_n "(cached) " >&6
57785else
57786  ac_check_lib_save_LIBS=$LIBS
57787LIBS="-lposix  $LIBS"
57788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57789/* end confdefs.h.  */
57790
57791/* Override any GCC internal prototype to avoid an error.
57792   Use char because int might match the return type of a GCC
57793   builtin and then its argument prototype would still apply.  */
57794#ifdef __cplusplus
57795extern "C"
57796#endif
57797char remove ();
57798int
57799main ()
57800{
57801return remove ();
57802  ;
57803  return 0;
57804}
57805_ACEOF
57806if ac_fn_cxx_try_link "$LINENO"; then :
57807  ac_cv_lib_posix_remove=yes
57808else
57809  ac_cv_lib_posix_remove=no
57810fi
57811rm -f core conftest.err conftest.$ac_objext \
57812    conftest$ac_exeext conftest.$ac_ext
57813LIBS=$ac_check_lib_save_LIBS
57814fi
57815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57816$as_echo "$ac_cv_lib_posix_remove" >&6; }
57817if test "x$ac_cv_lib_posix_remove" = xyes; then :
57818  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57819fi
57820
57821    fi
57822
57823    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57824    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57825if test "x$ac_cv_func_shmat" = xyes; then :
57826
57827fi
57828
57829    if test $ac_cv_func_shmat = no; then
57830      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57831$as_echo_n "checking for shmat in -lipc... " >&6; }
57832if ${ac_cv_lib_ipc_shmat+:} false; then :
57833  $as_echo_n "(cached) " >&6
57834else
57835  ac_check_lib_save_LIBS=$LIBS
57836LIBS="-lipc  $LIBS"
57837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57838/* end confdefs.h.  */
57839
57840/* Override any GCC internal prototype to avoid an error.
57841   Use char because int might match the return type of a GCC
57842   builtin and then its argument prototype would still apply.  */
57843#ifdef __cplusplus
57844extern "C"
57845#endif
57846char shmat ();
57847int
57848main ()
57849{
57850return shmat ();
57851  ;
57852  return 0;
57853}
57854_ACEOF
57855if ac_fn_cxx_try_link "$LINENO"; then :
57856  ac_cv_lib_ipc_shmat=yes
57857else
57858  ac_cv_lib_ipc_shmat=no
57859fi
57860rm -f core conftest.err conftest.$ac_objext \
57861    conftest$ac_exeext conftest.$ac_ext
57862LIBS=$ac_check_lib_save_LIBS
57863fi
57864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57865$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57866if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57867  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57868fi
57869
57870    fi
57871  fi
57872
57873  # Check for libraries that X11R6 Xt/Xaw programs need.
57874  ac_save_LDFLAGS=$LDFLAGS
57875  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57876  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57877  # check for ICE first), but we must link in the order -lSM -lICE or
57878  # we get undefined symbols.  So assume we have SM if we have ICE.
57879  # These have to be linked with before -lX11, unlike the other
57880  # libraries we check for below, so use a different variable.
57881  # John Interrante, Karl Berry
57882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57883$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57884if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57885  $as_echo_n "(cached) " >&6
57886else
57887  ac_check_lib_save_LIBS=$LIBS
57888LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57890/* end confdefs.h.  */
57891
57892/* Override any GCC internal prototype to avoid an error.
57893   Use char because int might match the return type of a GCC
57894   builtin and then its argument prototype would still apply.  */
57895#ifdef __cplusplus
57896extern "C"
57897#endif
57898char IceConnectionNumber ();
57899int
57900main ()
57901{
57902return IceConnectionNumber ();
57903  ;
57904  return 0;
57905}
57906_ACEOF
57907if ac_fn_cxx_try_link "$LINENO"; then :
57908  ac_cv_lib_ICE_IceConnectionNumber=yes
57909else
57910  ac_cv_lib_ICE_IceConnectionNumber=no
57911fi
57912rm -f core conftest.err conftest.$ac_objext \
57913    conftest$ac_exeext conftest.$ac_ext
57914LIBS=$ac_check_lib_save_LIBS
57915fi
57916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57917$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57918if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57919  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57920fi
57921
57922  LDFLAGS=$ac_save_LDFLAGS
57923
57924fi
57925
57926
57927    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57928    # this doesn't make sense so we remove it.
57929    if test "x$COMPILE_TYPE" = xcross; then
57930      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57931    fi
57932
57933    if test "x$no_x" = xyes; then
57934
57935  # Print a helpful message on how to acquire the necessary build dependency.
57936  # x11 is the help tag: freetype, cups, alsa etc
57937  MISSING_DEPENDENCY=x11
57938
57939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57940    cygwin_help $MISSING_DEPENDENCY
57941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57942    msys_help $MISSING_DEPENDENCY
57943  else
57944    PKGHANDLER_COMMAND=
57945
57946    case $PKGHANDLER in
57947      apt-get)
57948        apt_help     $MISSING_DEPENDENCY ;;
57949      yum)
57950        yum_help     $MISSING_DEPENDENCY ;;
57951      brew)
57952        brew_help    $MISSING_DEPENDENCY ;;
57953      port)
57954        port_help    $MISSING_DEPENDENCY ;;
57955      pkgutil)
57956        pkgutil_help $MISSING_DEPENDENCY ;;
57957      pkgadd)
57958        pkgadd_help  $MISSING_DEPENDENCY ;;
57959    esac
57960
57961    if test "x$PKGHANDLER_COMMAND" != x; then
57962      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57963    fi
57964  fi
57965
57966      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57967    fi
57968
57969    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57970      OPENWIN_HOME="/usr/openwin"
57971      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57972      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57973          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57974    fi
57975
57976    ac_ext=c
57977ac_cpp='$CPP $CPPFLAGS'
57978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57980ac_compiler_gnu=$ac_cv_c_compiler_gnu
57981
57982    OLD_CFLAGS="$CFLAGS"
57983    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57984
57985    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57986    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57987do :
57988  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57989ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57990          # include <X11/Xlib.h>
57991          # include <X11/Xutil.h>
57992
57993
57994"
57995if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57996  cat >>confdefs.h <<_ACEOF
57997#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57998_ACEOF
57999 X11_HEADERS_OK=yes
58000else
58001  X11_HEADERS_OK=no; break
58002fi
58003
58004done
58005
58006
58007    if test "x$X11_HEADERS_OK" = xno; then
58008
58009  # Print a helpful message on how to acquire the necessary build dependency.
58010  # x11 is the help tag: freetype, cups, alsa etc
58011  MISSING_DEPENDENCY=x11
58012
58013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58014    cygwin_help $MISSING_DEPENDENCY
58015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58016    msys_help $MISSING_DEPENDENCY
58017  else
58018    PKGHANDLER_COMMAND=
58019
58020    case $PKGHANDLER in
58021      apt-get)
58022        apt_help     $MISSING_DEPENDENCY ;;
58023      yum)
58024        yum_help     $MISSING_DEPENDENCY ;;
58025      brew)
58026        brew_help    $MISSING_DEPENDENCY ;;
58027      port)
58028        port_help    $MISSING_DEPENDENCY ;;
58029      pkgutil)
58030        pkgutil_help $MISSING_DEPENDENCY ;;
58031      pkgadd)
58032        pkgadd_help  $MISSING_DEPENDENCY ;;
58033    esac
58034
58035    if test "x$PKGHANDLER_COMMAND" != x; then
58036      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58037    fi
58038  fi
58039
58040      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58041    fi
58042
58043    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58044    # defined in libawt_xawt.
58045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58046$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58047    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58048/* end confdefs.h.  */
58049#include <X11/extensions/Xrender.h>
58050int
58051main ()
58052{
58053XLinearGradient x;
58054  ;
58055  return 0;
58056}
58057_ACEOF
58058if ac_fn_c_try_compile "$LINENO"; then :
58059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58060$as_echo "yes" >&6; }
58061else
58062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58063$as_echo "no" >&6; }
58064         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58065fi
58066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58067
58068    CFLAGS="$OLD_CFLAGS"
58069    ac_ext=cpp
58070ac_cpp='$CXXCPP $CPPFLAGS'
58071ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58072ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58073ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58074
58075  fi # NEEDS_LIB_X11
58076
58077
58078
58079
58080
58081
58082# Check whether --with-cups was given.
58083if test "${with_cups+set}" = set; then :
58084  withval=$with_cups;
58085fi
58086
58087
58088# Check whether --with-cups-include was given.
58089if test "${with_cups_include+set}" = set; then :
58090  withval=$with_cups_include;
58091fi
58092
58093
58094  if test "x$NEEDS_LIB_CUPS" = xfalse; then
58095    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58096        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58097      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58098$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58099    fi
58100    CUPS_CFLAGS=
58101  else
58102    CUPS_FOUND=no
58103
58104    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58105      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58106    fi
58107
58108    if test "x${with_cups}" != x; then
58109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58110$as_echo_n "checking for cups headers... " >&6; }
58111      if test -s "${with_cups}/include/cups/cups.h"; then
58112        CUPS_CFLAGS="-I${with_cups}/include"
58113        CUPS_FOUND=yes
58114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58115$as_echo "$CUPS_FOUND" >&6; }
58116      else
58117        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58118      fi
58119    fi
58120    if test "x${with_cups_include}" != x; then
58121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58122$as_echo_n "checking for cups headers... " >&6; }
58123      if test -s "${with_cups_include}/cups/cups.h"; then
58124        CUPS_CFLAGS="-I${with_cups_include}"
58125        CUPS_FOUND=yes
58126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58127$as_echo "$CUPS_FOUND" >&6; }
58128      else
58129        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58130      fi
58131    fi
58132    if test "x$CUPS_FOUND" = xno; then
58133      # Are the cups headers installed in the default /usr/include location?
58134      for ac_header in cups/cups.h cups/ppd.h
58135do :
58136  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58137ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58138if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58139  cat >>confdefs.h <<_ACEOF
58140#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58141_ACEOF
58142
58143          CUPS_FOUND=yes
58144          CUPS_CFLAGS=
58145          DEFAULT_CUPS=yes
58146
58147fi
58148
58149done
58150
58151    fi
58152    if test "x$CUPS_FOUND" = xno; then
58153
58154  # Print a helpful message on how to acquire the necessary build dependency.
58155  # cups is the help tag: freetype, cups, alsa etc
58156  MISSING_DEPENDENCY=cups
58157
58158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58159    cygwin_help $MISSING_DEPENDENCY
58160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58161    msys_help $MISSING_DEPENDENCY
58162  else
58163    PKGHANDLER_COMMAND=
58164
58165    case $PKGHANDLER in
58166      apt-get)
58167        apt_help     $MISSING_DEPENDENCY ;;
58168      yum)
58169        yum_help     $MISSING_DEPENDENCY ;;
58170      brew)
58171        brew_help    $MISSING_DEPENDENCY ;;
58172      port)
58173        port_help    $MISSING_DEPENDENCY ;;
58174      pkgutil)
58175        pkgutil_help $MISSING_DEPENDENCY ;;
58176      pkgadd)
58177        pkgadd_help  $MISSING_DEPENDENCY ;;
58178    esac
58179
58180    if test "x$PKGHANDLER_COMMAND" != x; then
58181      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58182    fi
58183  fi
58184
58185      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58186    fi
58187  fi
58188
58189
58190
58191
58192
58193# Check whether --with-freetype was given.
58194if test "${with_freetype+set}" = set; then :
58195  withval=$with_freetype;
58196fi
58197
58198
58199# Check whether --with-freetype-include was given.
58200if test "${with_freetype_include+set}" = set; then :
58201  withval=$with_freetype_include;
58202fi
58203
58204
58205# Check whether --with-freetype-lib was given.
58206if test "${with_freetype_lib+set}" = set; then :
58207  withval=$with_freetype_lib;
58208fi
58209
58210
58211# Check whether --with-freetype-src was given.
58212if test "${with_freetype_src+set}" = set; then :
58213  withval=$with_freetype_src;
58214fi
58215
58216  # Check whether --enable-freetype-bundling was given.
58217if test "${enable_freetype_bundling+set}" = set; then :
58218  enableval=$enable_freetype_bundling;
58219fi
58220
58221
58222# Check whether --with-freetype-license was given.
58223if test "${with_freetype_license+set}" = set; then :
58224  withval=$with_freetype_license;
58225fi
58226
58227
58228  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58229  FREETYPE_BASE_NAME=freetype
58230  FREETYPE_CFLAGS=
58231  FREETYPE_LIBS=
58232  FREETYPE_BUNDLE_LIB_PATH=
58233
58234  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58235    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58236        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58237        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58238        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58239      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58240$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58241    fi
58242    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58243      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58244$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58245    fi
58246  else
58247    # freetype is needed to build; go get it!
58248
58249    BUNDLE_FREETYPE="$enable_freetype_bundling"
58250
58251    if  test "x$with_freetype_src" != x; then
58252      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58253        # Try to build freetype if --with-freetype-src was given on Windows
58254
58255  FREETYPE_SRC_PATH="$with_freetype_src"
58256  BUILD_FREETYPE=yes
58257
58258  # Check if the freetype sources are acessible..
58259  if ! test -d $FREETYPE_SRC_PATH; then
58260    { $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
58261$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58262    BUILD_FREETYPE=no
58263  fi
58264  # ..and contain a vc2010 project file
58265  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58266  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58267    { $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
58268$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58269    BUILD_FREETYPE=no
58270  fi
58271  # Now check if configure found a version of 'msbuild.exe'
58272  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58273    { $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
58274$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;}
58275    BUILD_FREETYPE=no
58276  fi
58277
58278  # Ready to go..
58279  if test "x$BUILD_FREETYPE" = xyes; then
58280    # msbuild requires trailing slashes for output directories
58281    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58282    freetype_lib_path_unix="$freetype_lib_path"
58283    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58284
58285  unix_path="$vcxproj_path"
58286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58287    windows_path=`$CYGPATH -m "$unix_path"`
58288    vcxproj_path="$windows_path"
58289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58290    windows_path=`cmd //c echo $unix_path`
58291    vcxproj_path="$windows_path"
58292  fi
58293
58294
58295  unix_path="$freetype_lib_path"
58296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58297    windows_path=`$CYGPATH -m "$unix_path"`
58298    freetype_lib_path="$windows_path"
58299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58300    windows_path=`cmd //c echo $unix_path`
58301    freetype_lib_path="$windows_path"
58302  fi
58303
58304
58305  unix_path="$freetype_obj_path"
58306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58307    windows_path=`$CYGPATH -m "$unix_path"`
58308    freetype_obj_path="$windows_path"
58309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58310    windows_path=`cmd //c echo $unix_path`
58311    freetype_obj_path="$windows_path"
58312  fi
58313
58314    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58315      freetype_platform=x64
58316    else
58317      freetype_platform=win32
58318    fi
58319
58320    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58321    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58322    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58323    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58324    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58325$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58326
58327    # First we try to build the freetype.dll
58328    $ECHO -e "@echo off\n"\
58329        "$MSBUILD $vcxproj_path "\
58330        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58331        "/p:Configuration=\"Release Multithreaded\" "\
58332        "/p:Platform=$freetype_platform "\
58333        "/p:ConfigurationType=DynamicLibrary "\
58334        "/p:TargetName=freetype "\
58335        "/p:OutDir=\"$freetype_lib_path\" "\
58336        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58337    cmd /c freetype.bat
58338
58339    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58340      # If that succeeds we also build freetype.lib
58341      $ECHO -e "@echo off\n"\
58342          "$MSBUILD $vcxproj_path "\
58343          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58344          "/p:Configuration=\"Release Multithreaded\" "\
58345          "/p:Platform=$freetype_platform "\
58346          "/p:ConfigurationType=StaticLibrary "\
58347          "/p:TargetName=freetype "\
58348          "/p:OutDir=\"$freetype_lib_path\" "\
58349          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58350      cmd /c freetype.bat
58351
58352      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58353        # Once we build both, lib and dll, set freetype lib and include path appropriately
58354        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58355        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58356        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58357$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58358      else
58359        BUILD_FREETYPE=no
58360      fi
58361    else
58362      BUILD_FREETYPE=no
58363    fi
58364  fi
58365
58366        if test "x$BUILD_FREETYPE" = xyes; then
58367          # Okay, we built it. Check that it works.
58368
58369  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58370  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58371  METHOD="--with-freetype-src"
58372
58373  # Let's start with an optimistic view of the world :-)
58374  FOUND_FREETYPE=yes
58375
58376  # First look for the canonical freetype main include file ft2build.h.
58377  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58378    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58379    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58380    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58381      # Fail.
58382      FOUND_FREETYPE=no
58383    fi
58384  fi
58385
58386  if test "x$FOUND_FREETYPE" = xyes; then
58387    # Include file found, let's continue the sanity check.
58388    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58389$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58390
58391    # Reset to default value
58392    FREETYPE_BASE_NAME=freetype
58393    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58394    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58395      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58396          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58397        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58398        # for the .6 version explicitly.
58399        FREETYPE_BASE_NAME=freetype.6
58400        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58401        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58402$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58403      else
58404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58405$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58406        FOUND_FREETYPE=no
58407      fi
58408    else
58409      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58410        # On Windows, we will need both .lib and .dll file.
58411        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58412          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58413$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58414          FOUND_FREETYPE=no
58415        fi
58416      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58417          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58418        # Found lib in isa dir, use that instead.
58419        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58420        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58421$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58422      fi
58423    fi
58424  fi
58425
58426  if test "x$FOUND_FREETYPE" = xyes; then
58427
58428  # Only process if variable expands to non-empty
58429
58430  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58432
58433  # Input might be given as Windows format, start by converting to
58434  # unix format.
58435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58436  new_path=`$CYGPATH -u "$path"`
58437
58438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58441  # "foo.exe" is OK but "foo" is an error.
58442  #
58443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58444  # It is also a way to make sure we got the proper file name for the real test later on.
58445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58446  if test "x$test_shortpath" = x; then
58447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58448$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58449    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58450  fi
58451
58452  # Call helper function which possibly converts this using DOS-style short mode.
58453  # If so, the updated path is stored in $new_path.
58454
58455  input_path="$new_path"
58456  # Check if we need to convert this using DOS-style short mode. If the path
58457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58458  # take no chances and rewrite it.
58459  # Note: m4 eats our [], so we need to use [ and ] instead.
58460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58461  if test "x$has_forbidden_chars" != x; then
58462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58466      # Going to short mode and back again did indeed matter. Since short mode is
58467      # case insensitive, let's make it lowercase to improve readability.
58468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58469      # Now convert it back to Unix-style (cygpath)
58470      input_path=`$CYGPATH -u "$shortmode_path"`
58471      new_path="$input_path"
58472    fi
58473  fi
58474
58475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58476  if test "x$test_cygdrive_prefix" = x; then
58477    # As a simple fix, exclude /usr/bin since it's not a real path.
58478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58480      # a path prefixed by /cygdrive for fixpath to work.
58481      new_path="$CYGWIN_ROOT_PATH$input_path"
58482    fi
58483  fi
58484
58485
58486  if test "x$path" != "x$new_path"; then
58487    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58489$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58490  fi
58491
58492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58493
58494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58495  has_colon=`$ECHO $path | $GREP ^.:`
58496  new_path="$path"
58497  if test "x$has_colon" = x; then
58498    # Not in mixed or Windows style, start by that.
58499    new_path=`cmd //c echo $path`
58500  fi
58501
58502
58503  input_path="$new_path"
58504  # Check if we need to convert this using DOS-style short mode. If the path
58505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58506  # take no chances and rewrite it.
58507  # Note: m4 eats our [], so we need to use [ and ] instead.
58508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58509  if test "x$has_forbidden_chars" != x; then
58510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58512  fi
58513
58514
58515  windows_path="$new_path"
58516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58517    unix_path=`$CYGPATH -u "$windows_path"`
58518    new_path="$unix_path"
58519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58521    new_path="$unix_path"
58522  fi
58523
58524  if test "x$path" != "x$new_path"; then
58525    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58527$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58528  fi
58529
58530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58532
58533    else
58534      # We're on a unix platform. Hooray! :)
58535      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58536      has_space=`$ECHO "$path" | $GREP " "`
58537      if test "x$has_space" != x; then
58538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58541      fi
58542
58543      # Use eval to expand a potential ~
58544      eval path="$path"
58545      if test ! -f "$path" && test ! -d "$path"; then
58546        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58547      fi
58548
58549      if test -d "$path"; then
58550        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58551      else
58552        dir="`$DIRNAME "$path"`"
58553        base="`$BASENAME "$path"`"
58554        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58555      fi
58556    fi
58557  fi
58558
58559
58560  # Only process if variable expands to non-empty
58561
58562  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58564
58565  # Input might be given as Windows format, start by converting to
58566  # unix format.
58567  path="$POTENTIAL_FREETYPE_LIB_PATH"
58568  new_path=`$CYGPATH -u "$path"`
58569
58570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58573  # "foo.exe" is OK but "foo" is an error.
58574  #
58575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58576  # It is also a way to make sure we got the proper file name for the real test later on.
58577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58578  if test "x$test_shortpath" = x; then
58579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58581    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58582  fi
58583
58584  # Call helper function which possibly converts this using DOS-style short mode.
58585  # If so, the updated path is stored in $new_path.
58586
58587  input_path="$new_path"
58588  # Check if we need to convert this using DOS-style short mode. If the path
58589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58590  # take no chances and rewrite it.
58591  # Note: m4 eats our [], so we need to use [ and ] instead.
58592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58593  if test "x$has_forbidden_chars" != x; then
58594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58598      # Going to short mode and back again did indeed matter. Since short mode is
58599      # case insensitive, let's make it lowercase to improve readability.
58600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58601      # Now convert it back to Unix-style (cygpath)
58602      input_path=`$CYGPATH -u "$shortmode_path"`
58603      new_path="$input_path"
58604    fi
58605  fi
58606
58607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58608  if test "x$test_cygdrive_prefix" = x; then
58609    # As a simple fix, exclude /usr/bin since it's not a real path.
58610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58612      # a path prefixed by /cygdrive for fixpath to work.
58613      new_path="$CYGWIN_ROOT_PATH$input_path"
58614    fi
58615  fi
58616
58617
58618  if test "x$path" != "x$new_path"; then
58619    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58622  fi
58623
58624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58625
58626  path="$POTENTIAL_FREETYPE_LIB_PATH"
58627  has_colon=`$ECHO $path | $GREP ^.:`
58628  new_path="$path"
58629  if test "x$has_colon" = x; then
58630    # Not in mixed or Windows style, start by that.
58631    new_path=`cmd //c echo $path`
58632  fi
58633
58634
58635  input_path="$new_path"
58636  # Check if we need to convert this using DOS-style short mode. If the path
58637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58638  # take no chances and rewrite it.
58639  # Note: m4 eats our [], so we need to use [ and ] instead.
58640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58641  if test "x$has_forbidden_chars" != x; then
58642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58644  fi
58645
58646
58647  windows_path="$new_path"
58648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58649    unix_path=`$CYGPATH -u "$windows_path"`
58650    new_path="$unix_path"
58651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58653    new_path="$unix_path"
58654  fi
58655
58656  if test "x$path" != "x$new_path"; then
58657    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58660  fi
58661
58662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58664
58665    else
58666      # We're on a unix platform. Hooray! :)
58667      path="$POTENTIAL_FREETYPE_LIB_PATH"
58668      has_space=`$ECHO "$path" | $GREP " "`
58669      if test "x$has_space" != x; then
58670        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58672        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58673      fi
58674
58675      # Use eval to expand a potential ~
58676      eval path="$path"
58677      if test ! -f "$path" && test ! -d "$path"; then
58678        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58679      fi
58680
58681      if test -d "$path"; then
58682        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58683      else
58684        dir="`$DIRNAME "$path"`"
58685        base="`$BASENAME "$path"`"
58686        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58687      fi
58688    fi
58689  fi
58690
58691
58692    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58694$as_echo_n "checking for freetype includes... " >&6; }
58695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58696$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58697    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58699$as_echo_n "checking for freetype libraries... " >&6; }
58700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58701$as_echo "$FREETYPE_LIB_PATH" >&6; }
58702  fi
58703
58704          if test "x$FOUND_FREETYPE" != xyes; then
58705            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58706          fi
58707        else
58708          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58709$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58710          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58711        fi
58712      else
58713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58714$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58715      fi
58716    fi
58717
58718    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58719      # User has specified settings
58720
58721      if test "x$BUNDLE_FREETYPE" = x; then
58722        # If not specified, default is to bundle freetype
58723        BUNDLE_FREETYPE=yes
58724      fi
58725
58726      if test "x$with_freetype" != x; then
58727        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58728        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58729      fi
58730
58731      # Allow --with-freetype-lib and --with-freetype-include to override
58732      if test "x$with_freetype_include" != x; then
58733        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58734      fi
58735      if test "x$with_freetype_lib" != x; then
58736        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58737      fi
58738
58739      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58740        # Okay, we got it. Check that it works.
58741
58742  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58743  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58744  METHOD="--with-freetype"
58745
58746  # Let's start with an optimistic view of the world :-)
58747  FOUND_FREETYPE=yes
58748
58749  # First look for the canonical freetype main include file ft2build.h.
58750  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58751    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58752    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58753    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58754      # Fail.
58755      FOUND_FREETYPE=no
58756    fi
58757  fi
58758
58759  if test "x$FOUND_FREETYPE" = xyes; then
58760    # Include file found, let's continue the sanity check.
58761    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58762$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58763
58764    # Reset to default value
58765    FREETYPE_BASE_NAME=freetype
58766    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58767    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58768      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58769          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58770        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58771        # for the .6 version explicitly.
58772        FREETYPE_BASE_NAME=freetype.6
58773        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58774        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58775$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58776      else
58777        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58778$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58779        FOUND_FREETYPE=no
58780      fi
58781    else
58782      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58783        # On Windows, we will need both .lib and .dll file.
58784        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58785          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58786$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58787          FOUND_FREETYPE=no
58788        fi
58789      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58790          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58791        # Found lib in isa dir, use that instead.
58792        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58793        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58794$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58795      fi
58796    fi
58797  fi
58798
58799  if test "x$FOUND_FREETYPE" = xyes; then
58800
58801  # Only process if variable expands to non-empty
58802
58803  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58805
58806  # Input might be given as Windows format, start by converting to
58807  # unix format.
58808  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58809  new_path=`$CYGPATH -u "$path"`
58810
58811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58814  # "foo.exe" is OK but "foo" is an error.
58815  #
58816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58817  # It is also a way to make sure we got the proper file name for the real test later on.
58818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58819  if test "x$test_shortpath" = x; then
58820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58822    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58823  fi
58824
58825  # Call helper function which possibly converts this using DOS-style short mode.
58826  # If so, the updated path is stored in $new_path.
58827
58828  input_path="$new_path"
58829  # Check if we need to convert this using DOS-style short mode. If the path
58830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58831  # take no chances and rewrite it.
58832  # Note: m4 eats our [], so we need to use [ and ] instead.
58833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58834  if test "x$has_forbidden_chars" != x; then
58835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58839      # Going to short mode and back again did indeed matter. Since short mode is
58840      # case insensitive, let's make it lowercase to improve readability.
58841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58842      # Now convert it back to Unix-style (cygpath)
58843      input_path=`$CYGPATH -u "$shortmode_path"`
58844      new_path="$input_path"
58845    fi
58846  fi
58847
58848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58849  if test "x$test_cygdrive_prefix" = x; then
58850    # As a simple fix, exclude /usr/bin since it's not a real path.
58851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58853      # a path prefixed by /cygdrive for fixpath to work.
58854      new_path="$CYGWIN_ROOT_PATH$input_path"
58855    fi
58856  fi
58857
58858
58859  if test "x$path" != "x$new_path"; then
58860    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58863  fi
58864
58865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58866
58867  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58868  has_colon=`$ECHO $path | $GREP ^.:`
58869  new_path="$path"
58870  if test "x$has_colon" = x; then
58871    # Not in mixed or Windows style, start by that.
58872    new_path=`cmd //c echo $path`
58873  fi
58874
58875
58876  input_path="$new_path"
58877  # Check if we need to convert this using DOS-style short mode. If the path
58878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58879  # take no chances and rewrite it.
58880  # Note: m4 eats our [], so we need to use [ and ] instead.
58881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58882  if test "x$has_forbidden_chars" != x; then
58883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58885  fi
58886
58887
58888  windows_path="$new_path"
58889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58890    unix_path=`$CYGPATH -u "$windows_path"`
58891    new_path="$unix_path"
58892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58894    new_path="$unix_path"
58895  fi
58896
58897  if test "x$path" != "x$new_path"; then
58898    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58901  fi
58902
58903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58905
58906    else
58907      # We're on a unix platform. Hooray! :)
58908      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58909      has_space=`$ECHO "$path" | $GREP " "`
58910      if test "x$has_space" != x; then
58911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58914      fi
58915
58916      # Use eval to expand a potential ~
58917      eval path="$path"
58918      if test ! -f "$path" && test ! -d "$path"; then
58919        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58920      fi
58921
58922      if test -d "$path"; then
58923        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58924      else
58925        dir="`$DIRNAME "$path"`"
58926        base="`$BASENAME "$path"`"
58927        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58928      fi
58929    fi
58930  fi
58931
58932
58933  # Only process if variable expands to non-empty
58934
58935  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58937
58938  # Input might be given as Windows format, start by converting to
58939  # unix format.
58940  path="$POTENTIAL_FREETYPE_LIB_PATH"
58941  new_path=`$CYGPATH -u "$path"`
58942
58943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58946  # "foo.exe" is OK but "foo" is an error.
58947  #
58948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58949  # It is also a way to make sure we got the proper file name for the real test later on.
58950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58951  if test "x$test_shortpath" = x; then
58952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58954    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58955  fi
58956
58957  # Call helper function which possibly converts this using DOS-style short mode.
58958  # If so, the updated path is stored in $new_path.
58959
58960  input_path="$new_path"
58961  # Check if we need to convert this using DOS-style short mode. If the path
58962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58963  # take no chances and rewrite it.
58964  # Note: m4 eats our [], so we need to use [ and ] instead.
58965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58966  if test "x$has_forbidden_chars" != x; then
58967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58971      # Going to short mode and back again did indeed matter. Since short mode is
58972      # case insensitive, let's make it lowercase to improve readability.
58973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58974      # Now convert it back to Unix-style (cygpath)
58975      input_path=`$CYGPATH -u "$shortmode_path"`
58976      new_path="$input_path"
58977    fi
58978  fi
58979
58980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58981  if test "x$test_cygdrive_prefix" = x; then
58982    # As a simple fix, exclude /usr/bin since it's not a real path.
58983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58985      # a path prefixed by /cygdrive for fixpath to work.
58986      new_path="$CYGWIN_ROOT_PATH$input_path"
58987    fi
58988  fi
58989
58990
58991  if test "x$path" != "x$new_path"; then
58992    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58994$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58995  fi
58996
58997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58998
58999  path="$POTENTIAL_FREETYPE_LIB_PATH"
59000  has_colon=`$ECHO $path | $GREP ^.:`
59001  new_path="$path"
59002  if test "x$has_colon" = x; then
59003    # Not in mixed or Windows style, start by that.
59004    new_path=`cmd //c echo $path`
59005  fi
59006
59007
59008  input_path="$new_path"
59009  # Check if we need to convert this using DOS-style short mode. If the path
59010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59011  # take no chances and rewrite it.
59012  # Note: m4 eats our [], so we need to use [ and ] instead.
59013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59014  if test "x$has_forbidden_chars" != x; then
59015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59017  fi
59018
59019
59020  windows_path="$new_path"
59021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59022    unix_path=`$CYGPATH -u "$windows_path"`
59023    new_path="$unix_path"
59024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59026    new_path="$unix_path"
59027  fi
59028
59029  if test "x$path" != "x$new_path"; then
59030    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59033  fi
59034
59035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59037
59038    else
59039      # We're on a unix platform. Hooray! :)
59040      path="$POTENTIAL_FREETYPE_LIB_PATH"
59041      has_space=`$ECHO "$path" | $GREP " "`
59042      if test "x$has_space" != x; then
59043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59046      fi
59047
59048      # Use eval to expand a potential ~
59049      eval path="$path"
59050      if test ! -f "$path" && test ! -d "$path"; then
59051        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59052      fi
59053
59054      if test -d "$path"; then
59055        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59056      else
59057        dir="`$DIRNAME "$path"`"
59058        base="`$BASENAME "$path"`"
59059        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59060      fi
59061    fi
59062  fi
59063
59064
59065    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59067$as_echo_n "checking for freetype includes... " >&6; }
59068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59069$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59070    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59072$as_echo_n "checking for freetype libraries... " >&6; }
59073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59074$as_echo "$FREETYPE_LIB_PATH" >&6; }
59075  fi
59076
59077        if test "x$FOUND_FREETYPE" != xyes; then
59078          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59079        fi
59080      else
59081        # User specified only one of lib or include. This is an error.
59082        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59083          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59084$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59085          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59086        else
59087          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59088$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59089          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59090        fi
59091      fi
59092    else
59093      # User did not specify settings, but we need freetype. Try to locate it.
59094
59095      if test "x$BUNDLE_FREETYPE" = x; then
59096        # If not specified, default is to bundle freetype only on windows
59097        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59098          BUNDLE_FREETYPE=yes
59099        else
59100          BUNDLE_FREETYPE=no
59101        fi
59102      fi
59103
59104      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59105      if test "x$SYSROOT" = x; then
59106        if test "x$FOUND_FREETYPE" != xyes; then
59107          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59108          if test "x$PKG_CONFIG" != x; then
59109
59110pkg_failed=no
59111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59112$as_echo_n "checking for FREETYPE... " >&6; }
59113
59114if test -n "$FREETYPE_CFLAGS"; then
59115    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59116 elif test -n "$PKG_CONFIG"; then
59117    if test -n "$PKG_CONFIG" && \
59118    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59119  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59120  ac_status=$?
59121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59122  test $ac_status = 0; }; then
59123  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59124else
59125  pkg_failed=yes
59126fi
59127 else
59128    pkg_failed=untried
59129fi
59130if test -n "$FREETYPE_LIBS"; then
59131    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59132 elif test -n "$PKG_CONFIG"; then
59133    if test -n "$PKG_CONFIG" && \
59134    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59135  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59136  ac_status=$?
59137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59138  test $ac_status = 0; }; then
59139  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59140else
59141  pkg_failed=yes
59142fi
59143 else
59144    pkg_failed=untried
59145fi
59146
59147
59148
59149if test $pkg_failed = yes; then
59150
59151if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59152        _pkg_short_errors_supported=yes
59153else
59154        _pkg_short_errors_supported=no
59155fi
59156        if test $_pkg_short_errors_supported = yes; then
59157	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59158        else
59159	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59160        fi
59161	# Put the nasty error message in config.log where it belongs
59162	echo "$FREETYPE_PKG_ERRORS" >&5
59163
59164	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59165$as_echo "no" >&6; }
59166                FOUND_FREETYPE=no
59167elif test $pkg_failed = untried; then
59168	FOUND_FREETYPE=no
59169else
59170	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59171	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59173$as_echo "yes" >&6; }
59174	FOUND_FREETYPE=yes
59175fi
59176            if test "x$FOUND_FREETYPE" = xyes; then
59177              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59178              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59179              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59180              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59181                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59182              fi
59183              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59184              if test "x$BUNDLE_FREETYPE" = xyes; then
59185                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59186$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59187                FOUND_FREETYPE=no
59188              else
59189                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59190$as_echo_n "checking for freetype... " >&6; }
59191                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59192$as_echo "yes (using pkg-config)" >&6; }
59193              fi
59194            fi
59195          fi
59196        fi
59197      fi
59198
59199      if test "x$FOUND_FREETYPE" != xyes; then
59200        # Check in well-known locations
59201        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59202          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59203
59204  windows_path="$FREETYPE_BASE_DIR"
59205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59206    unix_path=`$CYGPATH -u "$windows_path"`
59207    FREETYPE_BASE_DIR="$unix_path"
59208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59210    FREETYPE_BASE_DIR="$unix_path"
59211  fi
59212
59213
59214  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59215  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59216  METHOD="well-known location"
59217
59218  # Let's start with an optimistic view of the world :-)
59219  FOUND_FREETYPE=yes
59220
59221  # First look for the canonical freetype main include file ft2build.h.
59222  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59223    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59224    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59225    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59226      # Fail.
59227      FOUND_FREETYPE=no
59228    fi
59229  fi
59230
59231  if test "x$FOUND_FREETYPE" = xyes; then
59232    # Include file found, let's continue the sanity check.
59233    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59234$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59235
59236    # Reset to default value
59237    FREETYPE_BASE_NAME=freetype
59238    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59239    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59240      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59241          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59242        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59243        # for the .6 version explicitly.
59244        FREETYPE_BASE_NAME=freetype.6
59245        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59246        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59247$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59248      else
59249        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59250$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59251        FOUND_FREETYPE=no
59252      fi
59253    else
59254      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59255        # On Windows, we will need both .lib and .dll file.
59256        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59257          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59258$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59259          FOUND_FREETYPE=no
59260        fi
59261      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59262          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59263        # Found lib in isa dir, use that instead.
59264        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59265        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59266$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59267      fi
59268    fi
59269  fi
59270
59271  if test "x$FOUND_FREETYPE" = xyes; then
59272
59273  # Only process if variable expands to non-empty
59274
59275  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59277
59278  # Input might be given as Windows format, start by converting to
59279  # unix format.
59280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59281  new_path=`$CYGPATH -u "$path"`
59282
59283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59286  # "foo.exe" is OK but "foo" is an error.
59287  #
59288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59289  # It is also a way to make sure we got the proper file name for the real test later on.
59290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59291  if test "x$test_shortpath" = x; then
59292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59295  fi
59296
59297  # Call helper function which possibly converts this using DOS-style short mode.
59298  # If so, the updated path is stored in $new_path.
59299
59300  input_path="$new_path"
59301  # Check if we need to convert this using DOS-style short mode. If the path
59302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59303  # take no chances and rewrite it.
59304  # Note: m4 eats our [], so we need to use [ and ] instead.
59305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59306  if test "x$has_forbidden_chars" != x; then
59307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59311      # Going to short mode and back again did indeed matter. Since short mode is
59312      # case insensitive, let's make it lowercase to improve readability.
59313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59314      # Now convert it back to Unix-style (cygpath)
59315      input_path=`$CYGPATH -u "$shortmode_path"`
59316      new_path="$input_path"
59317    fi
59318  fi
59319
59320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59321  if test "x$test_cygdrive_prefix" = x; then
59322    # As a simple fix, exclude /usr/bin since it's not a real path.
59323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59325      # a path prefixed by /cygdrive for fixpath to work.
59326      new_path="$CYGWIN_ROOT_PATH$input_path"
59327    fi
59328  fi
59329
59330
59331  if test "x$path" != "x$new_path"; then
59332    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59335  fi
59336
59337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59338
59339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59340  has_colon=`$ECHO $path | $GREP ^.:`
59341  new_path="$path"
59342  if test "x$has_colon" = x; then
59343    # Not in mixed or Windows style, start by that.
59344    new_path=`cmd //c echo $path`
59345  fi
59346
59347
59348  input_path="$new_path"
59349  # Check if we need to convert this using DOS-style short mode. If the path
59350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59351  # take no chances and rewrite it.
59352  # Note: m4 eats our [], so we need to use [ and ] instead.
59353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59354  if test "x$has_forbidden_chars" != x; then
59355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59357  fi
59358
59359
59360  windows_path="$new_path"
59361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59362    unix_path=`$CYGPATH -u "$windows_path"`
59363    new_path="$unix_path"
59364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59366    new_path="$unix_path"
59367  fi
59368
59369  if test "x$path" != "x$new_path"; then
59370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59373  fi
59374
59375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59377
59378    else
59379      # We're on a unix platform. Hooray! :)
59380      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59381      has_space=`$ECHO "$path" | $GREP " "`
59382      if test "x$has_space" != x; then
59383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59386      fi
59387
59388      # Use eval to expand a potential ~
59389      eval path="$path"
59390      if test ! -f "$path" && test ! -d "$path"; then
59391        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59392      fi
59393
59394      if test -d "$path"; then
59395        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59396      else
59397        dir="`$DIRNAME "$path"`"
59398        base="`$BASENAME "$path"`"
59399        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59400      fi
59401    fi
59402  fi
59403
59404
59405  # Only process if variable expands to non-empty
59406
59407  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59409
59410  # Input might be given as Windows format, start by converting to
59411  # unix format.
59412  path="$POTENTIAL_FREETYPE_LIB_PATH"
59413  new_path=`$CYGPATH -u "$path"`
59414
59415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59418  # "foo.exe" is OK but "foo" is an error.
59419  #
59420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59421  # It is also a way to make sure we got the proper file name for the real test later on.
59422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59423  if test "x$test_shortpath" = x; then
59424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59426    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59427  fi
59428
59429  # Call helper function which possibly converts this using DOS-style short mode.
59430  # If so, the updated path is stored in $new_path.
59431
59432  input_path="$new_path"
59433  # Check if we need to convert this using DOS-style short mode. If the path
59434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59435  # take no chances and rewrite it.
59436  # Note: m4 eats our [], so we need to use [ and ] instead.
59437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59438  if test "x$has_forbidden_chars" != x; then
59439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59443      # Going to short mode and back again did indeed matter. Since short mode is
59444      # case insensitive, let's make it lowercase to improve readability.
59445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59446      # Now convert it back to Unix-style (cygpath)
59447      input_path=`$CYGPATH -u "$shortmode_path"`
59448      new_path="$input_path"
59449    fi
59450  fi
59451
59452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59453  if test "x$test_cygdrive_prefix" = x; then
59454    # As a simple fix, exclude /usr/bin since it's not a real path.
59455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59457      # a path prefixed by /cygdrive for fixpath to work.
59458      new_path="$CYGWIN_ROOT_PATH$input_path"
59459    fi
59460  fi
59461
59462
59463  if test "x$path" != "x$new_path"; then
59464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59467  fi
59468
59469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59470
59471  path="$POTENTIAL_FREETYPE_LIB_PATH"
59472  has_colon=`$ECHO $path | $GREP ^.:`
59473  new_path="$path"
59474  if test "x$has_colon" = x; then
59475    # Not in mixed or Windows style, start by that.
59476    new_path=`cmd //c echo $path`
59477  fi
59478
59479
59480  input_path="$new_path"
59481  # Check if we need to convert this using DOS-style short mode. If the path
59482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59483  # take no chances and rewrite it.
59484  # Note: m4 eats our [], so we need to use [ and ] instead.
59485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59486  if test "x$has_forbidden_chars" != x; then
59487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59489  fi
59490
59491
59492  windows_path="$new_path"
59493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59494    unix_path=`$CYGPATH -u "$windows_path"`
59495    new_path="$unix_path"
59496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59498    new_path="$unix_path"
59499  fi
59500
59501  if test "x$path" != "x$new_path"; then
59502    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59504$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59505  fi
59506
59507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59509
59510    else
59511      # We're on a unix platform. Hooray! :)
59512      path="$POTENTIAL_FREETYPE_LIB_PATH"
59513      has_space=`$ECHO "$path" | $GREP " "`
59514      if test "x$has_space" != x; then
59515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59518      fi
59519
59520      # Use eval to expand a potential ~
59521      eval path="$path"
59522      if test ! -f "$path" && test ! -d "$path"; then
59523        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59524      fi
59525
59526      if test -d "$path"; then
59527        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59528      else
59529        dir="`$DIRNAME "$path"`"
59530        base="`$BASENAME "$path"`"
59531        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59532      fi
59533    fi
59534  fi
59535
59536
59537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59539$as_echo_n "checking for freetype includes... " >&6; }
59540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59544$as_echo_n "checking for freetype libraries... " >&6; }
59545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59546$as_echo "$FREETYPE_LIB_PATH" >&6; }
59547  fi
59548
59549          if test "x$FOUND_FREETYPE" != xyes; then
59550            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59551
59552  windows_path="$FREETYPE_BASE_DIR"
59553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59554    unix_path=`$CYGPATH -u "$windows_path"`
59555    FREETYPE_BASE_DIR="$unix_path"
59556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59558    FREETYPE_BASE_DIR="$unix_path"
59559  fi
59560
59561
59562  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59563  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59564  METHOD="well-known location"
59565
59566  # Let's start with an optimistic view of the world :-)
59567  FOUND_FREETYPE=yes
59568
59569  # First look for the canonical freetype main include file ft2build.h.
59570  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59571    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59572    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59573    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59574      # Fail.
59575      FOUND_FREETYPE=no
59576    fi
59577  fi
59578
59579  if test "x$FOUND_FREETYPE" = xyes; then
59580    # Include file found, let's continue the sanity check.
59581    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59582$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59583
59584    # Reset to default value
59585    FREETYPE_BASE_NAME=freetype
59586    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59587    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59588      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59589          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59590        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59591        # for the .6 version explicitly.
59592        FREETYPE_BASE_NAME=freetype.6
59593        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59594        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59595$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59596      else
59597        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59598$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59599        FOUND_FREETYPE=no
59600      fi
59601    else
59602      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59603        # On Windows, we will need both .lib and .dll file.
59604        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59605          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59606$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59607          FOUND_FREETYPE=no
59608        fi
59609      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59610          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59611        # Found lib in isa dir, use that instead.
59612        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59613        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59614$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59615      fi
59616    fi
59617  fi
59618
59619  if test "x$FOUND_FREETYPE" = xyes; then
59620
59621  # Only process if variable expands to non-empty
59622
59623  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59625
59626  # Input might be given as Windows format, start by converting to
59627  # unix format.
59628  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59629  new_path=`$CYGPATH -u "$path"`
59630
59631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59634  # "foo.exe" is OK but "foo" is an error.
59635  #
59636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59637  # It is also a way to make sure we got the proper file name for the real test later on.
59638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59639  if test "x$test_shortpath" = x; then
59640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59642    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59643  fi
59644
59645  # Call helper function which possibly converts this using DOS-style short mode.
59646  # If so, the updated path is stored in $new_path.
59647
59648  input_path="$new_path"
59649  # Check if we need to convert this using DOS-style short mode. If the path
59650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59651  # take no chances and rewrite it.
59652  # Note: m4 eats our [], so we need to use [ and ] instead.
59653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59654  if test "x$has_forbidden_chars" != x; then
59655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59659      # Going to short mode and back again did indeed matter. Since short mode is
59660      # case insensitive, let's make it lowercase to improve readability.
59661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59662      # Now convert it back to Unix-style (cygpath)
59663      input_path=`$CYGPATH -u "$shortmode_path"`
59664      new_path="$input_path"
59665    fi
59666  fi
59667
59668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59669  if test "x$test_cygdrive_prefix" = x; then
59670    # As a simple fix, exclude /usr/bin since it's not a real path.
59671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59673      # a path prefixed by /cygdrive for fixpath to work.
59674      new_path="$CYGWIN_ROOT_PATH$input_path"
59675    fi
59676  fi
59677
59678
59679  if test "x$path" != "x$new_path"; then
59680    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59683  fi
59684
59685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59686
59687  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59688  has_colon=`$ECHO $path | $GREP ^.:`
59689  new_path="$path"
59690  if test "x$has_colon" = x; then
59691    # Not in mixed or Windows style, start by that.
59692    new_path=`cmd //c echo $path`
59693  fi
59694
59695
59696  input_path="$new_path"
59697  # Check if we need to convert this using DOS-style short mode. If the path
59698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59699  # take no chances and rewrite it.
59700  # Note: m4 eats our [], so we need to use [ and ] instead.
59701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59702  if test "x$has_forbidden_chars" != x; then
59703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59705  fi
59706
59707
59708  windows_path="$new_path"
59709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59710    unix_path=`$CYGPATH -u "$windows_path"`
59711    new_path="$unix_path"
59712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59714    new_path="$unix_path"
59715  fi
59716
59717  if test "x$path" != "x$new_path"; then
59718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59721  fi
59722
59723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59725
59726    else
59727      # We're on a unix platform. Hooray! :)
59728      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59729      has_space=`$ECHO "$path" | $GREP " "`
59730      if test "x$has_space" != x; then
59731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59732$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59734      fi
59735
59736      # Use eval to expand a potential ~
59737      eval path="$path"
59738      if test ! -f "$path" && test ! -d "$path"; then
59739        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59740      fi
59741
59742      if test -d "$path"; then
59743        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59744      else
59745        dir="`$DIRNAME "$path"`"
59746        base="`$BASENAME "$path"`"
59747        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59748      fi
59749    fi
59750  fi
59751
59752
59753  # Only process if variable expands to non-empty
59754
59755  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59757
59758  # Input might be given as Windows format, start by converting to
59759  # unix format.
59760  path="$POTENTIAL_FREETYPE_LIB_PATH"
59761  new_path=`$CYGPATH -u "$path"`
59762
59763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59766  # "foo.exe" is OK but "foo" is an error.
59767  #
59768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59769  # It is also a way to make sure we got the proper file name for the real test later on.
59770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59771  if test "x$test_shortpath" = x; then
59772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59774    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59775  fi
59776
59777  # Call helper function which possibly converts this using DOS-style short mode.
59778  # If so, the updated path is stored in $new_path.
59779
59780  input_path="$new_path"
59781  # Check if we need to convert this using DOS-style short mode. If the path
59782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59783  # take no chances and rewrite it.
59784  # Note: m4 eats our [], so we need to use [ and ] instead.
59785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59786  if test "x$has_forbidden_chars" != x; then
59787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59791      # Going to short mode and back again did indeed matter. Since short mode is
59792      # case insensitive, let's make it lowercase to improve readability.
59793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59794      # Now convert it back to Unix-style (cygpath)
59795      input_path=`$CYGPATH -u "$shortmode_path"`
59796      new_path="$input_path"
59797    fi
59798  fi
59799
59800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59801  if test "x$test_cygdrive_prefix" = x; then
59802    # As a simple fix, exclude /usr/bin since it's not a real path.
59803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59805      # a path prefixed by /cygdrive for fixpath to work.
59806      new_path="$CYGWIN_ROOT_PATH$input_path"
59807    fi
59808  fi
59809
59810
59811  if test "x$path" != "x$new_path"; then
59812    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59815  fi
59816
59817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59818
59819  path="$POTENTIAL_FREETYPE_LIB_PATH"
59820  has_colon=`$ECHO $path | $GREP ^.:`
59821  new_path="$path"
59822  if test "x$has_colon" = x; then
59823    # Not in mixed or Windows style, start by that.
59824    new_path=`cmd //c echo $path`
59825  fi
59826
59827
59828  input_path="$new_path"
59829  # Check if we need to convert this using DOS-style short mode. If the path
59830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59831  # take no chances and rewrite it.
59832  # Note: m4 eats our [], so we need to use [ and ] instead.
59833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59834  if test "x$has_forbidden_chars" != x; then
59835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59837  fi
59838
59839
59840  windows_path="$new_path"
59841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59842    unix_path=`$CYGPATH -u "$windows_path"`
59843    new_path="$unix_path"
59844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59846    new_path="$unix_path"
59847  fi
59848
59849  if test "x$path" != "x$new_path"; then
59850    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59853  fi
59854
59855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59857
59858    else
59859      # We're on a unix platform. Hooray! :)
59860      path="$POTENTIAL_FREETYPE_LIB_PATH"
59861      has_space=`$ECHO "$path" | $GREP " "`
59862      if test "x$has_space" != x; then
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59865        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59866      fi
59867
59868      # Use eval to expand a potential ~
59869      eval path="$path"
59870      if test ! -f "$path" && test ! -d "$path"; then
59871        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59872      fi
59873
59874      if test -d "$path"; then
59875        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59876      else
59877        dir="`$DIRNAME "$path"`"
59878        base="`$BASENAME "$path"`"
59879        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59880      fi
59881    fi
59882  fi
59883
59884
59885    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59887$as_echo_n "checking for freetype includes... " >&6; }
59888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59889$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59890    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59892$as_echo_n "checking for freetype libraries... " >&6; }
59893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59894$as_echo "$FREETYPE_LIB_PATH" >&6; }
59895  fi
59896
59897          fi
59898          if test "x$FOUND_FREETYPE" != xyes; then
59899            FREETYPE_BASE_DIR="$HOME/freetype"
59900
59901  windows_path="$FREETYPE_BASE_DIR"
59902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59903    unix_path=`$CYGPATH -u "$windows_path"`
59904    FREETYPE_BASE_DIR="$unix_path"
59905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59907    FREETYPE_BASE_DIR="$unix_path"
59908  fi
59909
59910            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59911
59912  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59913  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59914  METHOD="well-known location"
59915
59916  # Let's start with an optimistic view of the world :-)
59917  FOUND_FREETYPE=yes
59918
59919  # First look for the canonical freetype main include file ft2build.h.
59920  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59921    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59922    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59923    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59924      # Fail.
59925      FOUND_FREETYPE=no
59926    fi
59927  fi
59928
59929  if test "x$FOUND_FREETYPE" = xyes; then
59930    # Include file found, let's continue the sanity check.
59931    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59932$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59933
59934    # Reset to default value
59935    FREETYPE_BASE_NAME=freetype
59936    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59937    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59938      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59939          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59940        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59941        # for the .6 version explicitly.
59942        FREETYPE_BASE_NAME=freetype.6
59943        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59944        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59945$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59946      else
59947        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59948$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59949        FOUND_FREETYPE=no
59950      fi
59951    else
59952      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59953        # On Windows, we will need both .lib and .dll file.
59954        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59955          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59956$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59957          FOUND_FREETYPE=no
59958        fi
59959      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59960          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59961        # Found lib in isa dir, use that instead.
59962        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59963        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59964$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59965      fi
59966    fi
59967  fi
59968
59969  if test "x$FOUND_FREETYPE" = xyes; then
59970
59971  # Only process if variable expands to non-empty
59972
59973  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59975
59976  # Input might be given as Windows format, start by converting to
59977  # unix format.
59978  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59979  new_path=`$CYGPATH -u "$path"`
59980
59981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59984  # "foo.exe" is OK but "foo" is an error.
59985  #
59986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59987  # It is also a way to make sure we got the proper file name for the real test later on.
59988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59989  if test "x$test_shortpath" = x; then
59990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59991$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59992    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59993  fi
59994
59995  # Call helper function which possibly converts this using DOS-style short mode.
59996  # If so, the updated path is stored in $new_path.
59997
59998  input_path="$new_path"
59999  # Check if we need to convert this using DOS-style short mode. If the path
60000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60001  # take no chances and rewrite it.
60002  # Note: m4 eats our [], so we need to use [ and ] instead.
60003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60004  if test "x$has_forbidden_chars" != x; then
60005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60009      # Going to short mode and back again did indeed matter. Since short mode is
60010      # case insensitive, let's make it lowercase to improve readability.
60011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60012      # Now convert it back to Unix-style (cygpath)
60013      input_path=`$CYGPATH -u "$shortmode_path"`
60014      new_path="$input_path"
60015    fi
60016  fi
60017
60018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60019  if test "x$test_cygdrive_prefix" = x; then
60020    # As a simple fix, exclude /usr/bin since it's not a real path.
60021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60023      # a path prefixed by /cygdrive for fixpath to work.
60024      new_path="$CYGWIN_ROOT_PATH$input_path"
60025    fi
60026  fi
60027
60028
60029  if test "x$path" != "x$new_path"; then
60030    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60033  fi
60034
60035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60036
60037  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60038  has_colon=`$ECHO $path | $GREP ^.:`
60039  new_path="$path"
60040  if test "x$has_colon" = x; then
60041    # Not in mixed or Windows style, start by that.
60042    new_path=`cmd //c echo $path`
60043  fi
60044
60045
60046  input_path="$new_path"
60047  # Check if we need to convert this using DOS-style short mode. If the path
60048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60049  # take no chances and rewrite it.
60050  # Note: m4 eats our [], so we need to use [ and ] instead.
60051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60052  if test "x$has_forbidden_chars" != x; then
60053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60055  fi
60056
60057
60058  windows_path="$new_path"
60059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60060    unix_path=`$CYGPATH -u "$windows_path"`
60061    new_path="$unix_path"
60062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60064    new_path="$unix_path"
60065  fi
60066
60067  if test "x$path" != "x$new_path"; then
60068    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60071  fi
60072
60073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60075
60076    else
60077      # We're on a unix platform. Hooray! :)
60078      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60079      has_space=`$ECHO "$path" | $GREP " "`
60080      if test "x$has_space" != x; then
60081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60084      fi
60085
60086      # Use eval to expand a potential ~
60087      eval path="$path"
60088      if test ! -f "$path" && test ! -d "$path"; then
60089        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60090      fi
60091
60092      if test -d "$path"; then
60093        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60094      else
60095        dir="`$DIRNAME "$path"`"
60096        base="`$BASENAME "$path"`"
60097        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60098      fi
60099    fi
60100  fi
60101
60102
60103  # Only process if variable expands to non-empty
60104
60105  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60107
60108  # Input might be given as Windows format, start by converting to
60109  # unix format.
60110  path="$POTENTIAL_FREETYPE_LIB_PATH"
60111  new_path=`$CYGPATH -u "$path"`
60112
60113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60116  # "foo.exe" is OK but "foo" is an error.
60117  #
60118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60119  # It is also a way to make sure we got the proper file name for the real test later on.
60120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60121  if test "x$test_shortpath" = x; then
60122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60123$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60124    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60125  fi
60126
60127  # Call helper function which possibly converts this using DOS-style short mode.
60128  # If so, the updated path is stored in $new_path.
60129
60130  input_path="$new_path"
60131  # Check if we need to convert this using DOS-style short mode. If the path
60132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60133  # take no chances and rewrite it.
60134  # Note: m4 eats our [], so we need to use [ and ] instead.
60135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60136  if test "x$has_forbidden_chars" != x; then
60137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60141      # Going to short mode and back again did indeed matter. Since short mode is
60142      # case insensitive, let's make it lowercase to improve readability.
60143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60144      # Now convert it back to Unix-style (cygpath)
60145      input_path=`$CYGPATH -u "$shortmode_path"`
60146      new_path="$input_path"
60147    fi
60148  fi
60149
60150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60151  if test "x$test_cygdrive_prefix" = x; then
60152    # As a simple fix, exclude /usr/bin since it's not a real path.
60153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60155      # a path prefixed by /cygdrive for fixpath to work.
60156      new_path="$CYGWIN_ROOT_PATH$input_path"
60157    fi
60158  fi
60159
60160
60161  if test "x$path" != "x$new_path"; then
60162    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60164$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60165  fi
60166
60167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60168
60169  path="$POTENTIAL_FREETYPE_LIB_PATH"
60170  has_colon=`$ECHO $path | $GREP ^.:`
60171  new_path="$path"
60172  if test "x$has_colon" = x; then
60173    # Not in mixed or Windows style, start by that.
60174    new_path=`cmd //c echo $path`
60175  fi
60176
60177
60178  input_path="$new_path"
60179  # Check if we need to convert this using DOS-style short mode. If the path
60180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60181  # take no chances and rewrite it.
60182  # Note: m4 eats our [], so we need to use [ and ] instead.
60183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60184  if test "x$has_forbidden_chars" != x; then
60185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60187  fi
60188
60189
60190  windows_path="$new_path"
60191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60192    unix_path=`$CYGPATH -u "$windows_path"`
60193    new_path="$unix_path"
60194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60196    new_path="$unix_path"
60197  fi
60198
60199  if test "x$path" != "x$new_path"; then
60200    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60203  fi
60204
60205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60207
60208    else
60209      # We're on a unix platform. Hooray! :)
60210      path="$POTENTIAL_FREETYPE_LIB_PATH"
60211      has_space=`$ECHO "$path" | $GREP " "`
60212      if test "x$has_space" != x; then
60213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60215        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60216      fi
60217
60218      # Use eval to expand a potential ~
60219      eval path="$path"
60220      if test ! -f "$path" && test ! -d "$path"; then
60221        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60222      fi
60223
60224      if test -d "$path"; then
60225        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60226      else
60227        dir="`$DIRNAME "$path"`"
60228        base="`$BASENAME "$path"`"
60229        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60230      fi
60231    fi
60232  fi
60233
60234
60235    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60237$as_echo_n "checking for freetype includes... " >&6; }
60238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60239$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60240    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60242$as_echo_n "checking for freetype libraries... " >&6; }
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60244$as_echo "$FREETYPE_LIB_PATH" >&6; }
60245  fi
60246
60247            else
60248
60249  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60250  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60251  METHOD="well-known location"
60252
60253  # Let's start with an optimistic view of the world :-)
60254  FOUND_FREETYPE=yes
60255
60256  # First look for the canonical freetype main include file ft2build.h.
60257  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60258    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60259    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60260    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60261      # Fail.
60262      FOUND_FREETYPE=no
60263    fi
60264  fi
60265
60266  if test "x$FOUND_FREETYPE" = xyes; then
60267    # Include file found, let's continue the sanity check.
60268    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60269$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60270
60271    # Reset to default value
60272    FREETYPE_BASE_NAME=freetype
60273    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60274    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60275      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60276          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60277        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60278        # for the .6 version explicitly.
60279        FREETYPE_BASE_NAME=freetype.6
60280        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60281        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60282$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60283      else
60284        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60285$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60286        FOUND_FREETYPE=no
60287      fi
60288    else
60289      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60290        # On Windows, we will need both .lib and .dll file.
60291        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60292          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60294          FOUND_FREETYPE=no
60295        fi
60296      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60297          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60298        # Found lib in isa dir, use that instead.
60299        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60300        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60301$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60302      fi
60303    fi
60304  fi
60305
60306  if test "x$FOUND_FREETYPE" = xyes; then
60307
60308  # Only process if variable expands to non-empty
60309
60310  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60312
60313  # Input might be given as Windows format, start by converting to
60314  # unix format.
60315  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60316  new_path=`$CYGPATH -u "$path"`
60317
60318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60321  # "foo.exe" is OK but "foo" is an error.
60322  #
60323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60324  # It is also a way to make sure we got the proper file name for the real test later on.
60325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60326  if test "x$test_shortpath" = x; then
60327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60328$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60329    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60330  fi
60331
60332  # Call helper function which possibly converts this using DOS-style short mode.
60333  # If so, the updated path is stored in $new_path.
60334
60335  input_path="$new_path"
60336  # Check if we need to convert this using DOS-style short mode. If the path
60337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60338  # take no chances and rewrite it.
60339  # Note: m4 eats our [], so we need to use [ and ] instead.
60340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60341  if test "x$has_forbidden_chars" != x; then
60342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60346      # Going to short mode and back again did indeed matter. Since short mode is
60347      # case insensitive, let's make it lowercase to improve readability.
60348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60349      # Now convert it back to Unix-style (cygpath)
60350      input_path=`$CYGPATH -u "$shortmode_path"`
60351      new_path="$input_path"
60352    fi
60353  fi
60354
60355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60356  if test "x$test_cygdrive_prefix" = x; then
60357    # As a simple fix, exclude /usr/bin since it's not a real path.
60358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60360      # a path prefixed by /cygdrive for fixpath to work.
60361      new_path="$CYGWIN_ROOT_PATH$input_path"
60362    fi
60363  fi
60364
60365
60366  if test "x$path" != "x$new_path"; then
60367    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60370  fi
60371
60372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60373
60374  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60375  has_colon=`$ECHO $path | $GREP ^.:`
60376  new_path="$path"
60377  if test "x$has_colon" = x; then
60378    # Not in mixed or Windows style, start by that.
60379    new_path=`cmd //c echo $path`
60380  fi
60381
60382
60383  input_path="$new_path"
60384  # Check if we need to convert this using DOS-style short mode. If the path
60385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60386  # take no chances and rewrite it.
60387  # Note: m4 eats our [], so we need to use [ and ] instead.
60388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60389  if test "x$has_forbidden_chars" != x; then
60390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60392  fi
60393
60394
60395  windows_path="$new_path"
60396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60397    unix_path=`$CYGPATH -u "$windows_path"`
60398    new_path="$unix_path"
60399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60401    new_path="$unix_path"
60402  fi
60403
60404  if test "x$path" != "x$new_path"; then
60405    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60408  fi
60409
60410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60412
60413    else
60414      # We're on a unix platform. Hooray! :)
60415      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60416      has_space=`$ECHO "$path" | $GREP " "`
60417      if test "x$has_space" != x; then
60418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60421      fi
60422
60423      # Use eval to expand a potential ~
60424      eval path="$path"
60425      if test ! -f "$path" && test ! -d "$path"; then
60426        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60427      fi
60428
60429      if test -d "$path"; then
60430        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60431      else
60432        dir="`$DIRNAME "$path"`"
60433        base="`$BASENAME "$path"`"
60434        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60435      fi
60436    fi
60437  fi
60438
60439
60440  # Only process if variable expands to non-empty
60441
60442  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60444
60445  # Input might be given as Windows format, start by converting to
60446  # unix format.
60447  path="$POTENTIAL_FREETYPE_LIB_PATH"
60448  new_path=`$CYGPATH -u "$path"`
60449
60450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60453  # "foo.exe" is OK but "foo" is an error.
60454  #
60455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60456  # It is also a way to make sure we got the proper file name for the real test later on.
60457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60458  if test "x$test_shortpath" = x; then
60459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60462  fi
60463
60464  # Call helper function which possibly converts this using DOS-style short mode.
60465  # If so, the updated path is stored in $new_path.
60466
60467  input_path="$new_path"
60468  # Check if we need to convert this using DOS-style short mode. If the path
60469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60470  # take no chances and rewrite it.
60471  # Note: m4 eats our [], so we need to use [ and ] instead.
60472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60473  if test "x$has_forbidden_chars" != x; then
60474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60478      # Going to short mode and back again did indeed matter. Since short mode is
60479      # case insensitive, let's make it lowercase to improve readability.
60480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60481      # Now convert it back to Unix-style (cygpath)
60482      input_path=`$CYGPATH -u "$shortmode_path"`
60483      new_path="$input_path"
60484    fi
60485  fi
60486
60487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60488  if test "x$test_cygdrive_prefix" = x; then
60489    # As a simple fix, exclude /usr/bin since it's not a real path.
60490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60492      # a path prefixed by /cygdrive for fixpath to work.
60493      new_path="$CYGWIN_ROOT_PATH$input_path"
60494    fi
60495  fi
60496
60497
60498  if test "x$path" != "x$new_path"; then
60499    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60502  fi
60503
60504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60505
60506  path="$POTENTIAL_FREETYPE_LIB_PATH"
60507  has_colon=`$ECHO $path | $GREP ^.:`
60508  new_path="$path"
60509  if test "x$has_colon" = x; then
60510    # Not in mixed or Windows style, start by that.
60511    new_path=`cmd //c echo $path`
60512  fi
60513
60514
60515  input_path="$new_path"
60516  # Check if we need to convert this using DOS-style short mode. If the path
60517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60518  # take no chances and rewrite it.
60519  # Note: m4 eats our [], so we need to use [ and ] instead.
60520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60521  if test "x$has_forbidden_chars" != x; then
60522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60524  fi
60525
60526
60527  windows_path="$new_path"
60528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60529    unix_path=`$CYGPATH -u "$windows_path"`
60530    new_path="$unix_path"
60531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60533    new_path="$unix_path"
60534  fi
60535
60536  if test "x$path" != "x$new_path"; then
60537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60540  fi
60541
60542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60544
60545    else
60546      # We're on a unix platform. Hooray! :)
60547      path="$POTENTIAL_FREETYPE_LIB_PATH"
60548      has_space=`$ECHO "$path" | $GREP " "`
60549      if test "x$has_space" != x; then
60550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60553      fi
60554
60555      # Use eval to expand a potential ~
60556      eval path="$path"
60557      if test ! -f "$path" && test ! -d "$path"; then
60558        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60559      fi
60560
60561      if test -d "$path"; then
60562        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60563      else
60564        dir="`$DIRNAME "$path"`"
60565        base="`$BASENAME "$path"`"
60566        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60567      fi
60568    fi
60569  fi
60570
60571
60572    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60574$as_echo_n "checking for freetype includes... " >&6; }
60575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60576$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60577    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60579$as_echo_n "checking for freetype libraries... " >&6; }
60580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60581$as_echo "$FREETYPE_LIB_PATH" >&6; }
60582  fi
60583
60584            fi
60585            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60586                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60587              # Source is available, as a last resort try to build freetype in default location
60588
60589  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60590  BUILD_FREETYPE=yes
60591
60592  # Check if the freetype sources are acessible..
60593  if ! test -d $FREETYPE_SRC_PATH; then
60594    { $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
60595$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60596    BUILD_FREETYPE=no
60597  fi
60598  # ..and contain a vc2010 project file
60599  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60600  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60601    { $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
60602$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60603    BUILD_FREETYPE=no
60604  fi
60605  # Now check if configure found a version of 'msbuild.exe'
60606  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60607    { $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
60608$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;}
60609    BUILD_FREETYPE=no
60610  fi
60611
60612  # Ready to go..
60613  if test "x$BUILD_FREETYPE" = xyes; then
60614    # msbuild requires trailing slashes for output directories
60615    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60616    freetype_lib_path_unix="$freetype_lib_path"
60617    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60618
60619  unix_path="$vcxproj_path"
60620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60621    windows_path=`$CYGPATH -m "$unix_path"`
60622    vcxproj_path="$windows_path"
60623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60624    windows_path=`cmd //c echo $unix_path`
60625    vcxproj_path="$windows_path"
60626  fi
60627
60628
60629  unix_path="$freetype_lib_path"
60630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60631    windows_path=`$CYGPATH -m "$unix_path"`
60632    freetype_lib_path="$windows_path"
60633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60634    windows_path=`cmd //c echo $unix_path`
60635    freetype_lib_path="$windows_path"
60636  fi
60637
60638
60639  unix_path="$freetype_obj_path"
60640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60641    windows_path=`$CYGPATH -m "$unix_path"`
60642    freetype_obj_path="$windows_path"
60643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60644    windows_path=`cmd //c echo $unix_path`
60645    freetype_obj_path="$windows_path"
60646  fi
60647
60648    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60649      freetype_platform=x64
60650    else
60651      freetype_platform=win32
60652    fi
60653
60654    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60655    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60656    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60657    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60659$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60660
60661    # First we try to build the freetype.dll
60662    $ECHO -e "@echo off\n"\
60663        "$MSBUILD $vcxproj_path "\
60664        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60665        "/p:Configuration=\"Release Multithreaded\" "\
60666        "/p:Platform=$freetype_platform "\
60667        "/p:ConfigurationType=DynamicLibrary "\
60668        "/p:TargetName=freetype "\
60669        "/p:OutDir=\"$freetype_lib_path\" "\
60670        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60671    cmd /c freetype.bat
60672
60673    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60674      # If that succeeds we also build freetype.lib
60675      $ECHO -e "@echo off\n"\
60676          "$MSBUILD $vcxproj_path "\
60677          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60678          "/p:Configuration=\"Release Multithreaded\" "\
60679          "/p:Platform=$freetype_platform "\
60680          "/p:ConfigurationType=StaticLibrary "\
60681          "/p:TargetName=freetype "\
60682          "/p:OutDir=\"$freetype_lib_path\" "\
60683          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60684      cmd /c freetype.bat
60685
60686      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60687        # Once we build both, lib and dll, set freetype lib and include path appropriately
60688        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60689        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60690        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60691$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60692      else
60693        BUILD_FREETYPE=no
60694      fi
60695    else
60696      BUILD_FREETYPE=no
60697    fi
60698  fi
60699
60700              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60701
60702  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60703  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60704  METHOD="well-known location"
60705
60706  # Let's start with an optimistic view of the world :-)
60707  FOUND_FREETYPE=yes
60708
60709  # First look for the canonical freetype main include file ft2build.h.
60710  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60711    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60712    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60713    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60714      # Fail.
60715      FOUND_FREETYPE=no
60716    fi
60717  fi
60718
60719  if test "x$FOUND_FREETYPE" = xyes; then
60720    # Include file found, let's continue the sanity check.
60721    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60722$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60723
60724    # Reset to default value
60725    FREETYPE_BASE_NAME=freetype
60726    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60727    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60728      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60729          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60730        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60731        # for the .6 version explicitly.
60732        FREETYPE_BASE_NAME=freetype.6
60733        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60734        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60735$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60736      else
60737        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60738$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60739        FOUND_FREETYPE=no
60740      fi
60741    else
60742      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60743        # On Windows, we will need both .lib and .dll file.
60744        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60745          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60746$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60747          FOUND_FREETYPE=no
60748        fi
60749      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60750          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60751        # Found lib in isa dir, use that instead.
60752        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60753        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60754$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60755      fi
60756    fi
60757  fi
60758
60759  if test "x$FOUND_FREETYPE" = xyes; then
60760
60761  # Only process if variable expands to non-empty
60762
60763  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60765
60766  # Input might be given as Windows format, start by converting to
60767  # unix format.
60768  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60769  new_path=`$CYGPATH -u "$path"`
60770
60771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60774  # "foo.exe" is OK but "foo" is an error.
60775  #
60776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60777  # It is also a way to make sure we got the proper file name for the real test later on.
60778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60779  if test "x$test_shortpath" = x; then
60780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60782    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60783  fi
60784
60785  # Call helper function which possibly converts this using DOS-style short mode.
60786  # If so, the updated path is stored in $new_path.
60787
60788  input_path="$new_path"
60789  # Check if we need to convert this using DOS-style short mode. If the path
60790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60791  # take no chances and rewrite it.
60792  # Note: m4 eats our [], so we need to use [ and ] instead.
60793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60794  if test "x$has_forbidden_chars" != x; then
60795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60799      # Going to short mode and back again did indeed matter. Since short mode is
60800      # case insensitive, let's make it lowercase to improve readability.
60801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60802      # Now convert it back to Unix-style (cygpath)
60803      input_path=`$CYGPATH -u "$shortmode_path"`
60804      new_path="$input_path"
60805    fi
60806  fi
60807
60808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60809  if test "x$test_cygdrive_prefix" = x; then
60810    # As a simple fix, exclude /usr/bin since it's not a real path.
60811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60813      # a path prefixed by /cygdrive for fixpath to work.
60814      new_path="$CYGWIN_ROOT_PATH$input_path"
60815    fi
60816  fi
60817
60818
60819  if test "x$path" != "x$new_path"; then
60820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60823  fi
60824
60825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60826
60827  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60828  has_colon=`$ECHO $path | $GREP ^.:`
60829  new_path="$path"
60830  if test "x$has_colon" = x; then
60831    # Not in mixed or Windows style, start by that.
60832    new_path=`cmd //c echo $path`
60833  fi
60834
60835
60836  input_path="$new_path"
60837  # Check if we need to convert this using DOS-style short mode. If the path
60838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60839  # take no chances and rewrite it.
60840  # Note: m4 eats our [], so we need to use [ and ] instead.
60841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60842  if test "x$has_forbidden_chars" != x; then
60843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60845  fi
60846
60847
60848  windows_path="$new_path"
60849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60850    unix_path=`$CYGPATH -u "$windows_path"`
60851    new_path="$unix_path"
60852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60854    new_path="$unix_path"
60855  fi
60856
60857  if test "x$path" != "x$new_path"; then
60858    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60861  fi
60862
60863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60865
60866    else
60867      # We're on a unix platform. Hooray! :)
60868      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60869      has_space=`$ECHO "$path" | $GREP " "`
60870      if test "x$has_space" != x; then
60871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60874      fi
60875
60876      # Use eval to expand a potential ~
60877      eval path="$path"
60878      if test ! -f "$path" && test ! -d "$path"; then
60879        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60880      fi
60881
60882      if test -d "$path"; then
60883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60884      else
60885        dir="`$DIRNAME "$path"`"
60886        base="`$BASENAME "$path"`"
60887        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60888      fi
60889    fi
60890  fi
60891
60892
60893  # Only process if variable expands to non-empty
60894
60895  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60897
60898  # Input might be given as Windows format, start by converting to
60899  # unix format.
60900  path="$POTENTIAL_FREETYPE_LIB_PATH"
60901  new_path=`$CYGPATH -u "$path"`
60902
60903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60906  # "foo.exe" is OK but "foo" is an error.
60907  #
60908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60909  # It is also a way to make sure we got the proper file name for the real test later on.
60910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60911  if test "x$test_shortpath" = x; then
60912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60915  fi
60916
60917  # Call helper function which possibly converts this using DOS-style short mode.
60918  # If so, the updated path is stored in $new_path.
60919
60920  input_path="$new_path"
60921  # Check if we need to convert this using DOS-style short mode. If the path
60922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60923  # take no chances and rewrite it.
60924  # Note: m4 eats our [], so we need to use [ and ] instead.
60925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60926  if test "x$has_forbidden_chars" != x; then
60927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60931      # Going to short mode and back again did indeed matter. Since short mode is
60932      # case insensitive, let's make it lowercase to improve readability.
60933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60934      # Now convert it back to Unix-style (cygpath)
60935      input_path=`$CYGPATH -u "$shortmode_path"`
60936      new_path="$input_path"
60937    fi
60938  fi
60939
60940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60941  if test "x$test_cygdrive_prefix" = x; then
60942    # As a simple fix, exclude /usr/bin since it's not a real path.
60943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60945      # a path prefixed by /cygdrive for fixpath to work.
60946      new_path="$CYGWIN_ROOT_PATH$input_path"
60947    fi
60948  fi
60949
60950
60951  if test "x$path" != "x$new_path"; then
60952    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60955  fi
60956
60957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60958
60959  path="$POTENTIAL_FREETYPE_LIB_PATH"
60960  has_colon=`$ECHO $path | $GREP ^.:`
60961  new_path="$path"
60962  if test "x$has_colon" = x; then
60963    # Not in mixed or Windows style, start by that.
60964    new_path=`cmd //c echo $path`
60965  fi
60966
60967
60968  input_path="$new_path"
60969  # Check if we need to convert this using DOS-style short mode. If the path
60970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60971  # take no chances and rewrite it.
60972  # Note: m4 eats our [], so we need to use [ and ] instead.
60973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60974  if test "x$has_forbidden_chars" != x; then
60975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60977  fi
60978
60979
60980  windows_path="$new_path"
60981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60982    unix_path=`$CYGPATH -u "$windows_path"`
60983    new_path="$unix_path"
60984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60986    new_path="$unix_path"
60987  fi
60988
60989  if test "x$path" != "x$new_path"; then
60990    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60993  fi
60994
60995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60997
60998    else
60999      # We're on a unix platform. Hooray! :)
61000      path="$POTENTIAL_FREETYPE_LIB_PATH"
61001      has_space=`$ECHO "$path" | $GREP " "`
61002      if test "x$has_space" != x; then
61003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61006      fi
61007
61008      # Use eval to expand a potential ~
61009      eval path="$path"
61010      if test ! -f "$path" && test ! -d "$path"; then
61011        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61012      fi
61013
61014      if test -d "$path"; then
61015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61016      else
61017        dir="`$DIRNAME "$path"`"
61018        base="`$BASENAME "$path"`"
61019        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61020      fi
61021    fi
61022  fi
61023
61024
61025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61027$as_echo_n "checking for freetype includes... " >&6; }
61028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61032$as_echo_n "checking for freetype libraries... " >&6; }
61033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61034$as_echo "$FREETYPE_LIB_PATH" >&6; }
61035  fi
61036
61037              else
61038
61039  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61040  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61041  METHOD="well-known location"
61042
61043  # Let's start with an optimistic view of the world :-)
61044  FOUND_FREETYPE=yes
61045
61046  # First look for the canonical freetype main include file ft2build.h.
61047  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61048    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61049    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61050    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61051      # Fail.
61052      FOUND_FREETYPE=no
61053    fi
61054  fi
61055
61056  if test "x$FOUND_FREETYPE" = xyes; then
61057    # Include file found, let's continue the sanity check.
61058    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61059$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61060
61061    # Reset to default value
61062    FREETYPE_BASE_NAME=freetype
61063    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61064    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61065      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61066          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61067        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61068        # for the .6 version explicitly.
61069        FREETYPE_BASE_NAME=freetype.6
61070        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61071        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61072$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61073      else
61074        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61075$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61076        FOUND_FREETYPE=no
61077      fi
61078    else
61079      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61080        # On Windows, we will need both .lib and .dll file.
61081        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61082          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61083$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61084          FOUND_FREETYPE=no
61085        fi
61086      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61087          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61088        # Found lib in isa dir, use that instead.
61089        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61090        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61091$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61092      fi
61093    fi
61094  fi
61095
61096  if test "x$FOUND_FREETYPE" = xyes; then
61097
61098  # Only process if variable expands to non-empty
61099
61100  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61102
61103  # Input might be given as Windows format, start by converting to
61104  # unix format.
61105  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61106  new_path=`$CYGPATH -u "$path"`
61107
61108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61111  # "foo.exe" is OK but "foo" is an error.
61112  #
61113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61114  # It is also a way to make sure we got the proper file name for the real test later on.
61115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61116  if test "x$test_shortpath" = x; then
61117    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61118$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61119    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61120  fi
61121
61122  # Call helper function which possibly converts this using DOS-style short mode.
61123  # If so, the updated path is stored in $new_path.
61124
61125  input_path="$new_path"
61126  # Check if we need to convert this using DOS-style short mode. If the path
61127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61128  # take no chances and rewrite it.
61129  # Note: m4 eats our [], so we need to use [ and ] instead.
61130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61131  if test "x$has_forbidden_chars" != x; then
61132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61136      # Going to short mode and back again did indeed matter. Since short mode is
61137      # case insensitive, let's make it lowercase to improve readability.
61138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61139      # Now convert it back to Unix-style (cygpath)
61140      input_path=`$CYGPATH -u "$shortmode_path"`
61141      new_path="$input_path"
61142    fi
61143  fi
61144
61145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61146  if test "x$test_cygdrive_prefix" = x; then
61147    # As a simple fix, exclude /usr/bin since it's not a real path.
61148    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61150      # a path prefixed by /cygdrive for fixpath to work.
61151      new_path="$CYGWIN_ROOT_PATH$input_path"
61152    fi
61153  fi
61154
61155
61156  if test "x$path" != "x$new_path"; then
61157    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61159$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61160  fi
61161
61162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61163
61164  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61165  has_colon=`$ECHO $path | $GREP ^.:`
61166  new_path="$path"
61167  if test "x$has_colon" = x; then
61168    # Not in mixed or Windows style, start by that.
61169    new_path=`cmd //c echo $path`
61170  fi
61171
61172
61173  input_path="$new_path"
61174  # Check if we need to convert this using DOS-style short mode. If the path
61175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61176  # take no chances and rewrite it.
61177  # Note: m4 eats our [], so we need to use [ and ] instead.
61178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61179  if test "x$has_forbidden_chars" != x; then
61180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61182  fi
61183
61184
61185  windows_path="$new_path"
61186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61187    unix_path=`$CYGPATH -u "$windows_path"`
61188    new_path="$unix_path"
61189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61191    new_path="$unix_path"
61192  fi
61193
61194  if test "x$path" != "x$new_path"; then
61195    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61197$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61198  fi
61199
61200  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61201  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61202
61203    else
61204      # We're on a unix platform. Hooray! :)
61205      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61206      has_space=`$ECHO "$path" | $GREP " "`
61207      if test "x$has_space" != x; then
61208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61209$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61210        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61211      fi
61212
61213      # Use eval to expand a potential ~
61214      eval path="$path"
61215      if test ! -f "$path" && test ! -d "$path"; then
61216        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61217      fi
61218
61219      if test -d "$path"; then
61220        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61221      else
61222        dir="`$DIRNAME "$path"`"
61223        base="`$BASENAME "$path"`"
61224        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61225      fi
61226    fi
61227  fi
61228
61229
61230  # Only process if variable expands to non-empty
61231
61232  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61234
61235  # Input might be given as Windows format, start by converting to
61236  # unix format.
61237  path="$POTENTIAL_FREETYPE_LIB_PATH"
61238  new_path=`$CYGPATH -u "$path"`
61239
61240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61243  # "foo.exe" is OK but "foo" is an error.
61244  #
61245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61246  # It is also a way to make sure we got the proper file name for the real test later on.
61247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61248  if test "x$test_shortpath" = x; then
61249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61251    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61252  fi
61253
61254  # Call helper function which possibly converts this using DOS-style short mode.
61255  # If so, the updated path is stored in $new_path.
61256
61257  input_path="$new_path"
61258  # Check if we need to convert this using DOS-style short mode. If the path
61259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61260  # take no chances and rewrite it.
61261  # Note: m4 eats our [], so we need to use [ and ] instead.
61262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61263  if test "x$has_forbidden_chars" != x; then
61264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61268      # Going to short mode and back again did indeed matter. Since short mode is
61269      # case insensitive, let's make it lowercase to improve readability.
61270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61271      # Now convert it back to Unix-style (cygpath)
61272      input_path=`$CYGPATH -u "$shortmode_path"`
61273      new_path="$input_path"
61274    fi
61275  fi
61276
61277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61278  if test "x$test_cygdrive_prefix" = x; then
61279    # As a simple fix, exclude /usr/bin since it's not a real path.
61280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61282      # a path prefixed by /cygdrive for fixpath to work.
61283      new_path="$CYGWIN_ROOT_PATH$input_path"
61284    fi
61285  fi
61286
61287
61288  if test "x$path" != "x$new_path"; then
61289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61292  fi
61293
61294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61295
61296  path="$POTENTIAL_FREETYPE_LIB_PATH"
61297  has_colon=`$ECHO $path | $GREP ^.:`
61298  new_path="$path"
61299  if test "x$has_colon" = x; then
61300    # Not in mixed or Windows style, start by that.
61301    new_path=`cmd //c echo $path`
61302  fi
61303
61304
61305  input_path="$new_path"
61306  # Check if we need to convert this using DOS-style short mode. If the path
61307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61308  # take no chances and rewrite it.
61309  # Note: m4 eats our [], so we need to use [ and ] instead.
61310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61311  if test "x$has_forbidden_chars" != x; then
61312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61314  fi
61315
61316
61317  windows_path="$new_path"
61318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61319    unix_path=`$CYGPATH -u "$windows_path"`
61320    new_path="$unix_path"
61321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61323    new_path="$unix_path"
61324  fi
61325
61326  if test "x$path" != "x$new_path"; then
61327    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61330  fi
61331
61332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61334
61335    else
61336      # We're on a unix platform. Hooray! :)
61337      path="$POTENTIAL_FREETYPE_LIB_PATH"
61338      has_space=`$ECHO "$path" | $GREP " "`
61339      if test "x$has_space" != x; then
61340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61343      fi
61344
61345      # Use eval to expand a potential ~
61346      eval path="$path"
61347      if test ! -f "$path" && test ! -d "$path"; then
61348        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61349      fi
61350
61351      if test -d "$path"; then
61352        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61353      else
61354        dir="`$DIRNAME "$path"`"
61355        base="`$BASENAME "$path"`"
61356        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61357      fi
61358    fi
61359  fi
61360
61361
61362    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61364$as_echo_n "checking for freetype includes... " >&6; }
61365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61366$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61367    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61369$as_echo_n "checking for freetype libraries... " >&6; }
61370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61371$as_echo "$FREETYPE_LIB_PATH" >&6; }
61372  fi
61373
61374              fi
61375            fi
61376          fi
61377        else
61378          FREETYPE_BASE_DIR="$SYSROOT/usr"
61379
61380  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61381  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61382  METHOD="well-known location"
61383
61384  # Let's start with an optimistic view of the world :-)
61385  FOUND_FREETYPE=yes
61386
61387  # First look for the canonical freetype main include file ft2build.h.
61388  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61389    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61390    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61391    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61392      # Fail.
61393      FOUND_FREETYPE=no
61394    fi
61395  fi
61396
61397  if test "x$FOUND_FREETYPE" = xyes; then
61398    # Include file found, let's continue the sanity check.
61399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61400$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61401
61402    # Reset to default value
61403    FREETYPE_BASE_NAME=freetype
61404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61406      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61408        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61409        # for the .6 version explicitly.
61410        FREETYPE_BASE_NAME=freetype.6
61411        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61412        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61413$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61414      else
61415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61417        FOUND_FREETYPE=no
61418      fi
61419    else
61420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61421        # On Windows, we will need both .lib and .dll file.
61422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61425          FOUND_FREETYPE=no
61426        fi
61427      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61429        # Found lib in isa dir, use that instead.
61430        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61431        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61432$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61433      fi
61434    fi
61435  fi
61436
61437  if test "x$FOUND_FREETYPE" = xyes; then
61438
61439  # Only process if variable expands to non-empty
61440
61441  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61443
61444  # Input might be given as Windows format, start by converting to
61445  # unix format.
61446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61447  new_path=`$CYGPATH -u "$path"`
61448
61449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61452  # "foo.exe" is OK but "foo" is an error.
61453  #
61454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61455  # It is also a way to make sure we got the proper file name for the real test later on.
61456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61457  if test "x$test_shortpath" = x; then
61458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61461  fi
61462
61463  # Call helper function which possibly converts this using DOS-style short mode.
61464  # If so, the updated path is stored in $new_path.
61465
61466  input_path="$new_path"
61467  # Check if we need to convert this using DOS-style short mode. If the path
61468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61469  # take no chances and rewrite it.
61470  # Note: m4 eats our [], so we need to use [ and ] instead.
61471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61472  if test "x$has_forbidden_chars" != x; then
61473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61477      # Going to short mode and back again did indeed matter. Since short mode is
61478      # case insensitive, let's make it lowercase to improve readability.
61479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61480      # Now convert it back to Unix-style (cygpath)
61481      input_path=`$CYGPATH -u "$shortmode_path"`
61482      new_path="$input_path"
61483    fi
61484  fi
61485
61486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61487  if test "x$test_cygdrive_prefix" = x; then
61488    # As a simple fix, exclude /usr/bin since it's not a real path.
61489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61491      # a path prefixed by /cygdrive for fixpath to work.
61492      new_path="$CYGWIN_ROOT_PATH$input_path"
61493    fi
61494  fi
61495
61496
61497  if test "x$path" != "x$new_path"; then
61498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61501  fi
61502
61503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61504
61505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61506  has_colon=`$ECHO $path | $GREP ^.:`
61507  new_path="$path"
61508  if test "x$has_colon" = x; then
61509    # Not in mixed or Windows style, start by that.
61510    new_path=`cmd //c echo $path`
61511  fi
61512
61513
61514  input_path="$new_path"
61515  # Check if we need to convert this using DOS-style short mode. If the path
61516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61517  # take no chances and rewrite it.
61518  # Note: m4 eats our [], so we need to use [ and ] instead.
61519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61520  if test "x$has_forbidden_chars" != x; then
61521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61523  fi
61524
61525
61526  windows_path="$new_path"
61527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61528    unix_path=`$CYGPATH -u "$windows_path"`
61529    new_path="$unix_path"
61530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61532    new_path="$unix_path"
61533  fi
61534
61535  if test "x$path" != "x$new_path"; then
61536    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61539  fi
61540
61541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61543
61544    else
61545      # We're on a unix platform. Hooray! :)
61546      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61547      has_space=`$ECHO "$path" | $GREP " "`
61548      if test "x$has_space" != x; then
61549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61552      fi
61553
61554      # Use eval to expand a potential ~
61555      eval path="$path"
61556      if test ! -f "$path" && test ! -d "$path"; then
61557        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61558      fi
61559
61560      if test -d "$path"; then
61561        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61562      else
61563        dir="`$DIRNAME "$path"`"
61564        base="`$BASENAME "$path"`"
61565        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61566      fi
61567    fi
61568  fi
61569
61570
61571  # Only process if variable expands to non-empty
61572
61573  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61575
61576  # Input might be given as Windows format, start by converting to
61577  # unix format.
61578  path="$POTENTIAL_FREETYPE_LIB_PATH"
61579  new_path=`$CYGPATH -u "$path"`
61580
61581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61584  # "foo.exe" is OK but "foo" is an error.
61585  #
61586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61587  # It is also a way to make sure we got the proper file name for the real test later on.
61588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61589  if test "x$test_shortpath" = x; then
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61592    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61593  fi
61594
61595  # Call helper function which possibly converts this using DOS-style short mode.
61596  # If so, the updated path is stored in $new_path.
61597
61598  input_path="$new_path"
61599  # Check if we need to convert this using DOS-style short mode. If the path
61600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61601  # take no chances and rewrite it.
61602  # Note: m4 eats our [], so we need to use [ and ] instead.
61603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61604  if test "x$has_forbidden_chars" != x; then
61605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61609      # Going to short mode and back again did indeed matter. Since short mode is
61610      # case insensitive, let's make it lowercase to improve readability.
61611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61612      # Now convert it back to Unix-style (cygpath)
61613      input_path=`$CYGPATH -u "$shortmode_path"`
61614      new_path="$input_path"
61615    fi
61616  fi
61617
61618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61619  if test "x$test_cygdrive_prefix" = x; then
61620    # As a simple fix, exclude /usr/bin since it's not a real path.
61621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61623      # a path prefixed by /cygdrive for fixpath to work.
61624      new_path="$CYGWIN_ROOT_PATH$input_path"
61625    fi
61626  fi
61627
61628
61629  if test "x$path" != "x$new_path"; then
61630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61633  fi
61634
61635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61636
61637  path="$POTENTIAL_FREETYPE_LIB_PATH"
61638  has_colon=`$ECHO $path | $GREP ^.:`
61639  new_path="$path"
61640  if test "x$has_colon" = x; then
61641    # Not in mixed or Windows style, start by that.
61642    new_path=`cmd //c echo $path`
61643  fi
61644
61645
61646  input_path="$new_path"
61647  # Check if we need to convert this using DOS-style short mode. If the path
61648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61649  # take no chances and rewrite it.
61650  # Note: m4 eats our [], so we need to use [ and ] instead.
61651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61652  if test "x$has_forbidden_chars" != x; then
61653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61655  fi
61656
61657
61658  windows_path="$new_path"
61659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61660    unix_path=`$CYGPATH -u "$windows_path"`
61661    new_path="$unix_path"
61662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61664    new_path="$unix_path"
61665  fi
61666
61667  if test "x$path" != "x$new_path"; then
61668    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61671  fi
61672
61673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61675
61676    else
61677      # We're on a unix platform. Hooray! :)
61678      path="$POTENTIAL_FREETYPE_LIB_PATH"
61679      has_space=`$ECHO "$path" | $GREP " "`
61680      if test "x$has_space" != x; then
61681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61684      fi
61685
61686      # Use eval to expand a potential ~
61687      eval path="$path"
61688      if test ! -f "$path" && test ! -d "$path"; then
61689        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61690      fi
61691
61692      if test -d "$path"; then
61693        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61694      else
61695        dir="`$DIRNAME "$path"`"
61696        base="`$BASENAME "$path"`"
61697        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61698      fi
61699    fi
61700  fi
61701
61702
61703    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61705$as_echo_n "checking for freetype includes... " >&6; }
61706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61707$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61708    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61710$as_echo_n "checking for freetype libraries... " >&6; }
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61712$as_echo "$FREETYPE_LIB_PATH" >&6; }
61713  fi
61714
61715
61716          if test "x$FOUND_FREETYPE" != xyes; then
61717            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61718
61719  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61720  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61721  METHOD="well-known location"
61722
61723  # Let's start with an optimistic view of the world :-)
61724  FOUND_FREETYPE=yes
61725
61726  # First look for the canonical freetype main include file ft2build.h.
61727  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61728    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61729    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61730    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61731      # Fail.
61732      FOUND_FREETYPE=no
61733    fi
61734  fi
61735
61736  if test "x$FOUND_FREETYPE" = xyes; then
61737    # Include file found, let's continue the sanity check.
61738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61739$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61740
61741    # Reset to default value
61742    FREETYPE_BASE_NAME=freetype
61743    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61744    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61745      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61747        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61748        # for the .6 version explicitly.
61749        FREETYPE_BASE_NAME=freetype.6
61750        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61751        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61752$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61753      else
61754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61755$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61756        FOUND_FREETYPE=no
61757      fi
61758    else
61759      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61760        # On Windows, we will need both .lib and .dll file.
61761        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61762          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61763$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61764          FOUND_FREETYPE=no
61765        fi
61766      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61767          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61768        # Found lib in isa dir, use that instead.
61769        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61770        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61771$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61772      fi
61773    fi
61774  fi
61775
61776  if test "x$FOUND_FREETYPE" = xyes; then
61777
61778  # Only process if variable expands to non-empty
61779
61780  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61782
61783  # Input might be given as Windows format, start by converting to
61784  # unix format.
61785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61786  new_path=`$CYGPATH -u "$path"`
61787
61788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61791  # "foo.exe" is OK but "foo" is an error.
61792  #
61793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61794  # It is also a way to make sure we got the proper file name for the real test later on.
61795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61796  if test "x$test_shortpath" = x; then
61797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61800  fi
61801
61802  # Call helper function which possibly converts this using DOS-style short mode.
61803  # If so, the updated path is stored in $new_path.
61804
61805  input_path="$new_path"
61806  # Check if we need to convert this using DOS-style short mode. If the path
61807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61808  # take no chances and rewrite it.
61809  # Note: m4 eats our [], so we need to use [ and ] instead.
61810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61811  if test "x$has_forbidden_chars" != x; then
61812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61816      # Going to short mode and back again did indeed matter. Since short mode is
61817      # case insensitive, let's make it lowercase to improve readability.
61818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61819      # Now convert it back to Unix-style (cygpath)
61820      input_path=`$CYGPATH -u "$shortmode_path"`
61821      new_path="$input_path"
61822    fi
61823  fi
61824
61825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61826  if test "x$test_cygdrive_prefix" = x; then
61827    # As a simple fix, exclude /usr/bin since it's not a real path.
61828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61830      # a path prefixed by /cygdrive for fixpath to work.
61831      new_path="$CYGWIN_ROOT_PATH$input_path"
61832    fi
61833  fi
61834
61835
61836  if test "x$path" != "x$new_path"; then
61837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61840  fi
61841
61842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61843
61844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61845  has_colon=`$ECHO $path | $GREP ^.:`
61846  new_path="$path"
61847  if test "x$has_colon" = x; then
61848    # Not in mixed or Windows style, start by that.
61849    new_path=`cmd //c echo $path`
61850  fi
61851
61852
61853  input_path="$new_path"
61854  # Check if we need to convert this using DOS-style short mode. If the path
61855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61856  # take no chances and rewrite it.
61857  # Note: m4 eats our [], so we need to use [ and ] instead.
61858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61859  if test "x$has_forbidden_chars" != x; then
61860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61862  fi
61863
61864
61865  windows_path="$new_path"
61866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61867    unix_path=`$CYGPATH -u "$windows_path"`
61868    new_path="$unix_path"
61869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61871    new_path="$unix_path"
61872  fi
61873
61874  if test "x$path" != "x$new_path"; then
61875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61878  fi
61879
61880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61882
61883    else
61884      # We're on a unix platform. Hooray! :)
61885      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61886      has_space=`$ECHO "$path" | $GREP " "`
61887      if test "x$has_space" != x; then
61888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61891      fi
61892
61893      # Use eval to expand a potential ~
61894      eval path="$path"
61895      if test ! -f "$path" && test ! -d "$path"; then
61896        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61897      fi
61898
61899      if test -d "$path"; then
61900        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61901      else
61902        dir="`$DIRNAME "$path"`"
61903        base="`$BASENAME "$path"`"
61904        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61905      fi
61906    fi
61907  fi
61908
61909
61910  # Only process if variable expands to non-empty
61911
61912  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61914
61915  # Input might be given as Windows format, start by converting to
61916  # unix format.
61917  path="$POTENTIAL_FREETYPE_LIB_PATH"
61918  new_path=`$CYGPATH -u "$path"`
61919
61920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61923  # "foo.exe" is OK but "foo" is an error.
61924  #
61925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61926  # It is also a way to make sure we got the proper file name for the real test later on.
61927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61928  if test "x$test_shortpath" = x; then
61929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61932  fi
61933
61934  # Call helper function which possibly converts this using DOS-style short mode.
61935  # If so, the updated path is stored in $new_path.
61936
61937  input_path="$new_path"
61938  # Check if we need to convert this using DOS-style short mode. If the path
61939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61940  # take no chances and rewrite it.
61941  # Note: m4 eats our [], so we need to use [ and ] instead.
61942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61943  if test "x$has_forbidden_chars" != x; then
61944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61948      # Going to short mode and back again did indeed matter. Since short mode is
61949      # case insensitive, let's make it lowercase to improve readability.
61950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61951      # Now convert it back to Unix-style (cygpath)
61952      input_path=`$CYGPATH -u "$shortmode_path"`
61953      new_path="$input_path"
61954    fi
61955  fi
61956
61957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61958  if test "x$test_cygdrive_prefix" = x; then
61959    # As a simple fix, exclude /usr/bin since it's not a real path.
61960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61962      # a path prefixed by /cygdrive for fixpath to work.
61963      new_path="$CYGWIN_ROOT_PATH$input_path"
61964    fi
61965  fi
61966
61967
61968  if test "x$path" != "x$new_path"; then
61969    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61972  fi
61973
61974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61975
61976  path="$POTENTIAL_FREETYPE_LIB_PATH"
61977  has_colon=`$ECHO $path | $GREP ^.:`
61978  new_path="$path"
61979  if test "x$has_colon" = x; then
61980    # Not in mixed or Windows style, start by that.
61981    new_path=`cmd //c echo $path`
61982  fi
61983
61984
61985  input_path="$new_path"
61986  # Check if we need to convert this using DOS-style short mode. If the path
61987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61988  # take no chances and rewrite it.
61989  # Note: m4 eats our [], so we need to use [ and ] instead.
61990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61991  if test "x$has_forbidden_chars" != x; then
61992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61994  fi
61995
61996
61997  windows_path="$new_path"
61998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61999    unix_path=`$CYGPATH -u "$windows_path"`
62000    new_path="$unix_path"
62001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62003    new_path="$unix_path"
62004  fi
62005
62006  if test "x$path" != "x$new_path"; then
62007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62010  fi
62011
62012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62014
62015    else
62016      # We're on a unix platform. Hooray! :)
62017      path="$POTENTIAL_FREETYPE_LIB_PATH"
62018      has_space=`$ECHO "$path" | $GREP " "`
62019      if test "x$has_space" != x; then
62020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62023      fi
62024
62025      # Use eval to expand a potential ~
62026      eval path="$path"
62027      if test ! -f "$path" && test ! -d "$path"; then
62028        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62029      fi
62030
62031      if test -d "$path"; then
62032        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62033      else
62034        dir="`$DIRNAME "$path"`"
62035        base="`$BASENAME "$path"`"
62036        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62037      fi
62038    fi
62039  fi
62040
62041
62042    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62044$as_echo_n "checking for freetype includes... " >&6; }
62045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62046$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62047    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62049$as_echo_n "checking for freetype libraries... " >&6; }
62050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62051$as_echo "$FREETYPE_LIB_PATH" >&6; }
62052  fi
62053
62054          fi
62055          if test "x$FOUND_FREETYPE" != xyes; then
62056            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62057
62058  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62059  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62060  METHOD="well-known location"
62061
62062  # Let's start with an optimistic view of the world :-)
62063  FOUND_FREETYPE=yes
62064
62065  # First look for the canonical freetype main include file ft2build.h.
62066  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62067    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62068    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62069    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62070      # Fail.
62071      FOUND_FREETYPE=no
62072    fi
62073  fi
62074
62075  if test "x$FOUND_FREETYPE" = xyes; then
62076    # Include file found, let's continue the sanity check.
62077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62078$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62079
62080    # Reset to default value
62081    FREETYPE_BASE_NAME=freetype
62082    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62083    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62084      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62085          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62086        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62087        # for the .6 version explicitly.
62088        FREETYPE_BASE_NAME=freetype.6
62089        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62090        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62091$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62092      else
62093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62094$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62095        FOUND_FREETYPE=no
62096      fi
62097    else
62098      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62099        # On Windows, we will need both .lib and .dll file.
62100        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62101          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62102$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62103          FOUND_FREETYPE=no
62104        fi
62105      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62107        # Found lib in isa dir, use that instead.
62108        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62109        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62110$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62111      fi
62112    fi
62113  fi
62114
62115  if test "x$FOUND_FREETYPE" = xyes; then
62116
62117  # Only process if variable expands to non-empty
62118
62119  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62121
62122  # Input might be given as Windows format, start by converting to
62123  # unix format.
62124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62125  new_path=`$CYGPATH -u "$path"`
62126
62127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62130  # "foo.exe" is OK but "foo" is an error.
62131  #
62132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62133  # It is also a way to make sure we got the proper file name for the real test later on.
62134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62135  if test "x$test_shortpath" = x; then
62136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62139  fi
62140
62141  # Call helper function which possibly converts this using DOS-style short mode.
62142  # If so, the updated path is stored in $new_path.
62143
62144  input_path="$new_path"
62145  # Check if we need to convert this using DOS-style short mode. If the path
62146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62147  # take no chances and rewrite it.
62148  # Note: m4 eats our [], so we need to use [ and ] instead.
62149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62150  if test "x$has_forbidden_chars" != x; then
62151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62155      # Going to short mode and back again did indeed matter. Since short mode is
62156      # case insensitive, let's make it lowercase to improve readability.
62157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62158      # Now convert it back to Unix-style (cygpath)
62159      input_path=`$CYGPATH -u "$shortmode_path"`
62160      new_path="$input_path"
62161    fi
62162  fi
62163
62164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62165  if test "x$test_cygdrive_prefix" = x; then
62166    # As a simple fix, exclude /usr/bin since it's not a real path.
62167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62169      # a path prefixed by /cygdrive for fixpath to work.
62170      new_path="$CYGWIN_ROOT_PATH$input_path"
62171    fi
62172  fi
62173
62174
62175  if test "x$path" != "x$new_path"; then
62176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62179  fi
62180
62181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62182
62183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62184  has_colon=`$ECHO $path | $GREP ^.:`
62185  new_path="$path"
62186  if test "x$has_colon" = x; then
62187    # Not in mixed or Windows style, start by that.
62188    new_path=`cmd //c echo $path`
62189  fi
62190
62191
62192  input_path="$new_path"
62193  # Check if we need to convert this using DOS-style short mode. If the path
62194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62195  # take no chances and rewrite it.
62196  # Note: m4 eats our [], so we need to use [ and ] instead.
62197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62198  if test "x$has_forbidden_chars" != x; then
62199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62201  fi
62202
62203
62204  windows_path="$new_path"
62205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62206    unix_path=`$CYGPATH -u "$windows_path"`
62207    new_path="$unix_path"
62208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62210    new_path="$unix_path"
62211  fi
62212
62213  if test "x$path" != "x$new_path"; then
62214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62217  fi
62218
62219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62221
62222    else
62223      # We're on a unix platform. Hooray! :)
62224      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62225      has_space=`$ECHO "$path" | $GREP " "`
62226      if test "x$has_space" != x; then
62227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62230      fi
62231
62232      # Use eval to expand a potential ~
62233      eval path="$path"
62234      if test ! -f "$path" && test ! -d "$path"; then
62235        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62236      fi
62237
62238      if test -d "$path"; then
62239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62240      else
62241        dir="`$DIRNAME "$path"`"
62242        base="`$BASENAME "$path"`"
62243        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62244      fi
62245    fi
62246  fi
62247
62248
62249  # Only process if variable expands to non-empty
62250
62251  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62253
62254  # Input might be given as Windows format, start by converting to
62255  # unix format.
62256  path="$POTENTIAL_FREETYPE_LIB_PATH"
62257  new_path=`$CYGPATH -u "$path"`
62258
62259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62262  # "foo.exe" is OK but "foo" is an error.
62263  #
62264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62265  # It is also a way to make sure we got the proper file name for the real test later on.
62266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62267  if test "x$test_shortpath" = x; then
62268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62271  fi
62272
62273  # Call helper function which possibly converts this using DOS-style short mode.
62274  # If so, the updated path is stored in $new_path.
62275
62276  input_path="$new_path"
62277  # Check if we need to convert this using DOS-style short mode. If the path
62278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62279  # take no chances and rewrite it.
62280  # Note: m4 eats our [], so we need to use [ and ] instead.
62281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62282  if test "x$has_forbidden_chars" != x; then
62283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62287      # Going to short mode and back again did indeed matter. Since short mode is
62288      # case insensitive, let's make it lowercase to improve readability.
62289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62290      # Now convert it back to Unix-style (cygpath)
62291      input_path=`$CYGPATH -u "$shortmode_path"`
62292      new_path="$input_path"
62293    fi
62294  fi
62295
62296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62297  if test "x$test_cygdrive_prefix" = x; then
62298    # As a simple fix, exclude /usr/bin since it's not a real path.
62299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62301      # a path prefixed by /cygdrive for fixpath to work.
62302      new_path="$CYGWIN_ROOT_PATH$input_path"
62303    fi
62304  fi
62305
62306
62307  if test "x$path" != "x$new_path"; then
62308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62311  fi
62312
62313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62314
62315  path="$POTENTIAL_FREETYPE_LIB_PATH"
62316  has_colon=`$ECHO $path | $GREP ^.:`
62317  new_path="$path"
62318  if test "x$has_colon" = x; then
62319    # Not in mixed or Windows style, start by that.
62320    new_path=`cmd //c echo $path`
62321  fi
62322
62323
62324  input_path="$new_path"
62325  # Check if we need to convert this using DOS-style short mode. If the path
62326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62327  # take no chances and rewrite it.
62328  # Note: m4 eats our [], so we need to use [ and ] instead.
62329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62330  if test "x$has_forbidden_chars" != x; then
62331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62333  fi
62334
62335
62336  windows_path="$new_path"
62337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62338    unix_path=`$CYGPATH -u "$windows_path"`
62339    new_path="$unix_path"
62340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62342    new_path="$unix_path"
62343  fi
62344
62345  if test "x$path" != "x$new_path"; then
62346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62349  fi
62350
62351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62353
62354    else
62355      # We're on a unix platform. Hooray! :)
62356      path="$POTENTIAL_FREETYPE_LIB_PATH"
62357      has_space=`$ECHO "$path" | $GREP " "`
62358      if test "x$has_space" != x; then
62359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62362      fi
62363
62364      # Use eval to expand a potential ~
62365      eval path="$path"
62366      if test ! -f "$path" && test ! -d "$path"; then
62367        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62368      fi
62369
62370      if test -d "$path"; then
62371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62372      else
62373        dir="`$DIRNAME "$path"`"
62374        base="`$BASENAME "$path"`"
62375        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62376      fi
62377    fi
62378  fi
62379
62380
62381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62383$as_echo_n "checking for freetype includes... " >&6; }
62384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62388$as_echo_n "checking for freetype libraries... " >&6; }
62389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62390$as_echo "$FREETYPE_LIB_PATH" >&6; }
62391  fi
62392
62393          fi
62394
62395          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62396            if test "x$FOUND_FREETYPE" != xyes; then
62397              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62398              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62399
62400  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62401  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62402  METHOD="well-known location"
62403
62404  # Let's start with an optimistic view of the world :-)
62405  FOUND_FREETYPE=yes
62406
62407  # First look for the canonical freetype main include file ft2build.h.
62408  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62409    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62410    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62411    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62412      # Fail.
62413      FOUND_FREETYPE=no
62414    fi
62415  fi
62416
62417  if test "x$FOUND_FREETYPE" = xyes; then
62418    # Include file found, let's continue the sanity check.
62419    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62420$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62421
62422    # Reset to default value
62423    FREETYPE_BASE_NAME=freetype
62424    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62425    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62426      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62427          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62428        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62429        # for the .6 version explicitly.
62430        FREETYPE_BASE_NAME=freetype.6
62431        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62432        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62433$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62434      else
62435        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62436$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62437        FOUND_FREETYPE=no
62438      fi
62439    else
62440      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62441        # On Windows, we will need both .lib and .dll file.
62442        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62443          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62444$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62445          FOUND_FREETYPE=no
62446        fi
62447      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62448          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62449        # Found lib in isa dir, use that instead.
62450        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62451        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62452$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62453      fi
62454    fi
62455  fi
62456
62457  if test "x$FOUND_FREETYPE" = xyes; then
62458
62459  # Only process if variable expands to non-empty
62460
62461  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62463
62464  # Input might be given as Windows format, start by converting to
62465  # unix format.
62466  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62467  new_path=`$CYGPATH -u "$path"`
62468
62469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62472  # "foo.exe" is OK but "foo" is an error.
62473  #
62474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62475  # It is also a way to make sure we got the proper file name for the real test later on.
62476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62477  if test "x$test_shortpath" = x; then
62478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62480    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62481  fi
62482
62483  # Call helper function which possibly converts this using DOS-style short mode.
62484  # If so, the updated path is stored in $new_path.
62485
62486  input_path="$new_path"
62487  # Check if we need to convert this using DOS-style short mode. If the path
62488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62489  # take no chances and rewrite it.
62490  # Note: m4 eats our [], so we need to use [ and ] instead.
62491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62492  if test "x$has_forbidden_chars" != x; then
62493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62497      # Going to short mode and back again did indeed matter. Since short mode is
62498      # case insensitive, let's make it lowercase to improve readability.
62499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62500      # Now convert it back to Unix-style (cygpath)
62501      input_path=`$CYGPATH -u "$shortmode_path"`
62502      new_path="$input_path"
62503    fi
62504  fi
62505
62506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62507  if test "x$test_cygdrive_prefix" = x; then
62508    # As a simple fix, exclude /usr/bin since it's not a real path.
62509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62511      # a path prefixed by /cygdrive for fixpath to work.
62512      new_path="$CYGWIN_ROOT_PATH$input_path"
62513    fi
62514  fi
62515
62516
62517  if test "x$path" != "x$new_path"; then
62518    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62520$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62521  fi
62522
62523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62524
62525  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62526  has_colon=`$ECHO $path | $GREP ^.:`
62527  new_path="$path"
62528  if test "x$has_colon" = x; then
62529    # Not in mixed or Windows style, start by that.
62530    new_path=`cmd //c echo $path`
62531  fi
62532
62533
62534  input_path="$new_path"
62535  # Check if we need to convert this using DOS-style short mode. If the path
62536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62537  # take no chances and rewrite it.
62538  # Note: m4 eats our [], so we need to use [ and ] instead.
62539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62540  if test "x$has_forbidden_chars" != x; then
62541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62543  fi
62544
62545
62546  windows_path="$new_path"
62547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62548    unix_path=`$CYGPATH -u "$windows_path"`
62549    new_path="$unix_path"
62550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62552    new_path="$unix_path"
62553  fi
62554
62555  if test "x$path" != "x$new_path"; then
62556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62559  fi
62560
62561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62563
62564    else
62565      # We're on a unix platform. Hooray! :)
62566      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62567      has_space=`$ECHO "$path" | $GREP " "`
62568      if test "x$has_space" != x; then
62569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62572      fi
62573
62574      # Use eval to expand a potential ~
62575      eval path="$path"
62576      if test ! -f "$path" && test ! -d "$path"; then
62577        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62578      fi
62579
62580      if test -d "$path"; then
62581        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62582      else
62583        dir="`$DIRNAME "$path"`"
62584        base="`$BASENAME "$path"`"
62585        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62586      fi
62587    fi
62588  fi
62589
62590
62591  # Only process if variable expands to non-empty
62592
62593  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62595
62596  # Input might be given as Windows format, start by converting to
62597  # unix format.
62598  path="$POTENTIAL_FREETYPE_LIB_PATH"
62599  new_path=`$CYGPATH -u "$path"`
62600
62601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62604  # "foo.exe" is OK but "foo" is an error.
62605  #
62606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62607  # It is also a way to make sure we got the proper file name for the real test later on.
62608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62609  if test "x$test_shortpath" = x; then
62610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62612    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62613  fi
62614
62615  # Call helper function which possibly converts this using DOS-style short mode.
62616  # If so, the updated path is stored in $new_path.
62617
62618  input_path="$new_path"
62619  # Check if we need to convert this using DOS-style short mode. If the path
62620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62621  # take no chances and rewrite it.
62622  # Note: m4 eats our [], so we need to use [ and ] instead.
62623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62624  if test "x$has_forbidden_chars" != x; then
62625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62629      # Going to short mode and back again did indeed matter. Since short mode is
62630      # case insensitive, let's make it lowercase to improve readability.
62631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62632      # Now convert it back to Unix-style (cygpath)
62633      input_path=`$CYGPATH -u "$shortmode_path"`
62634      new_path="$input_path"
62635    fi
62636  fi
62637
62638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62639  if test "x$test_cygdrive_prefix" = x; then
62640    # As a simple fix, exclude /usr/bin since it's not a real path.
62641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62643      # a path prefixed by /cygdrive for fixpath to work.
62644      new_path="$CYGWIN_ROOT_PATH$input_path"
62645    fi
62646  fi
62647
62648
62649  if test "x$path" != "x$new_path"; then
62650    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62653  fi
62654
62655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62656
62657  path="$POTENTIAL_FREETYPE_LIB_PATH"
62658  has_colon=`$ECHO $path | $GREP ^.:`
62659  new_path="$path"
62660  if test "x$has_colon" = x; then
62661    # Not in mixed or Windows style, start by that.
62662    new_path=`cmd //c echo $path`
62663  fi
62664
62665
62666  input_path="$new_path"
62667  # Check if we need to convert this using DOS-style short mode. If the path
62668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62669  # take no chances and rewrite it.
62670  # Note: m4 eats our [], so we need to use [ and ] instead.
62671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62672  if test "x$has_forbidden_chars" != x; then
62673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62675  fi
62676
62677
62678  windows_path="$new_path"
62679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62680    unix_path=`$CYGPATH -u "$windows_path"`
62681    new_path="$unix_path"
62682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62684    new_path="$unix_path"
62685  fi
62686
62687  if test "x$path" != "x$new_path"; then
62688    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62691  fi
62692
62693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62695
62696    else
62697      # We're on a unix platform. Hooray! :)
62698      path="$POTENTIAL_FREETYPE_LIB_PATH"
62699      has_space=`$ECHO "$path" | $GREP " "`
62700      if test "x$has_space" != x; then
62701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62704      fi
62705
62706      # Use eval to expand a potential ~
62707      eval path="$path"
62708      if test ! -f "$path" && test ! -d "$path"; then
62709        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62710      fi
62711
62712      if test -d "$path"; then
62713        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62714      else
62715        dir="`$DIRNAME "$path"`"
62716        base="`$BASENAME "$path"`"
62717        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62718      fi
62719    fi
62720  fi
62721
62722
62723    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62725$as_echo_n "checking for freetype includes... " >&6; }
62726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62727$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62728    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62730$as_echo_n "checking for freetype libraries... " >&6; }
62731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62732$as_echo "$FREETYPE_LIB_PATH" >&6; }
62733  fi
62734
62735            fi
62736          fi
62737
62738          if test "x$FOUND_FREETYPE" != xyes; then
62739            FREETYPE_BASE_DIR="$SYSROOT/usr"
62740            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62741
62742  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62743  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62744  METHOD="well-known location"
62745
62746  # Let's start with an optimistic view of the world :-)
62747  FOUND_FREETYPE=yes
62748
62749  # First look for the canonical freetype main include file ft2build.h.
62750  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62751    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62752    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62753    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62754      # Fail.
62755      FOUND_FREETYPE=no
62756    fi
62757  fi
62758
62759  if test "x$FOUND_FREETYPE" = xyes; then
62760    # Include file found, let's continue the sanity check.
62761    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62762$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62763
62764    # Reset to default value
62765    FREETYPE_BASE_NAME=freetype
62766    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62767    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62768      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62769          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62770        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62771        # for the .6 version explicitly.
62772        FREETYPE_BASE_NAME=freetype.6
62773        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62774        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62775$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62776      else
62777        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62778$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62779        FOUND_FREETYPE=no
62780      fi
62781    else
62782      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62783        # On Windows, we will need both .lib and .dll file.
62784        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62785          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62786$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62787          FOUND_FREETYPE=no
62788        fi
62789      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62790          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62791        # Found lib in isa dir, use that instead.
62792        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62793        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62794$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62795      fi
62796    fi
62797  fi
62798
62799  if test "x$FOUND_FREETYPE" = xyes; then
62800
62801  # Only process if variable expands to non-empty
62802
62803  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62805
62806  # Input might be given as Windows format, start by converting to
62807  # unix format.
62808  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62809  new_path=`$CYGPATH -u "$path"`
62810
62811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62814  # "foo.exe" is OK but "foo" is an error.
62815  #
62816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62817  # It is also a way to make sure we got the proper file name for the real test later on.
62818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62819  if test "x$test_shortpath" = x; then
62820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62822    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62823  fi
62824
62825  # Call helper function which possibly converts this using DOS-style short mode.
62826  # If so, the updated path is stored in $new_path.
62827
62828  input_path="$new_path"
62829  # Check if we need to convert this using DOS-style short mode. If the path
62830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62831  # take no chances and rewrite it.
62832  # Note: m4 eats our [], so we need to use [ and ] instead.
62833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62834  if test "x$has_forbidden_chars" != x; then
62835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62839      # Going to short mode and back again did indeed matter. Since short mode is
62840      # case insensitive, let's make it lowercase to improve readability.
62841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62842      # Now convert it back to Unix-style (cygpath)
62843      input_path=`$CYGPATH -u "$shortmode_path"`
62844      new_path="$input_path"
62845    fi
62846  fi
62847
62848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62849  if test "x$test_cygdrive_prefix" = x; then
62850    # As a simple fix, exclude /usr/bin since it's not a real path.
62851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62853      # a path prefixed by /cygdrive for fixpath to work.
62854      new_path="$CYGWIN_ROOT_PATH$input_path"
62855    fi
62856  fi
62857
62858
62859  if test "x$path" != "x$new_path"; then
62860    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62863  fi
62864
62865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62866
62867  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62868  has_colon=`$ECHO $path | $GREP ^.:`
62869  new_path="$path"
62870  if test "x$has_colon" = x; then
62871    # Not in mixed or Windows style, start by that.
62872    new_path=`cmd //c echo $path`
62873  fi
62874
62875
62876  input_path="$new_path"
62877  # Check if we need to convert this using DOS-style short mode. If the path
62878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62879  # take no chances and rewrite it.
62880  # Note: m4 eats our [], so we need to use [ and ] instead.
62881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62882  if test "x$has_forbidden_chars" != x; then
62883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62885  fi
62886
62887
62888  windows_path="$new_path"
62889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62890    unix_path=`$CYGPATH -u "$windows_path"`
62891    new_path="$unix_path"
62892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62894    new_path="$unix_path"
62895  fi
62896
62897  if test "x$path" != "x$new_path"; then
62898    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62901  fi
62902
62903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62905
62906    else
62907      # We're on a unix platform. Hooray! :)
62908      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62909      has_space=`$ECHO "$path" | $GREP " "`
62910      if test "x$has_space" != x; then
62911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62914      fi
62915
62916      # Use eval to expand a potential ~
62917      eval path="$path"
62918      if test ! -f "$path" && test ! -d "$path"; then
62919        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62920      fi
62921
62922      if test -d "$path"; then
62923        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62924      else
62925        dir="`$DIRNAME "$path"`"
62926        base="`$BASENAME "$path"`"
62927        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62928      fi
62929    fi
62930  fi
62931
62932
62933  # Only process if variable expands to non-empty
62934
62935  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62937
62938  # Input might be given as Windows format, start by converting to
62939  # unix format.
62940  path="$POTENTIAL_FREETYPE_LIB_PATH"
62941  new_path=`$CYGPATH -u "$path"`
62942
62943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62946  # "foo.exe" is OK but "foo" is an error.
62947  #
62948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62949  # It is also a way to make sure we got the proper file name for the real test later on.
62950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62951  if test "x$test_shortpath" = x; then
62952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62954    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62955  fi
62956
62957  # Call helper function which possibly converts this using DOS-style short mode.
62958  # If so, the updated path is stored in $new_path.
62959
62960  input_path="$new_path"
62961  # Check if we need to convert this using DOS-style short mode. If the path
62962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62963  # take no chances and rewrite it.
62964  # Note: m4 eats our [], so we need to use [ and ] instead.
62965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62966  if test "x$has_forbidden_chars" != x; then
62967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62971      # Going to short mode and back again did indeed matter. Since short mode is
62972      # case insensitive, let's make it lowercase to improve readability.
62973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62974      # Now convert it back to Unix-style (cygpath)
62975      input_path=`$CYGPATH -u "$shortmode_path"`
62976      new_path="$input_path"
62977    fi
62978  fi
62979
62980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62981  if test "x$test_cygdrive_prefix" = x; then
62982    # As a simple fix, exclude /usr/bin since it's not a real path.
62983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62985      # a path prefixed by /cygdrive for fixpath to work.
62986      new_path="$CYGWIN_ROOT_PATH$input_path"
62987    fi
62988  fi
62989
62990
62991  if test "x$path" != "x$new_path"; then
62992    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62994$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62995  fi
62996
62997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62998
62999  path="$POTENTIAL_FREETYPE_LIB_PATH"
63000  has_colon=`$ECHO $path | $GREP ^.:`
63001  new_path="$path"
63002  if test "x$has_colon" = x; then
63003    # Not in mixed or Windows style, start by that.
63004    new_path=`cmd //c echo $path`
63005  fi
63006
63007
63008  input_path="$new_path"
63009  # Check if we need to convert this using DOS-style short mode. If the path
63010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63011  # take no chances and rewrite it.
63012  # Note: m4 eats our [], so we need to use [ and ] instead.
63013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63014  if test "x$has_forbidden_chars" != x; then
63015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63017  fi
63018
63019
63020  windows_path="$new_path"
63021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63022    unix_path=`$CYGPATH -u "$windows_path"`
63023    new_path="$unix_path"
63024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63026    new_path="$unix_path"
63027  fi
63028
63029  if test "x$path" != "x$new_path"; then
63030    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63033  fi
63034
63035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63037
63038    else
63039      # We're on a unix platform. Hooray! :)
63040      path="$POTENTIAL_FREETYPE_LIB_PATH"
63041      has_space=`$ECHO "$path" | $GREP " "`
63042      if test "x$has_space" != x; then
63043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63046      fi
63047
63048      # Use eval to expand a potential ~
63049      eval path="$path"
63050      if test ! -f "$path" && test ! -d "$path"; then
63051        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63052      fi
63053
63054      if test -d "$path"; then
63055        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63056      else
63057        dir="`$DIRNAME "$path"`"
63058        base="`$BASENAME "$path"`"
63059        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63060      fi
63061    fi
63062  fi
63063
63064
63065    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63067$as_echo_n "checking for freetype includes... " >&6; }
63068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63069$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63070    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63072$as_echo_n "checking for freetype libraries... " >&6; }
63073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63074$as_echo "$FREETYPE_LIB_PATH" >&6; }
63075  fi
63076
63077            else
63078
63079  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63080  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63081  METHOD="well-known location"
63082
63083  # Let's start with an optimistic view of the world :-)
63084  FOUND_FREETYPE=yes
63085
63086  # First look for the canonical freetype main include file ft2build.h.
63087  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63088    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63089    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63090    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63091      # Fail.
63092      FOUND_FREETYPE=no
63093    fi
63094  fi
63095
63096  if test "x$FOUND_FREETYPE" = xyes; then
63097    # Include file found, let's continue the sanity check.
63098    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63099$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63100
63101    # Reset to default value
63102    FREETYPE_BASE_NAME=freetype
63103    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63104    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63105      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63107        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63108        # for the .6 version explicitly.
63109        FREETYPE_BASE_NAME=freetype.6
63110        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63111        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63112$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63113      else
63114        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63116        FOUND_FREETYPE=no
63117      fi
63118    else
63119      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63120        # On Windows, we will need both .lib and .dll file.
63121        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63122          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63123$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63124          FOUND_FREETYPE=no
63125        fi
63126      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63127          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63128        # Found lib in isa dir, use that instead.
63129        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63130        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63131$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63132      fi
63133    fi
63134  fi
63135
63136  if test "x$FOUND_FREETYPE" = xyes; then
63137
63138  # Only process if variable expands to non-empty
63139
63140  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63142
63143  # Input might be given as Windows format, start by converting to
63144  # unix format.
63145  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63146  new_path=`$CYGPATH -u "$path"`
63147
63148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63151  # "foo.exe" is OK but "foo" is an error.
63152  #
63153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63154  # It is also a way to make sure we got the proper file name for the real test later on.
63155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63156  if test "x$test_shortpath" = x; then
63157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63159    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63160  fi
63161
63162  # Call helper function which possibly converts this using DOS-style short mode.
63163  # If so, the updated path is stored in $new_path.
63164
63165  input_path="$new_path"
63166  # Check if we need to convert this using DOS-style short mode. If the path
63167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63168  # take no chances and rewrite it.
63169  # Note: m4 eats our [], so we need to use [ and ] instead.
63170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63171  if test "x$has_forbidden_chars" != x; then
63172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63176      # Going to short mode and back again did indeed matter. Since short mode is
63177      # case insensitive, let's make it lowercase to improve readability.
63178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63179      # Now convert it back to Unix-style (cygpath)
63180      input_path=`$CYGPATH -u "$shortmode_path"`
63181      new_path="$input_path"
63182    fi
63183  fi
63184
63185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63186  if test "x$test_cygdrive_prefix" = x; then
63187    # As a simple fix, exclude /usr/bin since it's not a real path.
63188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63190      # a path prefixed by /cygdrive for fixpath to work.
63191      new_path="$CYGWIN_ROOT_PATH$input_path"
63192    fi
63193  fi
63194
63195
63196  if test "x$path" != "x$new_path"; then
63197    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63200  fi
63201
63202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63203
63204  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63205  has_colon=`$ECHO $path | $GREP ^.:`
63206  new_path="$path"
63207  if test "x$has_colon" = x; then
63208    # Not in mixed or Windows style, start by that.
63209    new_path=`cmd //c echo $path`
63210  fi
63211
63212
63213  input_path="$new_path"
63214  # Check if we need to convert this using DOS-style short mode. If the path
63215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63216  # take no chances and rewrite it.
63217  # Note: m4 eats our [], so we need to use [ and ] instead.
63218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63219  if test "x$has_forbidden_chars" != x; then
63220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63222  fi
63223
63224
63225  windows_path="$new_path"
63226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63227    unix_path=`$CYGPATH -u "$windows_path"`
63228    new_path="$unix_path"
63229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63231    new_path="$unix_path"
63232  fi
63233
63234  if test "x$path" != "x$new_path"; then
63235    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63238  fi
63239
63240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63242
63243    else
63244      # We're on a unix platform. Hooray! :)
63245      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63246      has_space=`$ECHO "$path" | $GREP " "`
63247      if test "x$has_space" != x; then
63248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63251      fi
63252
63253      # Use eval to expand a potential ~
63254      eval path="$path"
63255      if test ! -f "$path" && test ! -d "$path"; then
63256        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63257      fi
63258
63259      if test -d "$path"; then
63260        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63261      else
63262        dir="`$DIRNAME "$path"`"
63263        base="`$BASENAME "$path"`"
63264        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63265      fi
63266    fi
63267  fi
63268
63269
63270  # Only process if variable expands to non-empty
63271
63272  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63274
63275  # Input might be given as Windows format, start by converting to
63276  # unix format.
63277  path="$POTENTIAL_FREETYPE_LIB_PATH"
63278  new_path=`$CYGPATH -u "$path"`
63279
63280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63283  # "foo.exe" is OK but "foo" is an error.
63284  #
63285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63286  # It is also a way to make sure we got the proper file name for the real test later on.
63287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63288  if test "x$test_shortpath" = x; then
63289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63291    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63292  fi
63293
63294  # Call helper function which possibly converts this using DOS-style short mode.
63295  # If so, the updated path is stored in $new_path.
63296
63297  input_path="$new_path"
63298  # Check if we need to convert this using DOS-style short mode. If the path
63299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63300  # take no chances and rewrite it.
63301  # Note: m4 eats our [], so we need to use [ and ] instead.
63302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63303  if test "x$has_forbidden_chars" != x; then
63304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63308      # Going to short mode and back again did indeed matter. Since short mode is
63309      # case insensitive, let's make it lowercase to improve readability.
63310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63311      # Now convert it back to Unix-style (cygpath)
63312      input_path=`$CYGPATH -u "$shortmode_path"`
63313      new_path="$input_path"
63314    fi
63315  fi
63316
63317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63318  if test "x$test_cygdrive_prefix" = x; then
63319    # As a simple fix, exclude /usr/bin since it's not a real path.
63320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63322      # a path prefixed by /cygdrive for fixpath to work.
63323      new_path="$CYGWIN_ROOT_PATH$input_path"
63324    fi
63325  fi
63326
63327
63328  if test "x$path" != "x$new_path"; then
63329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63332  fi
63333
63334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63335
63336  path="$POTENTIAL_FREETYPE_LIB_PATH"
63337  has_colon=`$ECHO $path | $GREP ^.:`
63338  new_path="$path"
63339  if test "x$has_colon" = x; then
63340    # Not in mixed or Windows style, start by that.
63341    new_path=`cmd //c echo $path`
63342  fi
63343
63344
63345  input_path="$new_path"
63346  # Check if we need to convert this using DOS-style short mode. If the path
63347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63348  # take no chances and rewrite it.
63349  # Note: m4 eats our [], so we need to use [ and ] instead.
63350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63351  if test "x$has_forbidden_chars" != x; then
63352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63354  fi
63355
63356
63357  windows_path="$new_path"
63358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63359    unix_path=`$CYGPATH -u "$windows_path"`
63360    new_path="$unix_path"
63361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63363    new_path="$unix_path"
63364  fi
63365
63366  if test "x$path" != "x$new_path"; then
63367    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63370  fi
63371
63372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63374
63375    else
63376      # We're on a unix platform. Hooray! :)
63377      path="$POTENTIAL_FREETYPE_LIB_PATH"
63378      has_space=`$ECHO "$path" | $GREP " "`
63379      if test "x$has_space" != x; then
63380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63383      fi
63384
63385      # Use eval to expand a potential ~
63386      eval path="$path"
63387      if test ! -f "$path" && test ! -d "$path"; then
63388        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63389      fi
63390
63391      if test -d "$path"; then
63392        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63393      else
63394        dir="`$DIRNAME "$path"`"
63395        base="`$BASENAME "$path"`"
63396        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63397      fi
63398    fi
63399  fi
63400
63401
63402    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63404$as_echo_n "checking for freetype includes... " >&6; }
63405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63406$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63407    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63409$as_echo_n "checking for freetype libraries... " >&6; }
63410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63411$as_echo "$FREETYPE_LIB_PATH" >&6; }
63412  fi
63413
63414              if test "x$FOUND_FREETYPE" != xyes; then
63415
63416  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63417  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63418  METHOD="well-known location"
63419
63420  # Let's start with an optimistic view of the world :-)
63421  FOUND_FREETYPE=yes
63422
63423  # First look for the canonical freetype main include file ft2build.h.
63424  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63425    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63426    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63427    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63428      # Fail.
63429      FOUND_FREETYPE=no
63430    fi
63431  fi
63432
63433  if test "x$FOUND_FREETYPE" = xyes; then
63434    # Include file found, let's continue the sanity check.
63435    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63436$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63437
63438    # Reset to default value
63439    FREETYPE_BASE_NAME=freetype
63440    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63441    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63442      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63443          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63444        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63445        # for the .6 version explicitly.
63446        FREETYPE_BASE_NAME=freetype.6
63447        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63448        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63449$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63450      else
63451        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63452$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63453        FOUND_FREETYPE=no
63454      fi
63455    else
63456      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63457        # On Windows, we will need both .lib and .dll file.
63458        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63459          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63460$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63461          FOUND_FREETYPE=no
63462        fi
63463      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63464          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63465        # Found lib in isa dir, use that instead.
63466        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63467        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63468$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63469      fi
63470    fi
63471  fi
63472
63473  if test "x$FOUND_FREETYPE" = xyes; then
63474
63475  # Only process if variable expands to non-empty
63476
63477  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63479
63480  # Input might be given as Windows format, start by converting to
63481  # unix format.
63482  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63483  new_path=`$CYGPATH -u "$path"`
63484
63485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63488  # "foo.exe" is OK but "foo" is an error.
63489  #
63490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63491  # It is also a way to make sure we got the proper file name for the real test later on.
63492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63493  if test "x$test_shortpath" = x; then
63494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63496    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63497  fi
63498
63499  # Call helper function which possibly converts this using DOS-style short mode.
63500  # If so, the updated path is stored in $new_path.
63501
63502  input_path="$new_path"
63503  # Check if we need to convert this using DOS-style short mode. If the path
63504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63505  # take no chances and rewrite it.
63506  # Note: m4 eats our [], so we need to use [ and ] instead.
63507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63508  if test "x$has_forbidden_chars" != x; then
63509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63513      # Going to short mode and back again did indeed matter. Since short mode is
63514      # case insensitive, let's make it lowercase to improve readability.
63515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63516      # Now convert it back to Unix-style (cygpath)
63517      input_path=`$CYGPATH -u "$shortmode_path"`
63518      new_path="$input_path"
63519    fi
63520  fi
63521
63522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63523  if test "x$test_cygdrive_prefix" = x; then
63524    # As a simple fix, exclude /usr/bin since it's not a real path.
63525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63527      # a path prefixed by /cygdrive for fixpath to work.
63528      new_path="$CYGWIN_ROOT_PATH$input_path"
63529    fi
63530  fi
63531
63532
63533  if test "x$path" != "x$new_path"; then
63534    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63537  fi
63538
63539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63540
63541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63542  has_colon=`$ECHO $path | $GREP ^.:`
63543  new_path="$path"
63544  if test "x$has_colon" = x; then
63545    # Not in mixed or Windows style, start by that.
63546    new_path=`cmd //c echo $path`
63547  fi
63548
63549
63550  input_path="$new_path"
63551  # Check if we need to convert this using DOS-style short mode. If the path
63552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63553  # take no chances and rewrite it.
63554  # Note: m4 eats our [], so we need to use [ and ] instead.
63555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63556  if test "x$has_forbidden_chars" != x; then
63557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63559  fi
63560
63561
63562  windows_path="$new_path"
63563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63564    unix_path=`$CYGPATH -u "$windows_path"`
63565    new_path="$unix_path"
63566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63568    new_path="$unix_path"
63569  fi
63570
63571  if test "x$path" != "x$new_path"; then
63572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63575  fi
63576
63577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63579
63580    else
63581      # We're on a unix platform. Hooray! :)
63582      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63583      has_space=`$ECHO "$path" | $GREP " "`
63584      if test "x$has_space" != x; then
63585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63588      fi
63589
63590      # Use eval to expand a potential ~
63591      eval path="$path"
63592      if test ! -f "$path" && test ! -d "$path"; then
63593        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63594      fi
63595
63596      if test -d "$path"; then
63597        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63598      else
63599        dir="`$DIRNAME "$path"`"
63600        base="`$BASENAME "$path"`"
63601        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63602      fi
63603    fi
63604  fi
63605
63606
63607  # Only process if variable expands to non-empty
63608
63609  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63611
63612  # Input might be given as Windows format, start by converting to
63613  # unix format.
63614  path="$POTENTIAL_FREETYPE_LIB_PATH"
63615  new_path=`$CYGPATH -u "$path"`
63616
63617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63620  # "foo.exe" is OK but "foo" is an error.
63621  #
63622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63623  # It is also a way to make sure we got the proper file name for the real test later on.
63624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63625  if test "x$test_shortpath" = x; then
63626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63629  fi
63630
63631  # Call helper function which possibly converts this using DOS-style short mode.
63632  # If so, the updated path is stored in $new_path.
63633
63634  input_path="$new_path"
63635  # Check if we need to convert this using DOS-style short mode. If the path
63636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63637  # take no chances and rewrite it.
63638  # Note: m4 eats our [], so we need to use [ and ] instead.
63639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63640  if test "x$has_forbidden_chars" != x; then
63641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63645      # Going to short mode and back again did indeed matter. Since short mode is
63646      # case insensitive, let's make it lowercase to improve readability.
63647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63648      # Now convert it back to Unix-style (cygpath)
63649      input_path=`$CYGPATH -u "$shortmode_path"`
63650      new_path="$input_path"
63651    fi
63652  fi
63653
63654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63655  if test "x$test_cygdrive_prefix" = x; then
63656    # As a simple fix, exclude /usr/bin since it's not a real path.
63657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63659      # a path prefixed by /cygdrive for fixpath to work.
63660      new_path="$CYGWIN_ROOT_PATH$input_path"
63661    fi
63662  fi
63663
63664
63665  if test "x$path" != "x$new_path"; then
63666    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63669  fi
63670
63671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63672
63673  path="$POTENTIAL_FREETYPE_LIB_PATH"
63674  has_colon=`$ECHO $path | $GREP ^.:`
63675  new_path="$path"
63676  if test "x$has_colon" = x; then
63677    # Not in mixed or Windows style, start by that.
63678    new_path=`cmd //c echo $path`
63679  fi
63680
63681
63682  input_path="$new_path"
63683  # Check if we need to convert this using DOS-style short mode. If the path
63684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63685  # take no chances and rewrite it.
63686  # Note: m4 eats our [], so we need to use [ and ] instead.
63687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63688  if test "x$has_forbidden_chars" != x; then
63689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63691  fi
63692
63693
63694  windows_path="$new_path"
63695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63696    unix_path=`$CYGPATH -u "$windows_path"`
63697    new_path="$unix_path"
63698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63700    new_path="$unix_path"
63701  fi
63702
63703  if test "x$path" != "x$new_path"; then
63704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63707  fi
63708
63709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63711
63712    else
63713      # We're on a unix platform. Hooray! :)
63714      path="$POTENTIAL_FREETYPE_LIB_PATH"
63715      has_space=`$ECHO "$path" | $GREP " "`
63716      if test "x$has_space" != x; then
63717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63720      fi
63721
63722      # Use eval to expand a potential ~
63723      eval path="$path"
63724      if test ! -f "$path" && test ! -d "$path"; then
63725        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63726      fi
63727
63728      if test -d "$path"; then
63729        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63730      else
63731        dir="`$DIRNAME "$path"`"
63732        base="`$BASENAME "$path"`"
63733        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63734      fi
63735    fi
63736  fi
63737
63738
63739    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63741$as_echo_n "checking for freetype includes... " >&6; }
63742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63743$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63744    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63746$as_echo_n "checking for freetype libraries... " >&6; }
63747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63748$as_echo "$FREETYPE_LIB_PATH" >&6; }
63749  fi
63750
63751              fi
63752            fi
63753          fi
63754        fi
63755      fi # end check in well-known locations
63756
63757      if test "x$FOUND_FREETYPE" != xyes; then
63758
63759  # Print a helpful message on how to acquire the necessary build dependency.
63760  # freetype is the help tag: freetype, cups, alsa etc
63761  MISSING_DEPENDENCY=freetype
63762
63763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63764    cygwin_help $MISSING_DEPENDENCY
63765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63766    msys_help $MISSING_DEPENDENCY
63767  else
63768    PKGHANDLER_COMMAND=
63769
63770    case $PKGHANDLER in
63771      apt-get)
63772        apt_help     $MISSING_DEPENDENCY ;;
63773      yum)
63774        yum_help     $MISSING_DEPENDENCY ;;
63775      brew)
63776        brew_help    $MISSING_DEPENDENCY ;;
63777      port)
63778        port_help    $MISSING_DEPENDENCY ;;
63779      pkgutil)
63780        pkgutil_help $MISSING_DEPENDENCY ;;
63781      pkgadd)
63782        pkgadd_help  $MISSING_DEPENDENCY ;;
63783    esac
63784
63785    if test "x$PKGHANDLER_COMMAND" != x; then
63786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63787    fi
63788  fi
63789
63790        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63791      fi
63792    fi # end user specified settings
63793
63794    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63795    if test "x$FREETYPE_CFLAGS" = x; then
63796
63797  # Only process if variable expands to non-empty
63798
63799  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63801
63802  # Input might be given as Windows format, start by converting to
63803  # unix format.
63804  path="$FREETYPE_INCLUDE_PATH"
63805  new_path=`$CYGPATH -u "$path"`
63806
63807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63810  # "foo.exe" is OK but "foo" is an error.
63811  #
63812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63813  # It is also a way to make sure we got the proper file name for the real test later on.
63814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63815  if test "x$test_shortpath" = x; then
63816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63817$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63818    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63819  fi
63820
63821  # Call helper function which possibly converts this using DOS-style short mode.
63822  # If so, the updated path is stored in $new_path.
63823
63824  input_path="$new_path"
63825  # Check if we need to convert this using DOS-style short mode. If the path
63826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63827  # take no chances and rewrite it.
63828  # Note: m4 eats our [], so we need to use [ and ] instead.
63829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63830  if test "x$has_forbidden_chars" != x; then
63831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63835      # Going to short mode and back again did indeed matter. Since short mode is
63836      # case insensitive, let's make it lowercase to improve readability.
63837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63838      # Now convert it back to Unix-style (cygpath)
63839      input_path=`$CYGPATH -u "$shortmode_path"`
63840      new_path="$input_path"
63841    fi
63842  fi
63843
63844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63845  if test "x$test_cygdrive_prefix" = x; then
63846    # As a simple fix, exclude /usr/bin since it's not a real path.
63847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63849      # a path prefixed by /cygdrive for fixpath to work.
63850      new_path="$CYGWIN_ROOT_PATH$input_path"
63851    fi
63852  fi
63853
63854
63855  if test "x$path" != "x$new_path"; then
63856    FREETYPE_INCLUDE_PATH="$new_path"
63857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63858$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63859  fi
63860
63861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63862
63863  path="$FREETYPE_INCLUDE_PATH"
63864  has_colon=`$ECHO $path | $GREP ^.:`
63865  new_path="$path"
63866  if test "x$has_colon" = x; then
63867    # Not in mixed or Windows style, start by that.
63868    new_path=`cmd //c echo $path`
63869  fi
63870
63871
63872  input_path="$new_path"
63873  # Check if we need to convert this using DOS-style short mode. If the path
63874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63875  # take no chances and rewrite it.
63876  # Note: m4 eats our [], so we need to use [ and ] instead.
63877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63878  if test "x$has_forbidden_chars" != x; then
63879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63881  fi
63882
63883
63884  windows_path="$new_path"
63885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63886    unix_path=`$CYGPATH -u "$windows_path"`
63887    new_path="$unix_path"
63888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63890    new_path="$unix_path"
63891  fi
63892
63893  if test "x$path" != "x$new_path"; then
63894    FREETYPE_INCLUDE_PATH="$new_path"
63895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63896$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63897  fi
63898
63899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63901
63902    else
63903      # We're on a unix platform. Hooray! :)
63904      path="$FREETYPE_INCLUDE_PATH"
63905      has_space=`$ECHO "$path" | $GREP " "`
63906      if test "x$has_space" != x; then
63907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63908$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63910      fi
63911
63912      # Use eval to expand a potential ~
63913      eval path="$path"
63914      if test ! -f "$path" && test ! -d "$path"; then
63915        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63916      fi
63917
63918      if test -d "$path"; then
63919        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63920      else
63921        dir="`$DIRNAME "$path"`"
63922        base="`$BASENAME "$path"`"
63923        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63924      fi
63925    fi
63926  fi
63927
63928      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63929        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63930      else
63931        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63932      fi
63933    fi
63934
63935    if test "x$FREETYPE_LIBS" = x; then
63936
63937  # Only process if variable expands to non-empty
63938
63939  if test "x$FREETYPE_LIB_PATH" != x; then
63940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63941
63942  # Input might be given as Windows format, start by converting to
63943  # unix format.
63944  path="$FREETYPE_LIB_PATH"
63945  new_path=`$CYGPATH -u "$path"`
63946
63947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63950  # "foo.exe" is OK but "foo" is an error.
63951  #
63952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63953  # It is also a way to make sure we got the proper file name for the real test later on.
63954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63955  if test "x$test_shortpath" = x; then
63956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63957$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63958    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63959  fi
63960
63961  # Call helper function which possibly converts this using DOS-style short mode.
63962  # If so, the updated path is stored in $new_path.
63963
63964  input_path="$new_path"
63965  # Check if we need to convert this using DOS-style short mode. If the path
63966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63967  # take no chances and rewrite it.
63968  # Note: m4 eats our [], so we need to use [ and ] instead.
63969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63970  if test "x$has_forbidden_chars" != x; then
63971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63975      # Going to short mode and back again did indeed matter. Since short mode is
63976      # case insensitive, let's make it lowercase to improve readability.
63977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63978      # Now convert it back to Unix-style (cygpath)
63979      input_path=`$CYGPATH -u "$shortmode_path"`
63980      new_path="$input_path"
63981    fi
63982  fi
63983
63984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63985  if test "x$test_cygdrive_prefix" = x; then
63986    # As a simple fix, exclude /usr/bin since it's not a real path.
63987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63989      # a path prefixed by /cygdrive for fixpath to work.
63990      new_path="$CYGWIN_ROOT_PATH$input_path"
63991    fi
63992  fi
63993
63994
63995  if test "x$path" != "x$new_path"; then
63996    FREETYPE_LIB_PATH="$new_path"
63997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63998$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63999  fi
64000
64001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64002
64003  path="$FREETYPE_LIB_PATH"
64004  has_colon=`$ECHO $path | $GREP ^.:`
64005  new_path="$path"
64006  if test "x$has_colon" = x; then
64007    # Not in mixed or Windows style, start by that.
64008    new_path=`cmd //c echo $path`
64009  fi
64010
64011
64012  input_path="$new_path"
64013  # Check if we need to convert this using DOS-style short mode. If the path
64014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64015  # take no chances and rewrite it.
64016  # Note: m4 eats our [], so we need to use [ and ] instead.
64017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64018  if test "x$has_forbidden_chars" != x; then
64019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64021  fi
64022
64023
64024  windows_path="$new_path"
64025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64026    unix_path=`$CYGPATH -u "$windows_path"`
64027    new_path="$unix_path"
64028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64030    new_path="$unix_path"
64031  fi
64032
64033  if test "x$path" != "x$new_path"; then
64034    FREETYPE_LIB_PATH="$new_path"
64035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64036$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64037  fi
64038
64039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64041
64042    else
64043      # We're on a unix platform. Hooray! :)
64044      path="$FREETYPE_LIB_PATH"
64045      has_space=`$ECHO "$path" | $GREP " "`
64046      if test "x$has_space" != x; then
64047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64048$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64050      fi
64051
64052      # Use eval to expand a potential ~
64053      eval path="$path"
64054      if test ! -f "$path" && test ! -d "$path"; then
64055        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64056      fi
64057
64058      if test -d "$path"; then
64059        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64060      else
64061        dir="`$DIRNAME "$path"`"
64062        base="`$BASENAME "$path"`"
64063        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64064      fi
64065    fi
64066  fi
64067
64068      if test "x$OPENJDK_TARGET_OS" = xwindows; then
64069        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64070      else
64071        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64072      fi
64073    fi
64074
64075    # Try to compile it
64076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64077$as_echo_n "checking if we can compile and link with freetype... " >&6; }
64078    ac_ext=cpp
64079ac_cpp='$CXXCPP $CPPFLAGS'
64080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64083
64084    PREV_CXXCFLAGS="$CXXFLAGS"
64085    PREV_LIBS="$LIBS"
64086    PREV_CXX="$CXX"
64087    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64088    LIBS="$LIBS $FREETYPE_LIBS"
64089    CXX="$FIXPATH $CXX"
64090    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64091/* end confdefs.h.  */
64092
64093          #include<ft2build.h>
64094          #include FT_FREETYPE_H
64095          int main () {
64096            FT_Init_FreeType(NULL);
64097            return 0;
64098          }
64099
64100_ACEOF
64101if ac_fn_cxx_try_link "$LINENO"; then :
64102
64103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64104$as_echo "yes" >&6; }
64105
64106else
64107
64108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64109$as_echo "no" >&6; }
64110          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64111$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64112          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64113$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64114
64115
64116  # Print a helpful message on how to acquire the necessary build dependency.
64117  # freetype is the help tag: freetype, cups, alsa etc
64118  MISSING_DEPENDENCY=freetype
64119
64120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64121    cygwin_help $MISSING_DEPENDENCY
64122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64123    msys_help $MISSING_DEPENDENCY
64124  else
64125    PKGHANDLER_COMMAND=
64126
64127    case $PKGHANDLER in
64128      apt-get)
64129        apt_help     $MISSING_DEPENDENCY ;;
64130      yum)
64131        yum_help     $MISSING_DEPENDENCY ;;
64132      brew)
64133        brew_help    $MISSING_DEPENDENCY ;;
64134      port)
64135        port_help    $MISSING_DEPENDENCY ;;
64136      pkgutil)
64137        pkgutil_help $MISSING_DEPENDENCY ;;
64138      pkgadd)
64139        pkgadd_help  $MISSING_DEPENDENCY ;;
64140    esac
64141
64142    if test "x$PKGHANDLER_COMMAND" != x; then
64143      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64144    fi
64145  fi
64146
64147
64148          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64149
64150
64151fi
64152rm -f core conftest.err conftest.$ac_objext \
64153    conftest$ac_exeext conftest.$ac_ext
64154    CXXCFLAGS="$PREV_CXXFLAGS"
64155    LIBS="$PREV_LIBS"
64156    CXX="$PREV_CXX"
64157    ac_ext=cpp
64158ac_cpp='$CXXCPP $CPPFLAGS'
64159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64162
64163
64164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64165$as_echo_n "checking if we should bundle freetype... " >&6; }
64166    if test "x$BUNDLE_FREETYPE" = xyes; then
64167      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64168    fi
64169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64170$as_echo "$BUNDLE_FREETYPE" >&6; }
64171
64172  fi # end freetype needed
64173
64174  FREETYPE_LICENSE=""
64175  if test "x$with_freetype_license" = "xyes"; then
64176    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64177  elif test "x$with_freetype_license" != "x"; then
64178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64179$as_echo_n "checking for freetype license... " >&6; }
64180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64181$as_echo "$with_freetype_license" >&6; }
64182    FREETYPE_LICENSE="$with_freetype_license"
64183
64184  # Only process if variable expands to non-empty
64185
64186  if test "x$FREETYPE_LICENSE" != x; then
64187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64188
64189  # Input might be given as Windows format, start by converting to
64190  # unix format.
64191  path="$FREETYPE_LICENSE"
64192  new_path=`$CYGPATH -u "$path"`
64193
64194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64197  # "foo.exe" is OK but "foo" is an error.
64198  #
64199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64200  # It is also a way to make sure we got the proper file name for the real test later on.
64201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64202  if test "x$test_shortpath" = x; then
64203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64204$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64205    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64206  fi
64207
64208  # Call helper function which possibly converts this using DOS-style short mode.
64209  # If so, the updated path is stored in $new_path.
64210
64211  input_path="$new_path"
64212  # Check if we need to convert this using DOS-style short mode. If the path
64213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64214  # take no chances and rewrite it.
64215  # Note: m4 eats our [], so we need to use [ and ] instead.
64216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64217  if test "x$has_forbidden_chars" != x; then
64218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64222      # Going to short mode and back again did indeed matter. Since short mode is
64223      # case insensitive, let's make it lowercase to improve readability.
64224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64225      # Now convert it back to Unix-style (cygpath)
64226      input_path=`$CYGPATH -u "$shortmode_path"`
64227      new_path="$input_path"
64228    fi
64229  fi
64230
64231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64232  if test "x$test_cygdrive_prefix" = x; then
64233    # As a simple fix, exclude /usr/bin since it's not a real path.
64234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64236      # a path prefixed by /cygdrive for fixpath to work.
64237      new_path="$CYGWIN_ROOT_PATH$input_path"
64238    fi
64239  fi
64240
64241
64242  if test "x$path" != "x$new_path"; then
64243    FREETYPE_LICENSE="$new_path"
64244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64245$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64246  fi
64247
64248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64249
64250  path="$FREETYPE_LICENSE"
64251  has_colon=`$ECHO $path | $GREP ^.:`
64252  new_path="$path"
64253  if test "x$has_colon" = x; then
64254    # Not in mixed or Windows style, start by that.
64255    new_path=`cmd //c echo $path`
64256  fi
64257
64258
64259  input_path="$new_path"
64260  # Check if we need to convert this using DOS-style short mode. If the path
64261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64262  # take no chances and rewrite it.
64263  # Note: m4 eats our [], so we need to use [ and ] instead.
64264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64265  if test "x$has_forbidden_chars" != x; then
64266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64268  fi
64269
64270
64271  windows_path="$new_path"
64272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64273    unix_path=`$CYGPATH -u "$windows_path"`
64274    new_path="$unix_path"
64275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64277    new_path="$unix_path"
64278  fi
64279
64280  if test "x$path" != "x$new_path"; then
64281    FREETYPE_LICENSE="$new_path"
64282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64283$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64284  fi
64285
64286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64288
64289    else
64290      # We're on a unix platform. Hooray! :)
64291      path="$FREETYPE_LICENSE"
64292      has_space=`$ECHO "$path" | $GREP " "`
64293      if test "x$has_space" != x; then
64294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64295$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64297      fi
64298
64299      # Use eval to expand a potential ~
64300      eval path="$path"
64301      if test ! -f "$path" && test ! -d "$path"; then
64302        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64303      fi
64304
64305      if test -d "$path"; then
64306        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64307      else
64308        dir="`$DIRNAME "$path"`"
64309        base="`$BASENAME "$path"`"
64310        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64311      fi
64312    fi
64313  fi
64314
64315    if test ! -f "$FREETYPE_LICENSE"; then
64316      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64317    fi
64318  fi
64319
64320
64321
64322
64323
64324
64325
64326
64327# Check whether --with-alsa was given.
64328if test "${with_alsa+set}" = set; then :
64329  withval=$with_alsa;
64330fi
64331
64332
64333# Check whether --with-alsa-include was given.
64334if test "${with_alsa_include+set}" = set; then :
64335  withval=$with_alsa_include;
64336fi
64337
64338
64339# Check whether --with-alsa-lib was given.
64340if test "${with_alsa_lib+set}" = set; then :
64341  withval=$with_alsa_lib;
64342fi
64343
64344
64345  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64346    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64347        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64348        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64349      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64350$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64351    fi
64352    ALSA_CFLAGS=
64353    ALSA_LIBS=
64354  else
64355    ALSA_FOUND=no
64356
64357    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64358      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64359    fi
64360
64361    if test "x${with_alsa}" != x; then
64362      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64363      ALSA_CFLAGS="-I${with_alsa}/include"
64364      ALSA_FOUND=yes
64365    fi
64366    if test "x${with_alsa_include}" != x; then
64367      ALSA_CFLAGS="-I${with_alsa_include}"
64368      ALSA_FOUND=yes
64369    fi
64370    if test "x${with_alsa_lib}" != x; then
64371      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64372      ALSA_FOUND=yes
64373    fi
64374    # Do not try pkg-config if we have a sysroot set.
64375    if test "x$SYSROOT" = x; then
64376      if test "x$ALSA_FOUND" = xno; then
64377
64378pkg_failed=no
64379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64380$as_echo_n "checking for ALSA... " >&6; }
64381
64382if test -n "$ALSA_CFLAGS"; then
64383    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64384 elif test -n "$PKG_CONFIG"; then
64385    if test -n "$PKG_CONFIG" && \
64386    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64387  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64388  ac_status=$?
64389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64390  test $ac_status = 0; }; then
64391  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64392else
64393  pkg_failed=yes
64394fi
64395 else
64396    pkg_failed=untried
64397fi
64398if test -n "$ALSA_LIBS"; then
64399    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64400 elif test -n "$PKG_CONFIG"; then
64401    if test -n "$PKG_CONFIG" && \
64402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64403  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64404  ac_status=$?
64405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64406  test $ac_status = 0; }; then
64407  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64408else
64409  pkg_failed=yes
64410fi
64411 else
64412    pkg_failed=untried
64413fi
64414
64415
64416
64417if test $pkg_failed = yes; then
64418
64419if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64420        _pkg_short_errors_supported=yes
64421else
64422        _pkg_short_errors_supported=no
64423fi
64424        if test $_pkg_short_errors_supported = yes; then
64425	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64426        else
64427	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64428        fi
64429	# Put the nasty error message in config.log where it belongs
64430	echo "$ALSA_PKG_ERRORS" >&5
64431
64432	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64433$as_echo "no" >&6; }
64434                ALSA_FOUND=no
64435elif test $pkg_failed = untried; then
64436	ALSA_FOUND=no
64437else
64438	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64439	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64441$as_echo "yes" >&6; }
64442	ALSA_FOUND=yes
64443fi
64444      fi
64445    fi
64446    if test "x$ALSA_FOUND" = xno; then
64447      for ac_header in alsa/asoundlib.h
64448do :
64449  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64450if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64451  cat >>confdefs.h <<_ACEOF
64452#define HAVE_ALSA_ASOUNDLIB_H 1
64453_ACEOF
64454
64455            ALSA_FOUND=yes
64456            ALSA_CFLAGS=-Iignoreme
64457            ALSA_LIBS=-lasound
64458            DEFAULT_ALSA=yes
64459
64460else
64461  ALSA_FOUND=no
64462
64463fi
64464
64465done
64466
64467    fi
64468    if test "x$ALSA_FOUND" = xno; then
64469
64470  # Print a helpful message on how to acquire the necessary build dependency.
64471  # alsa is the help tag: freetype, cups, alsa etc
64472  MISSING_DEPENDENCY=alsa
64473
64474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64475    cygwin_help $MISSING_DEPENDENCY
64476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64477    msys_help $MISSING_DEPENDENCY
64478  else
64479    PKGHANDLER_COMMAND=
64480
64481    case $PKGHANDLER in
64482      apt-get)
64483        apt_help     $MISSING_DEPENDENCY ;;
64484      yum)
64485        yum_help     $MISSING_DEPENDENCY ;;
64486      brew)
64487        brew_help    $MISSING_DEPENDENCY ;;
64488      port)
64489        port_help    $MISSING_DEPENDENCY ;;
64490      pkgutil)
64491        pkgutil_help $MISSING_DEPENDENCY ;;
64492      pkgadd)
64493        pkgadd_help  $MISSING_DEPENDENCY ;;
64494    esac
64495
64496    if test "x$PKGHANDLER_COMMAND" != x; then
64497      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64498    fi
64499  fi
64500
64501      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64502    fi
64503  fi
64504
64505
64506
64507
64508
64509
64510# Check whether --with-libffi was given.
64511if test "${with_libffi+set}" = set; then :
64512  withval=$with_libffi;
64513fi
64514
64515
64516# Check whether --with-libffi-include was given.
64517if test "${with_libffi_include+set}" = set; then :
64518  withval=$with_libffi_include;
64519fi
64520
64521
64522# Check whether --with-libffi-lib was given.
64523if test "${with_libffi_lib+set}" = set; then :
64524  withval=$with_libffi_lib;
64525fi
64526
64527  # Check whether --enable-libffi-bundling was given.
64528if test "${enable_libffi_bundling+set}" = set; then :
64529  enableval=$enable_libffi_bundling;
64530fi
64531
64532
64533  if test "x$NEEDS_LIB_FFI" = xfalse; then
64534    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64535        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64536        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64537      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64538$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64539    fi
64540    LIBFFI_CFLAGS=
64541    LIBFFI_LIBS=
64542  else
64543    LIBFFI_FOUND=no
64544
64545    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64546      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64547    fi
64548
64549    if test "x${with_libffi}" != x; then
64550      LIBFFI_LIB_PATH="${with_libffi}/lib"
64551      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64552      LIBFFI_CFLAGS="-I${with_libffi}/include"
64553      LIBFFI_FOUND=yes
64554    fi
64555    if test "x${with_libffi_include}" != x; then
64556      LIBFFI_CFLAGS="-I${with_libffi_include}"
64557      LIBFFI_FOUND=yes
64558    fi
64559    if test "x${with_libffi_lib}" != x; then
64560      LIBFFI_LIB_PATH="${with_libffi_lib}"
64561      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64562      LIBFFI_FOUND=yes
64563    fi
64564    # Do not try pkg-config if we have a sysroot set.
64565    if test "x$SYSROOT" = x; then
64566      if test "x$LIBFFI_FOUND" = xno; then
64567        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64568
64569pkg_failed=no
64570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64571$as_echo_n "checking for LIBFFI... " >&6; }
64572
64573if test -n "$LIBFFI_CFLAGS"; then
64574    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64575 elif test -n "$PKG_CONFIG"; then
64576    if test -n "$PKG_CONFIG" && \
64577    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64578  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64579  ac_status=$?
64580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64581  test $ac_status = 0; }; then
64582  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64583else
64584  pkg_failed=yes
64585fi
64586 else
64587    pkg_failed=untried
64588fi
64589if test -n "$LIBFFI_LIBS"; then
64590    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64591 elif test -n "$PKG_CONFIG"; then
64592    if test -n "$PKG_CONFIG" && \
64593    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64594  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64595  ac_status=$?
64596  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64597  test $ac_status = 0; }; then
64598  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64599else
64600  pkg_failed=yes
64601fi
64602 else
64603    pkg_failed=untried
64604fi
64605
64606
64607
64608if test $pkg_failed = yes; then
64609
64610if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64611        _pkg_short_errors_supported=yes
64612else
64613        _pkg_short_errors_supported=no
64614fi
64615        if test $_pkg_short_errors_supported = yes; then
64616	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64617        else
64618	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64619        fi
64620	# Put the nasty error message in config.log where it belongs
64621	echo "$LIBFFI_PKG_ERRORS" >&5
64622
64623	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64624$as_echo "no" >&6; }
64625                LIBFFI_FOUND=no
64626elif test $pkg_failed = untried; then
64627	LIBFFI_FOUND=no
64628else
64629	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64630	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64632$as_echo "yes" >&6; }
64633	LIBFFI_FOUND=yes
64634fi
64635      fi
64636    fi
64637    if test "x$LIBFFI_FOUND" = xno; then
64638      for ac_header in ffi.h
64639do :
64640  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64641if test "x$ac_cv_header_ffi_h" = xyes; then :
64642  cat >>confdefs.h <<_ACEOF
64643#define HAVE_FFI_H 1
64644_ACEOF
64645
64646            LIBFFI_FOUND=yes
64647            LIBFFI_CFLAGS=
64648            LIBFFI_LIBS=-lffi
64649
64650else
64651  LIBFFI_FOUND=no
64652
64653fi
64654
64655done
64656
64657    fi
64658    if test "x$LIBFFI_FOUND" = xno; then
64659
64660  # Print a helpful message on how to acquire the necessary build dependency.
64661  # ffi is the help tag: freetype, cups, alsa etc
64662  MISSING_DEPENDENCY=ffi
64663
64664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64665    cygwin_help $MISSING_DEPENDENCY
64666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64667    msys_help $MISSING_DEPENDENCY
64668  else
64669    PKGHANDLER_COMMAND=
64670
64671    case $PKGHANDLER in
64672      apt-get)
64673        apt_help     $MISSING_DEPENDENCY ;;
64674      yum)
64675        yum_help     $MISSING_DEPENDENCY ;;
64676      brew)
64677        brew_help    $MISSING_DEPENDENCY ;;
64678      port)
64679        port_help    $MISSING_DEPENDENCY ;;
64680      pkgutil)
64681        pkgutil_help $MISSING_DEPENDENCY ;;
64682      pkgadd)
64683        pkgadd_help  $MISSING_DEPENDENCY ;;
64684    esac
64685
64686    if test "x$PKGHANDLER_COMMAND" != x; then
64687      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64688    fi
64689  fi
64690
64691      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64692    fi
64693
64694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64695$as_echo_n "checking if libffi works... " >&6; }
64696    ac_ext=c
64697ac_cpp='$CPP $CPPFLAGS'
64698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64700ac_compiler_gnu=$ac_cv_c_compiler_gnu
64701
64702    OLD_CFLAGS="$CFLAGS"
64703    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64704    OLD_LIBS="$LIBS"
64705    LIBS="$LIBS $LIBFFI_LIBS"
64706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64707/* end confdefs.h.  */
64708#include <ffi.h>
64709int
64710main ()
64711{
64712
64713          ffi_call(NULL, NULL, NULL, NULL);
64714          return 0;
64715
64716  ;
64717  return 0;
64718}
64719_ACEOF
64720if ac_fn_c_try_link "$LINENO"; then :
64721  LIBFFI_WORKS=yes
64722else
64723  LIBFFI_WORKS=no
64724
64725fi
64726rm -f core conftest.err conftest.$ac_objext \
64727    conftest$ac_exeext conftest.$ac_ext
64728    CFLAGS="$OLD_CFLAGS"
64729    LIBS="$OLD_LIBS"
64730    ac_ext=cpp
64731ac_cpp='$CXXCPP $CPPFLAGS'
64732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64735
64736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64737$as_echo "$LIBFFI_WORKS" >&6; }
64738
64739    if test "x$LIBFFI_WORKS" = xno; then
64740
64741  # Print a helpful message on how to acquire the necessary build dependency.
64742  # ffi is the help tag: freetype, cups, alsa etc
64743  MISSING_DEPENDENCY=ffi
64744
64745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64746    cygwin_help $MISSING_DEPENDENCY
64747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64748    msys_help $MISSING_DEPENDENCY
64749  else
64750    PKGHANDLER_COMMAND=
64751
64752    case $PKGHANDLER in
64753      apt-get)
64754        apt_help     $MISSING_DEPENDENCY ;;
64755      yum)
64756        yum_help     $MISSING_DEPENDENCY ;;
64757      brew)
64758        brew_help    $MISSING_DEPENDENCY ;;
64759      port)
64760        port_help    $MISSING_DEPENDENCY ;;
64761      pkgutil)
64762        pkgutil_help $MISSING_DEPENDENCY ;;
64763      pkgadd)
64764        pkgadd_help  $MISSING_DEPENDENCY ;;
64765    esac
64766
64767    if test "x$PKGHANDLER_COMMAND" != x; then
64768      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64769    fi
64770  fi
64771
64772      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64773    fi
64774
64775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64776$as_echo_n "checking if libffi should be bundled... " >&6; }
64777    if test "x$enable_libffi_bundling" = "x"; then
64778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64779$as_echo "no" >&6; }
64780      ENABLE_LIBFFI_BUNDLING=false
64781    elif  test "x$enable_libffi_bundling" = "xno"; then
64782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64783$as_echo "no, forced" >&6; }
64784      ENABLE_LIBFFI_BUNDLING=false
64785    elif  test "x$enable_libffi_bundling" = "xyes"; then
64786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64787$as_echo "yes, forced" >&6; }
64788      ENABLE_LIBFFI_BUNDLING=true
64789    else
64790      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64791    fi
64792
64793    # Find the libffi.so.X to bundle
64794    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64796$as_echo_n "checking for libffi lib file location... " >&6; }
64797      if test "x${LIBFFI_LIB_PATH}" != x; then
64798        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64799          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64800        else
64801          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64802        fi
64803      else
64804        # If we don't have an explicit path, look in a few obvious places
64805        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64806          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64807            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64808          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64809            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64810          else
64811            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64812          fi
64813        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64814          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64815            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64816          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64817            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64818          else
64819            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64820          fi
64821        else
64822          # Fallback on the default /usr/lib dir
64823          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64824            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64825          else
64826            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64827          fi
64828        fi
64829      fi
64830      # Make sure the wildcard is evaluated
64831      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64833$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64834    fi
64835  fi
64836
64837
64838
64839
64840
64841
64842
64843  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64844    # Extract the first word of "llvm-config", so it can be a program name with args.
64845set dummy llvm-config; ac_word=$2
64846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64847$as_echo_n "checking for $ac_word... " >&6; }
64848if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64849  $as_echo_n "(cached) " >&6
64850else
64851  if test -n "$LLVM_CONFIG"; then
64852  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64853else
64854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64855for as_dir in $PATH
64856do
64857  IFS=$as_save_IFS
64858  test -z "$as_dir" && as_dir=.
64859    for ac_exec_ext in '' $ac_executable_extensions; do
64860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64861    ac_cv_prog_LLVM_CONFIG="llvm-config"
64862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64863    break 2
64864  fi
64865done
64866  done
64867IFS=$as_save_IFS
64868
64869fi
64870fi
64871LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64872if test -n "$LLVM_CONFIG"; then
64873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64874$as_echo "$LLVM_CONFIG" >&6; }
64875else
64876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64877$as_echo "no" >&6; }
64878fi
64879
64880
64881
64882    if test "x$LLVM_CONFIG" != xllvm-config; then
64883      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64884    fi
64885
64886    llvm_components="jit mcjit engine nativecodegen native"
64887    unset LLVM_CFLAGS
64888    for flag in $("$LLVM_CONFIG" --cxxflags); do
64889      if echo "${flag}" | grep -q '^-[ID]'; then
64890        if test "${flag}" != "-D_DEBUG" ; then
64891          if test "${LLVM_CFLAGS}" != "" ; then
64892            LLVM_CFLAGS="${LLVM_CFLAGS} "
64893          fi
64894          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64895        fi
64896      fi
64897    done
64898    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64899    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64900
64901    unset LLVM_LDFLAGS
64902    for flag in $("${LLVM_CONFIG}" --ldflags); do
64903      if echo "${flag}" | grep -q '^-L'; then
64904        if test "${LLVM_LDFLAGS}" != ""; then
64905          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64906        fi
64907        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64908      fi
64909    done
64910
64911    unset LLVM_LIBS
64912    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64913      if echo "${flag}" | grep -q '^-l'; then
64914        if test "${LLVM_LIBS}" != ""; then
64915          LLVM_LIBS="${LLVM_LIBS} "
64916        fi
64917        LLVM_LIBS="${LLVM_LIBS}${flag}"
64918      fi
64919    done
64920
64921    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64922    # always properly detect -ltinfo
64923    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64924
64925
64926
64927
64928  fi
64929
64930
64931
64932# Check whether --with-libjpeg was given.
64933if test "${with_libjpeg+set}" = set; then :
64934  withval=$with_libjpeg;
64935fi
64936
64937
64938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64939$as_echo_n "checking for which libjpeg to use... " >&6; }
64940  # default is bundled
64941  DEFAULT_LIBJPEG=bundled
64942  # if user didn't specify, use DEFAULT_LIBJPEG
64943  if test "x${with_libjpeg}" = "x"; then
64944    with_libjpeg=${DEFAULT_LIBJPEG}
64945  fi
64946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64947$as_echo "${with_libjpeg}" >&6; }
64948
64949  if test "x${with_libjpeg}" = "xbundled"; then
64950    USE_EXTERNAL_LIBJPEG=false
64951  elif test "x${with_libjpeg}" = "xsystem"; then
64952    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64953if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64954
64955else
64956   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64957fi
64958
64959
64960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64961$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64962if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64963  $as_echo_n "(cached) " >&6
64964else
64965  ac_check_lib_save_LIBS=$LIBS
64966LIBS="-ljpeg  $LIBS"
64967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64968/* end confdefs.h.  */
64969
64970/* Override any GCC internal prototype to avoid an error.
64971   Use char because int might match the return type of a GCC
64972   builtin and then its argument prototype would still apply.  */
64973#ifdef __cplusplus
64974extern "C"
64975#endif
64976char jpeg_CreateDecompress ();
64977int
64978main ()
64979{
64980return jpeg_CreateDecompress ();
64981  ;
64982  return 0;
64983}
64984_ACEOF
64985if ac_fn_cxx_try_link "$LINENO"; then :
64986  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64987else
64988  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64989fi
64990rm -f core conftest.err conftest.$ac_objext \
64991    conftest$ac_exeext conftest.$ac_ext
64992LIBS=$ac_check_lib_save_LIBS
64993fi
64994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64995$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64996if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64997  cat >>confdefs.h <<_ACEOF
64998#define HAVE_LIBJPEG 1
64999_ACEOF
65000
65001  LIBS="-ljpeg $LIBS"
65002
65003else
65004   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
65005fi
65006
65007
65008    USE_EXTERNAL_LIBJPEG=true
65009  else
65010    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
65011  fi
65012
65013
65014
65015
65016
65017# Check whether --with-giflib was given.
65018if test "${with_giflib+set}" = set; then :
65019  withval=$with_giflib;
65020fi
65021
65022
65023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
65024$as_echo_n "checking for which giflib to use... " >&6; }
65025  # default is bundled
65026  DEFAULT_GIFLIB=bundled
65027  # if user didn't specify, use DEFAULT_GIFLIB
65028  if test "x${with_giflib}" = "x"; then
65029    with_giflib=${DEFAULT_GIFLIB}
65030  fi
65031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65032$as_echo "${with_giflib}" >&6; }
65033
65034  if test "x${with_giflib}" = "xbundled"; then
65035    USE_EXTERNAL_LIBGIF=false
65036  elif test "x${with_giflib}" = "xsystem"; then
65037    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65038if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65039
65040else
65041   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65042fi
65043
65044
65045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65046$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65047if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65048  $as_echo_n "(cached) " >&6
65049else
65050  ac_check_lib_save_LIBS=$LIBS
65051LIBS="-lgif  $LIBS"
65052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65053/* end confdefs.h.  */
65054
65055/* Override any GCC internal prototype to avoid an error.
65056   Use char because int might match the return type of a GCC
65057   builtin and then its argument prototype would still apply.  */
65058#ifdef __cplusplus
65059extern "C"
65060#endif
65061char DGifGetCode ();
65062int
65063main ()
65064{
65065return DGifGetCode ();
65066  ;
65067  return 0;
65068}
65069_ACEOF
65070if ac_fn_cxx_try_link "$LINENO"; then :
65071  ac_cv_lib_gif_DGifGetCode=yes
65072else
65073  ac_cv_lib_gif_DGifGetCode=no
65074fi
65075rm -f core conftest.err conftest.$ac_objext \
65076    conftest$ac_exeext conftest.$ac_ext
65077LIBS=$ac_check_lib_save_LIBS
65078fi
65079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65080$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65081if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65082  cat >>confdefs.h <<_ACEOF
65083#define HAVE_LIBGIF 1
65084_ACEOF
65085
65086  LIBS="-lgif $LIBS"
65087
65088else
65089   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65090fi
65091
65092
65093    USE_EXTERNAL_LIBGIF=true
65094  else
65095    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65096  fi
65097
65098
65099
65100
65101
65102# Check whether --with-libpng was given.
65103if test "${with_libpng+set}" = set; then :
65104  withval=$with_libpng;
65105fi
65106
65107
65108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65109$as_echo_n "checking for which libpng to use... " >&6; }
65110
65111  # default is bundled
65112  DEFAULT_LIBPNG=bundled
65113  # if user didn't specify, use DEFAULT_LIBPNG
65114  if test "x${with_libpng}" = "x"; then
65115    with_libpng=${DEFAULT_LIBPNG}
65116  fi
65117
65118  if test "x${with_libpng}" = "xbundled"; then
65119    USE_EXTERNAL_LIBPNG=false
65120    PNG_CFLAGS=""
65121    PNG_LIBS=""
65122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65123$as_echo "bundled" >&6; }
65124  elif test "x${with_libpng}" = "xsystem"; then
65125
65126pkg_failed=no
65127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65128$as_echo_n "checking for PNG... " >&6; }
65129
65130if test -n "$PNG_CFLAGS"; then
65131    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65132 elif test -n "$PKG_CONFIG"; then
65133    if test -n "$PKG_CONFIG" && \
65134    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65135  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65136  ac_status=$?
65137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65138  test $ac_status = 0; }; then
65139  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65140else
65141  pkg_failed=yes
65142fi
65143 else
65144    pkg_failed=untried
65145fi
65146if test -n "$PNG_LIBS"; then
65147    pkg_cv_PNG_LIBS="$PNG_LIBS"
65148 elif test -n "$PKG_CONFIG"; then
65149    if test -n "$PKG_CONFIG" && \
65150    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65151  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65152  ac_status=$?
65153  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65154  test $ac_status = 0; }; then
65155  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65156else
65157  pkg_failed=yes
65158fi
65159 else
65160    pkg_failed=untried
65161fi
65162
65163
65164
65165if test $pkg_failed = yes; then
65166
65167if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65168        _pkg_short_errors_supported=yes
65169else
65170        _pkg_short_errors_supported=no
65171fi
65172        if test $_pkg_short_errors_supported = yes; then
65173	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65174        else
65175	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65176        fi
65177	# Put the nasty error message in config.log where it belongs
65178	echo "$PNG_PKG_ERRORS" >&5
65179
65180	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65181$as_echo "no" >&6; }
65182                LIBPNG_FOUND=no
65183elif test $pkg_failed = untried; then
65184	LIBPNG_FOUND=no
65185else
65186	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65187	PNG_LIBS=$pkg_cv_PNG_LIBS
65188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65189$as_echo "yes" >&6; }
65190	LIBPNG_FOUND=yes
65191fi
65192    if test "x${LIBPNG_FOUND}" = "xyes"; then
65193      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65194      USE_EXTERNAL_LIBPNG=true
65195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65196$as_echo "system" >&6; }
65197    else
65198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65199$as_echo "system not found" >&6; }
65200      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65201    fi
65202  else
65203    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65204  fi
65205
65206
65207
65208
65209
65210
65211
65212# Check whether --with-zlib was given.
65213if test "${with_zlib+set}" = set; then :
65214  withval=$with_zlib;
65215fi
65216
65217
65218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65219$as_echo_n "checking for compress in -lz... " >&6; }
65220if ${ac_cv_lib_z_compress+:} false; then :
65221  $as_echo_n "(cached) " >&6
65222else
65223  ac_check_lib_save_LIBS=$LIBS
65224LIBS="-lz  $LIBS"
65225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65226/* end confdefs.h.  */
65227
65228/* Override any GCC internal prototype to avoid an error.
65229   Use char because int might match the return type of a GCC
65230   builtin and then its argument prototype would still apply.  */
65231#ifdef __cplusplus
65232extern "C"
65233#endif
65234char compress ();
65235int
65236main ()
65237{
65238return compress ();
65239  ;
65240  return 0;
65241}
65242_ACEOF
65243if ac_fn_cxx_try_link "$LINENO"; then :
65244  ac_cv_lib_z_compress=yes
65245else
65246  ac_cv_lib_z_compress=no
65247fi
65248rm -f core conftest.err conftest.$ac_objext \
65249    conftest$ac_exeext conftest.$ac_ext
65250LIBS=$ac_check_lib_save_LIBS
65251fi
65252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65253$as_echo "$ac_cv_lib_z_compress" >&6; }
65254if test "x$ac_cv_lib_z_compress" = xyes; then :
65255   ZLIB_FOUND=yes
65256else
65257   ZLIB_FOUND=no
65258fi
65259
65260
65261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65262$as_echo_n "checking for which zlib to use... " >&6; }
65263
65264  DEFAULT_ZLIB=system
65265  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65266    # On windows default is bundled...on others default is system
65267    DEFAULT_ZLIB=bundled
65268  fi
65269
65270  if test "x${ZLIB_FOUND}" != "xyes"; then
65271    # If we don't find any system...set default to bundled
65272    DEFAULT_ZLIB=bundled
65273  fi
65274
65275  # If user didn't specify, use DEFAULT_ZLIB
65276  if test "x${with_zlib}" = "x"; then
65277    with_zlib=${DEFAULT_ZLIB}
65278  fi
65279
65280  if test "x${with_zlib}" = "xbundled"; then
65281    USE_EXTERNAL_LIBZ=false
65282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65283$as_echo "bundled" >&6; }
65284  elif test "x${with_zlib}" = "xsystem"; then
65285    if test "x${ZLIB_FOUND}" = "xyes"; then
65286      USE_EXTERNAL_LIBZ=true
65287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65288$as_echo "system" >&6; }
65289    else
65290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65291$as_echo "system not found" >&6; }
65292      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65293    fi
65294  else
65295    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65296  fi
65297
65298
65299
65300
65301
65302# Check whether --with-lcms was given.
65303if test "${with_lcms+set}" = set; then :
65304  withval=$with_lcms;
65305fi
65306
65307
65308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65309$as_echo_n "checking for which lcms to use... " >&6; }
65310
65311  DEFAULT_LCMS=bundled
65312  # If user didn't specify, use DEFAULT_LCMS
65313  if test "x${with_lcms}" = "x"; then
65314    with_lcms=${DEFAULT_LCMS}
65315  fi
65316
65317  if test "x${with_lcms}" = "xbundled"; then
65318    USE_EXTERNAL_LCMS=false
65319    LCMS_CFLAGS=""
65320    LCMS_LIBS=""
65321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65322$as_echo "bundled" >&6; }
65323  elif test "x${with_lcms}" = "xsystem"; then
65324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65325$as_echo "system" >&6; }
65326
65327pkg_failed=no
65328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65329$as_echo_n "checking for LCMS... " >&6; }
65330
65331if test -n "$LCMS_CFLAGS"; then
65332    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65333 elif test -n "$PKG_CONFIG"; then
65334    if test -n "$PKG_CONFIG" && \
65335    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65336  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65337  ac_status=$?
65338  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65339  test $ac_status = 0; }; then
65340  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65341else
65342  pkg_failed=yes
65343fi
65344 else
65345    pkg_failed=untried
65346fi
65347if test -n "$LCMS_LIBS"; then
65348    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65349 elif test -n "$PKG_CONFIG"; then
65350    if test -n "$PKG_CONFIG" && \
65351    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65352  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65353  ac_status=$?
65354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65355  test $ac_status = 0; }; then
65356  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65357else
65358  pkg_failed=yes
65359fi
65360 else
65361    pkg_failed=untried
65362fi
65363
65364
65365
65366if test $pkg_failed = yes; then
65367
65368if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65369        _pkg_short_errors_supported=yes
65370else
65371        _pkg_short_errors_supported=no
65372fi
65373        if test $_pkg_short_errors_supported = yes; then
65374	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65375        else
65376	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65377        fi
65378	# Put the nasty error message in config.log where it belongs
65379	echo "$LCMS_PKG_ERRORS" >&5
65380
65381	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65382$as_echo "no" >&6; }
65383                LCMS_FOUND=no
65384elif test $pkg_failed = untried; then
65385	LCMS_FOUND=no
65386else
65387	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65388	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65390$as_echo "yes" >&6; }
65391	LCMS_FOUND=yes
65392fi
65393    if test "x${LCMS_FOUND}" = "xyes"; then
65394      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65395      USE_EXTERNAL_LCMS=true
65396    else
65397      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65398    fi
65399  else
65400    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65401  fi
65402
65403
65404
65405
65406
65407
65408
65409
65410
65411
65412
65413
65414
65415  # Setup libm (the maths library)
65416  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65418$as_echo_n "checking for cos in -lm... " >&6; }
65419if ${ac_cv_lib_m_cos+:} false; then :
65420  $as_echo_n "(cached) " >&6
65421else
65422  ac_check_lib_save_LIBS=$LIBS
65423LIBS="-lm  $LIBS"
65424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65425/* end confdefs.h.  */
65426
65427/* Override any GCC internal prototype to avoid an error.
65428   Use char because int might match the return type of a GCC
65429   builtin and then its argument prototype would still apply.  */
65430#ifdef __cplusplus
65431extern "C"
65432#endif
65433char cos ();
65434int
65435main ()
65436{
65437return cos ();
65438  ;
65439  return 0;
65440}
65441_ACEOF
65442if ac_fn_cxx_try_link "$LINENO"; then :
65443  ac_cv_lib_m_cos=yes
65444else
65445  ac_cv_lib_m_cos=no
65446fi
65447rm -f core conftest.err conftest.$ac_objext \
65448    conftest$ac_exeext conftest.$ac_ext
65449LIBS=$ac_check_lib_save_LIBS
65450fi
65451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65452$as_echo "$ac_cv_lib_m_cos" >&6; }
65453if test "x$ac_cv_lib_m_cos" = xyes; then :
65454  cat >>confdefs.h <<_ACEOF
65455#define HAVE_LIBM 1
65456_ACEOF
65457
65458  LIBS="-lm $LIBS"
65459
65460else
65461
65462        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65463$as_echo "$as_me: Maths library was not found" >&6;}
65464
65465fi
65466
65467    LIBM="-lm"
65468  else
65469    LIBM=""
65470  fi
65471
65472
65473  # Setup libdl (for dynamic library loading)
65474  save_LIBS="$LIBS"
65475  LIBS=""
65476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65477$as_echo_n "checking for dlopen in -ldl... " >&6; }
65478if ${ac_cv_lib_dl_dlopen+:} false; then :
65479  $as_echo_n "(cached) " >&6
65480else
65481  ac_check_lib_save_LIBS=$LIBS
65482LIBS="-ldl  $LIBS"
65483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65484/* end confdefs.h.  */
65485
65486/* Override any GCC internal prototype to avoid an error.
65487   Use char because int might match the return type of a GCC
65488   builtin and then its argument prototype would still apply.  */
65489#ifdef __cplusplus
65490extern "C"
65491#endif
65492char dlopen ();
65493int
65494main ()
65495{
65496return dlopen ();
65497  ;
65498  return 0;
65499}
65500_ACEOF
65501if ac_fn_cxx_try_link "$LINENO"; then :
65502  ac_cv_lib_dl_dlopen=yes
65503else
65504  ac_cv_lib_dl_dlopen=no
65505fi
65506rm -f core conftest.err conftest.$ac_objext \
65507    conftest$ac_exeext conftest.$ac_ext
65508LIBS=$ac_check_lib_save_LIBS
65509fi
65510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65511$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65512if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65513  cat >>confdefs.h <<_ACEOF
65514#define HAVE_LIBDL 1
65515_ACEOF
65516
65517  LIBS="-ldl $LIBS"
65518
65519fi
65520
65521  LIBDL="$LIBS"
65522
65523  LIBS="$save_LIBS"
65524
65525  # Deprecated libraries, keep the flags for backwards compatibility
65526  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65527
65528
65529# Check whether --with-dxsdk was given.
65530if test "${with_dxsdk+set}" = set; then :
65531  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65532$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65533fi
65534
65535
65536
65537
65538# Check whether --with-dxsdk-lib was given.
65539if test "${with_dxsdk_lib+set}" = set; then :
65540  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65541$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65542fi
65543
65544
65545
65546
65547# Check whether --with-dxsdk-include was given.
65548if test "${with_dxsdk_include+set}" = set; then :
65549  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65550$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65551fi
65552
65553
65554  fi
65555
65556  # Control if libzip can use mmap. Available for purposes of overriding.
65557  LIBZIP_CAN_USE_MMAP=true
65558
65559
65560
65561  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65562    # Find the root of the Solaris Studio installation from the compiler path
65563    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65564    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65566$as_echo_n "checking for libstlport.so.1... " >&6; }
65567    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65568      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65569      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65570    fi
65571    if test -f "$STLPORT_LIB"; then
65572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65573$as_echo "yes, $STLPORT_LIB" >&6; }
65574
65575  # Only process if variable expands to non-empty
65576
65577  if test "x$STLPORT_LIB" != x; then
65578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65579
65580  # Input might be given as Windows format, start by converting to
65581  # unix format.
65582  path="$STLPORT_LIB"
65583  new_path=`$CYGPATH -u "$path"`
65584
65585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65588  # "foo.exe" is OK but "foo" is an error.
65589  #
65590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65591  # It is also a way to make sure we got the proper file name for the real test later on.
65592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65593  if test "x$test_shortpath" = x; then
65594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65595$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65596    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65597  fi
65598
65599  # Call helper function which possibly converts this using DOS-style short mode.
65600  # If so, the updated path is stored in $new_path.
65601
65602  input_path="$new_path"
65603  # Check if we need to convert this using DOS-style short mode. If the path
65604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65605  # take no chances and rewrite it.
65606  # Note: m4 eats our [], so we need to use [ and ] instead.
65607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65608  if test "x$has_forbidden_chars" != x; then
65609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65613      # Going to short mode and back again did indeed matter. Since short mode is
65614      # case insensitive, let's make it lowercase to improve readability.
65615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65616      # Now convert it back to Unix-style (cygpath)
65617      input_path=`$CYGPATH -u "$shortmode_path"`
65618      new_path="$input_path"
65619    fi
65620  fi
65621
65622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65623  if test "x$test_cygdrive_prefix" = x; then
65624    # As a simple fix, exclude /usr/bin since it's not a real path.
65625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65627      # a path prefixed by /cygdrive for fixpath to work.
65628      new_path="$CYGWIN_ROOT_PATH$input_path"
65629    fi
65630  fi
65631
65632
65633  if test "x$path" != "x$new_path"; then
65634    STLPORT_LIB="$new_path"
65635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65636$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65637  fi
65638
65639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65640
65641  path="$STLPORT_LIB"
65642  has_colon=`$ECHO $path | $GREP ^.:`
65643  new_path="$path"
65644  if test "x$has_colon" = x; then
65645    # Not in mixed or Windows style, start by that.
65646    new_path=`cmd //c echo $path`
65647  fi
65648
65649
65650  input_path="$new_path"
65651  # Check if we need to convert this using DOS-style short mode. If the path
65652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65653  # take no chances and rewrite it.
65654  # Note: m4 eats our [], so we need to use [ and ] instead.
65655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65656  if test "x$has_forbidden_chars" != x; then
65657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65659  fi
65660
65661
65662  windows_path="$new_path"
65663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65664    unix_path=`$CYGPATH -u "$windows_path"`
65665    new_path="$unix_path"
65666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65668    new_path="$unix_path"
65669  fi
65670
65671  if test "x$path" != "x$new_path"; then
65672    STLPORT_LIB="$new_path"
65673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65674$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65675  fi
65676
65677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65679
65680    else
65681      # We're on a unix platform. Hooray! :)
65682      path="$STLPORT_LIB"
65683      has_space=`$ECHO "$path" | $GREP " "`
65684      if test "x$has_space" != x; then
65685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65686$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65688      fi
65689
65690      # Use eval to expand a potential ~
65691      eval path="$path"
65692      if test ! -f "$path" && test ! -d "$path"; then
65693        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65694      fi
65695
65696      if test -d "$path"; then
65697        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65698      else
65699        dir="`$DIRNAME "$path"`"
65700        base="`$BASENAME "$path"`"
65701        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65702      fi
65703    fi
65704  fi
65705
65706    else
65707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65708$as_echo "no, not found at $STLPORT_LIB" >&6; }
65709      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65710    fi
65711
65712  fi
65713
65714
65715
65716
65717
65718
65719
65720
65721
65722
65723
65724
65725
65726
65727# Hotspot setup depends on lib checks.
65728
65729
65730  # The user can in some cases supply additional jvm features. For the custom
65731  # variant, this defines the entire variant.
65732
65733# Check whether --with-jvm-features was given.
65734if test "${with_jvm_features+set}" = set; then :
65735  withval=$with_jvm_features;
65736fi
65737
65738  if test "x$with_jvm_features" != x; then
65739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65740$as_echo_n "checking additional JVM features... " >&6; }
65741    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65743$as_echo "$JVM_FEATURES" >&6; }
65744  fi
65745
65746  # Override hotspot cpu definitions for ARM platforms
65747  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65748    HOTSPOT_TARGET_CPU=arm_32
65749    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65750    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65751    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65752  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65753    HOTSPOT_TARGET_CPU=arm_64
65754    HOTSPOT_TARGET_CPU_ARCH=arm
65755    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65756    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65757  fi
65758
65759  # Verify that dependencies are met for explicitly set features.
65760  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65761    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65762  fi
65763
65764  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65765    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65766  fi
65767
65768  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65769    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65770  fi
65771
65772  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65773    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65774  fi
65775
65776  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65777    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65778  fi
65779
65780  # Turn on additional features based on other parts of configure
65781  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65782    JVM_FEATURES="$JVM_FEATURES dtrace"
65783  else
65784    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65785      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65786    fi
65787  fi
65788
65789  if test "x$STATIC_BUILD" = "xtrue"; then
65790    JVM_FEATURES="$JVM_FEATURES static-build"
65791  else
65792    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65793      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65794    fi
65795  fi
65796
65797  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65798    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65799      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65800    fi
65801  fi
65802
65803  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65804    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65805      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65806    fi
65807  fi
65808
65809  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65810  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65811     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65812     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65813    JVM_FEATURES_jvmci="jvmci"
65814  else
65815    JVM_FEATURES_jvmci=""
65816  fi
65817
65818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65819$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65820  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65822$as_echo "yes, forced" >&6; }
65823    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65824      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65825    fi
65826    INCLUDE_GRAAL="true"
65827  else
65828    # By default enable graal build on linux-x64 or where AOT is available.
65829    # graal build requires jvmci.
65830    if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
65831        (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
65832         test "x$OPENJDK_TARGET_OS" = "xlinux" || \
65833         test "x$ENABLE_AOT" = "xtrue") ; then
65834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65835$as_echo "yes" >&6; }
65836      JVM_FEATURES_graal="graal"
65837      INCLUDE_GRAAL="true"
65838    else
65839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65840$as_echo "no" >&6; }
65841      JVM_FEATURES_graal=""
65842      INCLUDE_GRAAL="false"
65843    fi
65844  fi
65845
65846
65847
65848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65849$as_echo_n "checking if aot should be enabled... " >&6; }
65850  if test "x$ENABLE_AOT" = "xtrue"; then
65851    if test "x$enable_aot" = "xyes"; then
65852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65853$as_echo "yes, forced" >&6; }
65854    else
65855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65856$as_echo "yes" >&6; }
65857    fi
65858    JVM_FEATURES_aot="aot"
65859  else
65860    if test "x$enable_aot" = "xno"; then
65861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65862$as_echo "no, forced" >&6; }
65863    else
65864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65865$as_echo "no" >&6; }
65866    fi
65867    JVM_FEATURES_aot=""
65868  fi
65869
65870  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65871    # Default to use link time optimizations on minimal on arm
65872    JVM_FEATURES_link_time_opt="link-time-opt"
65873  else
65874    JVM_FEATURES_link_time_opt=""
65875  fi
65876
65877  # All variants but minimal (and custom) get these features
65878  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt"
65879  if test "x$ENABLE_CDS" = "xtrue"; then
65880    NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65881  fi
65882
65883  # Enable features depending on variant.
65884  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65885  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65886  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65887  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65888  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65889  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65890  JVM_FEATURES_custom="$JVM_FEATURES"
65891
65892
65893
65894
65895
65896
65897
65898
65899
65900  # Used for verification of Makefiles by check-jvm-feature
65901
65902
65903  # We don't support --with-jvm-interpreter anymore, use zero instead.
65904
65905
65906# Check whether --with-jvm-interpreter was given.
65907if test "${with_jvm_interpreter+set}" = set; then :
65908  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65909$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65910fi
65911
65912
65913
65914
65915###############################################################################
65916#
65917# We need to do some final tweaking, when everything else is done.
65918#
65919###############################################################################
65920
65921
65922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65923$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65924
65925  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65926    ENABLE_INTREE_EC=true
65927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65928$as_echo "yes" >&6; }
65929  else
65930    ENABLE_INTREE_EC=false
65931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65932$as_echo "no" >&6; }
65933  fi
65934
65935
65936
65937
65938  # Check whether --enable-jtreg-failure-handler was given.
65939if test "${enable_jtreg_failure_handler+set}" = set; then :
65940  enableval=$enable_jtreg_failure_handler;
65941fi
65942
65943
65944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65945$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65946
65947  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65948    if test "x$JT_HOME" = "x"; then
65949      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65950    else
65951      BUILD_FAILURE_HANDLER=true
65952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65953$as_echo "yes, forced" >&6; }
65954    fi
65955  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65956    BUILD_FAILURE_HANDLER=false
65957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65958$as_echo "no, forced" >&6; }
65959  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65960      || test "x$enable_jtreg_failure_handler" = "x"; then
65961    if test "x$JT_HOME" = "x"; then
65962      BUILD_FAILURE_HANDLER=false
65963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65964$as_echo "no, missing jtreg" >&6; }
65965    else
65966      BUILD_FAILURE_HANDLER=true
65967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65968$as_echo "yes, jtreg present" >&6; }
65969    fi
65970  else
65971    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65972  fi
65973
65974
65975
65976
65977  # Check whether --enable-generate-classlist was given.
65978if test "${enable_generate_classlist+set}" = set; then :
65979  enableval=$enable_generate_classlist;
65980fi
65981
65982
65983  # Check if it's likely that it's possible to generate the classlist. Depending
65984  # on exact jvm configuration it could be possible anyway.
65985  if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
65986    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65987  else
65988    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65989  fi
65990
65991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65992$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65993  if test "x$enable_generate_classlist" = "xyes"; then
65994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65995$as_echo "yes, forced" >&6; }
65996    ENABLE_GENERATE_CLASSLIST="true"
65997    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65998      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
65999$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
66000    fi
66001  elif test "x$enable_generate_classlist" = "xno"; then
66002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66003$as_echo "no, forced" >&6; }
66004    ENABLE_GENERATE_CLASSLIST="false"
66005  elif test "x$enable_generate_classlist" = "x"; then
66006    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
66007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66008$as_echo "yes" >&6; }
66009      ENABLE_GENERATE_CLASSLIST="true"
66010    else
66011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66012$as_echo "no" >&6; }
66013      ENABLE_GENERATE_CLASSLIST="false"
66014    fi
66015  else
66016    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
66017  fi
66018
66019
66020
66021
66022###############################################################################
66023#
66024# Configure parts of the build that only affect the build performance,
66025# not the result.
66026#
66027###############################################################################
66028
66029
66030  # How many cores do we have on this build system?
66031
66032# Check whether --with-num-cores was given.
66033if test "${with_num_cores+set}" = set; then :
66034  withval=$with_num_cores;
66035fi
66036
66037  if test "x$with_num_cores" = x; then
66038    # The number of cores were not specified, try to probe them.
66039
66040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66041$as_echo_n "checking for number of cores... " >&6; }
66042  NUM_CORES=1
66043  FOUND_CORES=no
66044
66045  if test -f /proc/cpuinfo; then
66046    # Looks like a Linux (or cygwin) system
66047    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66048    FOUND_CORES=yes
66049  elif test -x /usr/sbin/psrinfo; then
66050    # Looks like a Solaris system
66051    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66052    FOUND_CORES=yes
66053  elif test -x /usr/sbin/sysctl; then
66054    # Looks like a MacOSX system
66055    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66056    FOUND_CORES=yes
66057  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66058    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66059    FOUND_CORES=yes
66060  elif test -n "$NUMBER_OF_PROCESSORS"; then
66061    # On windows, look in the env
66062    NUM_CORES=$NUMBER_OF_PROCESSORS
66063    FOUND_CORES=yes
66064  fi
66065
66066  if test "x$FOUND_CORES" = xyes; then
66067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66068$as_echo "$NUM_CORES" >&6; }
66069  else
66070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66071$as_echo "could not detect number of cores, defaulting to 1" >&6; }
66072    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66073$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66074  fi
66075
66076  else
66077    NUM_CORES=$with_num_cores
66078  fi
66079
66080
66081
66082  # How much memory do we have on this build system?
66083
66084# Check whether --with-memory-size was given.
66085if test "${with_memory_size+set}" = set; then :
66086  withval=$with_memory_size;
66087fi
66088
66089  if test "x$with_memory_size" = x; then
66090    # The memory size was not specified, try to probe it.
66091
66092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66093$as_echo_n "checking for memory size... " >&6; }
66094  # Default to 1024 MB
66095  MEMORY_SIZE=1024
66096  FOUND_MEM=no
66097
66098  if test -f /proc/meminfo; then
66099    # Looks like a Linux (or cygwin) system
66100    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66101    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66102    FOUND_MEM=yes
66103  elif test -x /usr/sbin/prtconf; then
66104    # Looks like a Solaris or AIX system
66105    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66106    FOUND_MEM=yes
66107  elif test -x /usr/sbin/sysctl; then
66108    # Looks like a MacOSX system
66109    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66110    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66111    FOUND_MEM=yes
66112  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66113    # Windows, but without cygwin
66114    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66115    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66116    FOUND_MEM=yes
66117  fi
66118
66119  if test "x$FOUND_MEM" = xyes; then
66120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66121$as_echo "$MEMORY_SIZE MB" >&6; }
66122  else
66123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66124$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66126$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66127  fi
66128
66129  else
66130    MEMORY_SIZE=$with_memory_size
66131  fi
66132
66133
66134
66135  # Provide a decent default number of parallel jobs for make depending on
66136  # number of cores, amount of memory and machine architecture.
66137
66138# Check whether --with-jobs was given.
66139if test "${with_jobs+set}" = set; then :
66140  withval=$with_jobs;
66141fi
66142
66143  if test "x$with_jobs" = x; then
66144    # Number of jobs was not specified, calculate.
66145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66146$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66147    # Approximate memory in GB.
66148    memory_gb=`expr $MEMORY_SIZE / 1024`
66149    # Pick the lowest of memory in gb and number of cores.
66150    if test "$memory_gb" -lt "$NUM_CORES"; then
66151      JOBS="$memory_gb"
66152    else
66153      JOBS="$NUM_CORES"
66154    fi
66155    if test "$JOBS" -eq "0"; then
66156      JOBS=1
66157    fi
66158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66159$as_echo "$JOBS" >&6; }
66160  else
66161    JOBS=$with_jobs
66162  fi
66163
66164
66165
66166  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66167
66168# Check whether --with-test-jobs was given.
66169if test "${with_test_jobs+set}" = set; then :
66170  withval=$with_test_jobs;
66171fi
66172
66173  if test "x$with_test_jobs" = x; then
66174      TEST_JOBS=0
66175  else
66176      TEST_JOBS=$with_test_jobs
66177  fi
66178
66179
66180
66181# Setup arguments for the boot jdk (after cores and memory have been setup)
66182
66183  ##############################################################################
66184  #
66185  # Specify jvm options for anything that is run with the Boot JDK.
66186  # Not all JVM:s accept the same arguments on the command line.
66187  #
66188
66189# Check whether --with-boot-jdk-jvmargs was given.
66190if test "${with_boot_jdk_jvmargs+set}" = set; then :
66191  withval=$with_boot_jdk_jvmargs;
66192fi
66193
66194
66195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66196$as_echo_n "checking flags for boot jdk java command ... " >&6; }
66197
66198  # Disable special log output when a debug build is used as Boot JDK...
66199
66200  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66201  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66202  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66203  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66204  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66206    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66207    JVM_ARG_OK=true
66208  else
66209    $ECHO "Arg failed:" >&5
66210    $ECHO "$OUTPUT" >&5
66211    JVM_ARG_OK=false
66212  fi
66213
66214
66215  # Force en-US environment
66216
66217  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66218  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66219  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66220  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66221  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66222  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66223    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66224    JVM_ARG_OK=true
66225  else
66226    $ECHO "Arg failed:" >&5
66227    $ECHO "$OUTPUT" >&5
66228    JVM_ARG_OK=false
66229  fi
66230
66231
66232  # Apply user provided options.
66233
66234  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66235  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66236  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -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="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
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  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66250$as_echo "$boot_jdk_jvmargs" >&6; }
66251
66252  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66253  JAVA_FLAGS=$boot_jdk_jvmargs
66254
66255
66256
66257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66258$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66259
66260  # Starting amount of heap memory.
66261
66262  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66263  $ECHO "Command: $JAVA -Xms64M -version" >&5
66264  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66265  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66266  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66267  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66268    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66269    JVM_ARG_OK=true
66270  else
66271    $ECHO "Arg failed:" >&5
66272    $ECHO "$OUTPUT" >&5
66273    JVM_ARG_OK=false
66274  fi
66275
66276  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66277
66278  # Maximum amount of heap memory and stack size.
66279  JVM_HEAP_LIMIT_32="1024"
66280  # Running a 64 bit JVM allows for and requires a bigger heap
66281  JVM_HEAP_LIMIT_64="1600"
66282  STACK_SIZE_32=768
66283  STACK_SIZE_64=1536
66284  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66285  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66286    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66287  fi
66288  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66289    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66290  fi
66291  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66292    JVM_HEAP_LIMIT_32=512
66293    JVM_HEAP_LIMIT_64=512
66294  fi
66295
66296  if test "x$BOOT_JDK_BITS" = "x32"; then
66297    STACK_SIZE=$STACK_SIZE_32
66298    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66299  else
66300    STACK_SIZE=$STACK_SIZE_64
66301    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66302  fi
66303
66304  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66305  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66306  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66307  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66308  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66309  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66310    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66311    JVM_ARG_OK=true
66312  else
66313    $ECHO "Arg failed:" >&5
66314    $ECHO "$OUTPUT" >&5
66315    JVM_ARG_OK=false
66316  fi
66317
66318
66319  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66320  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66321  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66322  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66323  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66324  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66325    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66326    JVM_ARG_OK=true
66327  else
66328    $ECHO "Arg failed:" >&5
66329    $ECHO "$OUTPUT" >&5
66330    JVM_ARG_OK=false
66331  fi
66332
66333
66334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66335$as_echo "$boot_jdk_jvmargs_big" >&6; }
66336
66337  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66338
66339
66340  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66341    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66342    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66343  else
66344    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66345    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66346  fi
66347  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66348  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66350$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66352$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66353
66354
66355  # By default, the main javac compilations use big
66356  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66357
66358
66359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66360$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66361
66362  # Use serial gc for small short lived tools if possible
66363
66364  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66365  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66366  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66367  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66368  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66369  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66370    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66371    JVM_ARG_OK=true
66372  else
66373    $ECHO "Arg failed:" >&5
66374    $ECHO "$OUTPUT" >&5
66375    JVM_ARG_OK=false
66376  fi
66377
66378
66379  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66380  $ECHO "Command: $JAVA -Xms32M -version" >&5
66381  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66382  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66383  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66384  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66385    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66386    JVM_ARG_OK=true
66387  else
66388    $ECHO "Arg failed:" >&5
66389    $ECHO "$OUTPUT" >&5
66390    JVM_ARG_OK=false
66391  fi
66392
66393
66394  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66395  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66396  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66397  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66398  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66399  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66400    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66401    JVM_ARG_OK=true
66402  else
66403    $ECHO "Arg failed:" >&5
66404    $ECHO "$OUTPUT" >&5
66405    JVM_ARG_OK=false
66406  fi
66407
66408
66409  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66410  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66411  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66412  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66413  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66414  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66415    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66416    JVM_ARG_OK=true
66417  else
66418    $ECHO "Arg failed:" >&5
66419    $ECHO "$OUTPUT" >&5
66420    JVM_ARG_OK=false
66421  fi
66422
66423
66424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66425$as_echo "$boot_jdk_jvmargs_small" >&6; }
66426
66427  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66428
66429
66430  JAVA_TOOL_FLAGS_SMALL=""
66431  for f in $JAVA_FLAGS_SMALL; do
66432    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66433  done
66434
66435
66436
66437# Setup smart javac (after cores and memory have been setup)
66438
66439
66440# Check whether --with-sjavac-server-java was given.
66441if test "${with_sjavac_server_java+set}" = set; then :
66442  withval=$with_sjavac_server_java;
66443fi
66444
66445
66446  if test "x$with_sjavac_server_java" != x; then
66447    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66448    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66449    if test "x$FOUND_VERSION" = x; then
66450      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66451    fi
66452  else
66453    SJAVAC_SERVER_JAVA="$JAVA"
66454  fi
66455
66456
66457  if test "$MEMORY_SIZE" -gt "3000"; then
66458    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66459      JVM_64BIT=true
66460    fi
66461  fi
66462
66463  MX_VALUE=`expr $MEMORY_SIZE / 2`
66464  if test "$JVM_64BIT" = true; then
66465    # Set ms lower than mx since more than one instance of the server might
66466    # get launched at the same time before they figure out which instance won.
66467    MS_VALUE=512
66468    if test "$MX_VALUE" -gt "2048"; then
66469      MX_VALUE=2048
66470    fi
66471  else
66472    MS_VALUE=256
66473    if test "$MX_VALUE" -gt "1500"; then
66474      MX_VALUE=1500
66475    fi
66476  fi
66477  if test "$MX_VALUE" -lt "512"; then
66478    MX_VALUE=512
66479  fi
66480
66481  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66482  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66483  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66484  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66485  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66486  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66487    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66488    JVM_ARG_OK=true
66489  else
66490    $ECHO "Arg failed:" >&5
66491    $ECHO "$OUTPUT" >&5
66492    JVM_ARG_OK=false
66493  fi
66494
66495
66496
66497  # Check whether --enable-sjavac was given.
66498if test "${enable_sjavac+set}" = set; then :
66499  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66500else
66501  ENABLE_SJAVAC="no"
66502fi
66503
66504  if test "x$JVM_ARG_OK" = "xfalse"; then
66505    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66506$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66507    ENABLE_SJAVAC="no"
66508  fi
66509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66510$as_echo_n "checking whether to use sjavac... " >&6; }
66511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66512$as_echo "$ENABLE_SJAVAC" >&6; }
66513
66514
66515  # Check whether --enable-javac-server was given.
66516if test "${enable_javac_server+set}" = set; then :
66517  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66518else
66519  ENABLE_JAVAC_SERVER="yes"
66520fi
66521
66522  if test "x$JVM_ARG_OK" = "xfalse"; then
66523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66524$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66525    ENABLE_JAVAC_SERVER="no"
66526  fi
66527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66528$as_echo_n "checking whether to use javac server... " >&6; }
66529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66530$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66531
66532
66533  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66534    # When using a server javac, the small client instances do not need much
66535    # resources.
66536    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66537  fi
66538
66539
66540# Setup use of icecc if requested
66541
66542  # Check whether --enable-icecc was given.
66543if test "${enable_icecc+set}" = set; then :
66544  enableval=$enable_icecc;
66545fi
66546
66547
66548  if test "x${enable_icecc}" = "xyes"; then
66549
66550
66551
66552  # Publish this variable in the help.
66553
66554
66555  if [ -z "${ICECC_CMD+x}" ]; then
66556    # The variable is not set by user, try to locate tool using the code snippet
66557    for ac_prog in icecc
66558do
66559  # Extract the first word of "$ac_prog", so it can be a program name with args.
66560set dummy $ac_prog; ac_word=$2
66561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66562$as_echo_n "checking for $ac_word... " >&6; }
66563if ${ac_cv_path_ICECC_CMD+:} false; then :
66564  $as_echo_n "(cached) " >&6
66565else
66566  case $ICECC_CMD in
66567  [\\/]* | ?:[\\/]*)
66568  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66569  ;;
66570  *)
66571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66572for as_dir in $PATH
66573do
66574  IFS=$as_save_IFS
66575  test -z "$as_dir" && as_dir=.
66576    for ac_exec_ext in '' $ac_executable_extensions; do
66577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66578    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66580    break 2
66581  fi
66582done
66583  done
66584IFS=$as_save_IFS
66585
66586  ;;
66587esac
66588fi
66589ICECC_CMD=$ac_cv_path_ICECC_CMD
66590if test -n "$ICECC_CMD"; then
66591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66592$as_echo "$ICECC_CMD" >&6; }
66593else
66594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66595$as_echo "no" >&6; }
66596fi
66597
66598
66599  test -n "$ICECC_CMD" && break
66600done
66601
66602  else
66603    # The variable is set, but is it from the command line or the environment?
66604
66605    # Try to remove the string !ICECC_CMD! from our list.
66606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66608      # If it failed, the variable was not from the command line. Ignore it,
66609      # but warn the user (except for BASH, which is always set by the calling BASH).
66610      if test "xICECC_CMD" != xBASH; then
66611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66612$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66613      fi
66614      # Try to locate tool using the code snippet
66615      for ac_prog in icecc
66616do
66617  # Extract the first word of "$ac_prog", so it can be a program name with args.
66618set dummy $ac_prog; ac_word=$2
66619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66620$as_echo_n "checking for $ac_word... " >&6; }
66621if ${ac_cv_path_ICECC_CMD+:} false; then :
66622  $as_echo_n "(cached) " >&6
66623else
66624  case $ICECC_CMD in
66625  [\\/]* | ?:[\\/]*)
66626  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66627  ;;
66628  *)
66629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66630for as_dir in $PATH
66631do
66632  IFS=$as_save_IFS
66633  test -z "$as_dir" && as_dir=.
66634    for ac_exec_ext in '' $ac_executable_extensions; do
66635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66636    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66638    break 2
66639  fi
66640done
66641  done
66642IFS=$as_save_IFS
66643
66644  ;;
66645esac
66646fi
66647ICECC_CMD=$ac_cv_path_ICECC_CMD
66648if test -n "$ICECC_CMD"; then
66649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66650$as_echo "$ICECC_CMD" >&6; }
66651else
66652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66653$as_echo "no" >&6; }
66654fi
66655
66656
66657  test -n "$ICECC_CMD" && break
66658done
66659
66660    else
66661      # If it succeeded, then it was overridden by the user. We will use it
66662      # for the tool.
66663
66664      # First remove it from the list of overridden variables, so we can test
66665      # for unknown variables in the end.
66666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66667
66668      # Check if we try to supply an empty value
66669      if test "x$ICECC_CMD" = x; then
66670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66671$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66673$as_echo_n "checking for ICECC_CMD... " >&6; }
66674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66675$as_echo "disabled" >&6; }
66676      else
66677        # Check if the provided tool contains a complete path.
66678        tool_specified="$ICECC_CMD"
66679        tool_basename="${tool_specified##*/}"
66680        if test "x$tool_basename" = "x$tool_specified"; then
66681          # A command without a complete path is provided, search $PATH.
66682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66683$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66684          # Extract the first word of "$tool_basename", so it can be a program name with args.
66685set dummy $tool_basename; ac_word=$2
66686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66687$as_echo_n "checking for $ac_word... " >&6; }
66688if ${ac_cv_path_ICECC_CMD+:} false; then :
66689  $as_echo_n "(cached) " >&6
66690else
66691  case $ICECC_CMD in
66692  [\\/]* | ?:[\\/]*)
66693  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66694  ;;
66695  *)
66696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66697for as_dir in $PATH
66698do
66699  IFS=$as_save_IFS
66700  test -z "$as_dir" && as_dir=.
66701    for ac_exec_ext in '' $ac_executable_extensions; do
66702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66703    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66705    break 2
66706  fi
66707done
66708  done
66709IFS=$as_save_IFS
66710
66711  ;;
66712esac
66713fi
66714ICECC_CMD=$ac_cv_path_ICECC_CMD
66715if test -n "$ICECC_CMD"; then
66716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66717$as_echo "$ICECC_CMD" >&6; }
66718else
66719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66720$as_echo "no" >&6; }
66721fi
66722
66723
66724          if test "x$ICECC_CMD" = x; then
66725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66726          fi
66727        else
66728          # Otherwise we believe it is a complete path. Use it as it is.
66729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66730$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66732$as_echo_n "checking for ICECC_CMD... " >&6; }
66733          if test ! -x "$tool_specified"; then
66734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66735$as_echo "not found" >&6; }
66736            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66737          fi
66738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66739$as_echo "$tool_specified" >&6; }
66740        fi
66741      fi
66742    fi
66743
66744  fi
66745
66746
66747
66748  if test "x$ICECC_CMD" = x; then
66749    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66750  fi
66751
66752
66753    old_path="$PATH"
66754
66755    # Look for icecc-create-env in some known places
66756    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66757
66758
66759
66760  # Publish this variable in the help.
66761
66762
66763  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66764    # The variable is not set by user, try to locate tool using the code snippet
66765    for ac_prog in icecc-create-env
66766do
66767  # Extract the first word of "$ac_prog", so it can be a program name with args.
66768set dummy $ac_prog; ac_word=$2
66769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66770$as_echo_n "checking for $ac_word... " >&6; }
66771if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66772  $as_echo_n "(cached) " >&6
66773else
66774  case $ICECC_CREATE_ENV in
66775  [\\/]* | ?:[\\/]*)
66776  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66777  ;;
66778  *)
66779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66780for as_dir in $PATH
66781do
66782  IFS=$as_save_IFS
66783  test -z "$as_dir" && as_dir=.
66784    for ac_exec_ext in '' $ac_executable_extensions; do
66785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66786    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66788    break 2
66789  fi
66790done
66791  done
66792IFS=$as_save_IFS
66793
66794  ;;
66795esac
66796fi
66797ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66798if test -n "$ICECC_CREATE_ENV"; then
66799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66800$as_echo "$ICECC_CREATE_ENV" >&6; }
66801else
66802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66803$as_echo "no" >&6; }
66804fi
66805
66806
66807  test -n "$ICECC_CREATE_ENV" && break
66808done
66809
66810  else
66811    # The variable is set, but is it from the command line or the environment?
66812
66813    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66816      # If it failed, the variable was not from the command line. Ignore it,
66817      # but warn the user (except for BASH, which is always set by the calling BASH).
66818      if test "xICECC_CREATE_ENV" != xBASH; then
66819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66820$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66821      fi
66822      # Try to locate tool using the code snippet
66823      for ac_prog in icecc-create-env
66824do
66825  # Extract the first word of "$ac_prog", so it can be a program name with args.
66826set dummy $ac_prog; ac_word=$2
66827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66828$as_echo_n "checking for $ac_word... " >&6; }
66829if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66830  $as_echo_n "(cached) " >&6
66831else
66832  case $ICECC_CREATE_ENV in
66833  [\\/]* | ?:[\\/]*)
66834  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66835  ;;
66836  *)
66837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66838for as_dir in $PATH
66839do
66840  IFS=$as_save_IFS
66841  test -z "$as_dir" && as_dir=.
66842    for ac_exec_ext in '' $ac_executable_extensions; do
66843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66844    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66846    break 2
66847  fi
66848done
66849  done
66850IFS=$as_save_IFS
66851
66852  ;;
66853esac
66854fi
66855ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66856if test -n "$ICECC_CREATE_ENV"; then
66857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66858$as_echo "$ICECC_CREATE_ENV" >&6; }
66859else
66860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66861$as_echo "no" >&6; }
66862fi
66863
66864
66865  test -n "$ICECC_CREATE_ENV" && break
66866done
66867
66868    else
66869      # If it succeeded, then it was overridden by the user. We will use it
66870      # for the tool.
66871
66872      # First remove it from the list of overridden variables, so we can test
66873      # for unknown variables in the end.
66874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66875
66876      # Check if we try to supply an empty value
66877      if test "x$ICECC_CREATE_ENV" = x; then
66878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66879$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66881$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66883$as_echo "disabled" >&6; }
66884      else
66885        # Check if the provided tool contains a complete path.
66886        tool_specified="$ICECC_CREATE_ENV"
66887        tool_basename="${tool_specified##*/}"
66888        if test "x$tool_basename" = "x$tool_specified"; then
66889          # A command without a complete path is provided, search $PATH.
66890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66891$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66892          # Extract the first word of "$tool_basename", so it can be a program name with args.
66893set dummy $tool_basename; ac_word=$2
66894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66895$as_echo_n "checking for $ac_word... " >&6; }
66896if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66897  $as_echo_n "(cached) " >&6
66898else
66899  case $ICECC_CREATE_ENV in
66900  [\\/]* | ?:[\\/]*)
66901  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66902  ;;
66903  *)
66904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66905for as_dir in $PATH
66906do
66907  IFS=$as_save_IFS
66908  test -z "$as_dir" && as_dir=.
66909    for ac_exec_ext in '' $ac_executable_extensions; do
66910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66911    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66913    break 2
66914  fi
66915done
66916  done
66917IFS=$as_save_IFS
66918
66919  ;;
66920esac
66921fi
66922ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66923if test -n "$ICECC_CREATE_ENV"; then
66924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66925$as_echo "$ICECC_CREATE_ENV" >&6; }
66926else
66927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66928$as_echo "no" >&6; }
66929fi
66930
66931
66932          if test "x$ICECC_CREATE_ENV" = x; then
66933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66934          fi
66935        else
66936          # Otherwise we believe it is a complete path. Use it as it is.
66937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66938$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66940$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66941          if test ! -x "$tool_specified"; then
66942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66943$as_echo "not found" >&6; }
66944            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66945          fi
66946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66947$as_echo "$tool_specified" >&6; }
66948        fi
66949      fi
66950    fi
66951
66952  fi
66953
66954
66955
66956  if test "x$ICECC_CREATE_ENV" = x; then
66957    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66958  fi
66959
66960
66961    # Use icecc-create-env to create a minimal compilation environment that can
66962    # be sent to the other hosts in the icecream cluster.
66963    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66964    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66965    # Older versions of icecc does not have the --gcc parameter
66966    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66967      icecc_gcc_arg="--gcc"
66968    fi
66969    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66970
66971  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66972      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66973          ${icecc_create_env_log} 2>&1 )
66974  if test "$?" != "0"; then
66975    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66976$as_echo "$as_me: icecc-create-env output:" >&6;}
66977    cat \
66978          ${icecc_create_env_log}
66979    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66980  fi
66981
66982    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66983      # For clang, the icecc compilerwrapper is needed. It usually resides next
66984      # to icecc-create-env.
66985
66986
66987
66988  # Publish this variable in the help.
66989
66990
66991  if [ -z "${ICECC_WRAPPER+x}" ]; then
66992    # The variable is not set by user, try to locate tool using the code snippet
66993    for ac_prog in compilerwrapper
66994do
66995  # Extract the first word of "$ac_prog", so it can be a program name with args.
66996set dummy $ac_prog; ac_word=$2
66997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66998$as_echo_n "checking for $ac_word... " >&6; }
66999if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67000  $as_echo_n "(cached) " >&6
67001else
67002  case $ICECC_WRAPPER in
67003  [\\/]* | ?:[\\/]*)
67004  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67005  ;;
67006  *)
67007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67008for as_dir in $PATH
67009do
67010  IFS=$as_save_IFS
67011  test -z "$as_dir" && as_dir=.
67012    for ac_exec_ext in '' $ac_executable_extensions; do
67013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67014    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67016    break 2
67017  fi
67018done
67019  done
67020IFS=$as_save_IFS
67021
67022  ;;
67023esac
67024fi
67025ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67026if test -n "$ICECC_WRAPPER"; then
67027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67028$as_echo "$ICECC_WRAPPER" >&6; }
67029else
67030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67031$as_echo "no" >&6; }
67032fi
67033
67034
67035  test -n "$ICECC_WRAPPER" && break
67036done
67037
67038  else
67039    # The variable is set, but is it from the command line or the environment?
67040
67041    # Try to remove the string !ICECC_WRAPPER! from our list.
67042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67044      # If it failed, the variable was not from the command line. Ignore it,
67045      # but warn the user (except for BASH, which is always set by the calling BASH).
67046      if test "xICECC_WRAPPER" != xBASH; then
67047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67048$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67049      fi
67050      # Try to locate tool using the code snippet
67051      for ac_prog in compilerwrapper
67052do
67053  # Extract the first word of "$ac_prog", so it can be a program name with args.
67054set dummy $ac_prog; ac_word=$2
67055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67056$as_echo_n "checking for $ac_word... " >&6; }
67057if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67058  $as_echo_n "(cached) " >&6
67059else
67060  case $ICECC_WRAPPER in
67061  [\\/]* | ?:[\\/]*)
67062  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67063  ;;
67064  *)
67065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67066for as_dir in $PATH
67067do
67068  IFS=$as_save_IFS
67069  test -z "$as_dir" && as_dir=.
67070    for ac_exec_ext in '' $ac_executable_extensions; do
67071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67072    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67074    break 2
67075  fi
67076done
67077  done
67078IFS=$as_save_IFS
67079
67080  ;;
67081esac
67082fi
67083ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67084if test -n "$ICECC_WRAPPER"; then
67085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67086$as_echo "$ICECC_WRAPPER" >&6; }
67087else
67088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67089$as_echo "no" >&6; }
67090fi
67091
67092
67093  test -n "$ICECC_WRAPPER" && break
67094done
67095
67096    else
67097      # If it succeeded, then it was overridden by the user. We will use it
67098      # for the tool.
67099
67100      # First remove it from the list of overridden variables, so we can test
67101      # for unknown variables in the end.
67102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67103
67104      # Check if we try to supply an empty value
67105      if test "x$ICECC_WRAPPER" = x; then
67106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67107$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67109$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67111$as_echo "disabled" >&6; }
67112      else
67113        # Check if the provided tool contains a complete path.
67114        tool_specified="$ICECC_WRAPPER"
67115        tool_basename="${tool_specified##*/}"
67116        if test "x$tool_basename" = "x$tool_specified"; then
67117          # A command without a complete path is provided, search $PATH.
67118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67119$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67120          # Extract the first word of "$tool_basename", so it can be a program name with args.
67121set dummy $tool_basename; ac_word=$2
67122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67123$as_echo_n "checking for $ac_word... " >&6; }
67124if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67125  $as_echo_n "(cached) " >&6
67126else
67127  case $ICECC_WRAPPER in
67128  [\\/]* | ?:[\\/]*)
67129  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67130  ;;
67131  *)
67132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67133for as_dir in $PATH
67134do
67135  IFS=$as_save_IFS
67136  test -z "$as_dir" && as_dir=.
67137    for ac_exec_ext in '' $ac_executable_extensions; do
67138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67139    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67141    break 2
67142  fi
67143done
67144  done
67145IFS=$as_save_IFS
67146
67147  ;;
67148esac
67149fi
67150ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67151if test -n "$ICECC_WRAPPER"; then
67152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67153$as_echo "$ICECC_WRAPPER" >&6; }
67154else
67155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67156$as_echo "no" >&6; }
67157fi
67158
67159
67160          if test "x$ICECC_WRAPPER" = x; then
67161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67162          fi
67163        else
67164          # Otherwise we believe it is a complete path. Use it as it is.
67165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67166$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67168$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67169          if test ! -x "$tool_specified"; then
67170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67171$as_echo "not found" >&6; }
67172            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67173          fi
67174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67175$as_echo "$tool_specified" >&6; }
67176        fi
67177      fi
67178    fi
67179
67180  fi
67181
67182
67183
67184  if test "x$ICECC_WRAPPER" = x; then
67185    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67186  fi
67187
67188
67189
67190  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67191      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67192  if test "$?" != "0"; then
67193    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67194$as_echo "$as_me: icecc-create-env output:" >&6;}
67195    cat ${icecc_create_env_log}
67196    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67197  fi
67198
67199    else
67200      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67201    fi
67202    PATH="$old_path"
67203    # The bundle with the compiler gets a name based on checksums. Parse log file
67204    # to find it.
67205    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67206    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67207    if test ! -f ${ICECC_ENV_BUNDLE}; then
67208      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67209    fi
67210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67211$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67213$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67214    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67215
67216    if test "x${COMPILE_TYPE}" = "xcross"; then
67217      # If cross compiling, create a separate env package for the build compiler
67218      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67219      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67220      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67221
67222  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67223      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67224            ${icecc_create_env_log_build} 2>&1 )
67225  if test "$?" != "0"; then
67226    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67227$as_echo "$as_me: icecc-create-env output:" >&6;}
67228    cat \
67229            ${icecc_create_env_log_build}
67230    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67231  fi
67232
67233      elif test "x${BUILD_CC##*/}" = "xclang"; then
67234
67235  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67236      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67237  if test "$?" != "0"; then
67238    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67239$as_echo "$as_me: icecc-create-env output:" >&6;}
67240    cat ${icecc_create_env_log_build}
67241    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67242  fi
67243
67244      else
67245        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67246      fi
67247      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67248      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67249      if test ! -f ${ICECC_ENV_BUNDLE}; then
67250        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67251      fi
67252      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67253$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67255$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67256      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67257          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67258    else
67259      BUILD_ICECC="${ICECC}"
67260    fi
67261
67262
67263  fi
67264
67265
67266# Can the C/C++ compiler use precompiled headers?
67267
67268
67269  ###############################################################################
67270  #
67271  # Can the C/C++ compiler use precompiled headers?
67272  #
67273  # Check whether --enable-precompiled-headers was given.
67274if test "${enable_precompiled_headers+set}" = set; then :
67275  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67276else
67277  ENABLE_PRECOMPH=yes
67278fi
67279
67280
67281  USE_PRECOMPILED_HEADER=true
67282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67283$as_echo_n "checking If precompiled header is enabled... " >&6; }
67284  if test "x$ENABLE_PRECOMPH" = xno; then
67285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67286$as_echo "no, forced" >&6; }
67287    USE_PRECOMPILED_HEADER=false
67288  elif test "x$ICECC" != "x"; then
67289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67290$as_echo "no, does not work effectively with icecc" >&6; }
67291    USE_PRECOMPILED_HEADER=false
67292  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67294$as_echo "no, does not work with Solaris Studio" >&6; }
67295    USE_PRECOMPILED_HEADER=false
67296  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67298$as_echo "no, does not work with xlc" >&6; }
67299    USE_PRECOMPILED_HEADER=false
67300  else
67301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67302$as_echo "yes" >&6; }
67303  fi
67304
67305  if test "x$ENABLE_PRECOMPH" = xyes; then
67306    # Check that the compiler actually supports precomp headers.
67307    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67308      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67309$as_echo_n "checking that precompiled headers work... " >&6; }
67310      echo "int alfa();" > conftest.h
67311      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67312      if test ! -f conftest.hpp.gch; then
67313        USE_PRECOMPILED_HEADER=false
67314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67315$as_echo "no" >&6; }
67316      else
67317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67318$as_echo "yes" >&6; }
67319      fi
67320      $RM conftest.h conftest.hpp.gch
67321    fi
67322  fi
67323
67324
67325
67326
67327# Setup use of ccache, if available
67328
67329  # Check whether --enable-ccache was given.
67330if test "${enable_ccache+set}" = set; then :
67331  enableval=$enable_ccache;
67332fi
67333
67334
67335  CCACHE_STATUS=
67336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67337$as_echo_n "checking is ccache enabled... " >&6; }
67338  if test "x$enable_ccache" = xyes; then
67339    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67341$as_echo "yes" >&6; }
67342      OLD_PATH="$PATH"
67343      if test "x$TOOLCHAIN_PATH" != x; then
67344        PATH=$TOOLCHAIN_PATH:$PATH
67345      fi
67346
67347
67348
67349  # Publish this variable in the help.
67350
67351
67352  if [ -z "${CCACHE+x}" ]; then
67353    # The variable is not set by user, try to locate tool using the code snippet
67354    for ac_prog in ccache
67355do
67356  # Extract the first word of "$ac_prog", so it can be a program name with args.
67357set dummy $ac_prog; ac_word=$2
67358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67359$as_echo_n "checking for $ac_word... " >&6; }
67360if ${ac_cv_path_CCACHE+:} false; then :
67361  $as_echo_n "(cached) " >&6
67362else
67363  case $CCACHE in
67364  [\\/]* | ?:[\\/]*)
67365  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67366  ;;
67367  *)
67368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67369for as_dir in $PATH
67370do
67371  IFS=$as_save_IFS
67372  test -z "$as_dir" && as_dir=.
67373    for ac_exec_ext in '' $ac_executable_extensions; do
67374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67375    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67377    break 2
67378  fi
67379done
67380  done
67381IFS=$as_save_IFS
67382
67383  ;;
67384esac
67385fi
67386CCACHE=$ac_cv_path_CCACHE
67387if test -n "$CCACHE"; then
67388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67389$as_echo "$CCACHE" >&6; }
67390else
67391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67392$as_echo "no" >&6; }
67393fi
67394
67395
67396  test -n "$CCACHE" && break
67397done
67398
67399  else
67400    # The variable is set, but is it from the command line or the environment?
67401
67402    # Try to remove the string !CCACHE! from our list.
67403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67405      # If it failed, the variable was not from the command line. Ignore it,
67406      # but warn the user (except for BASH, which is always set by the calling BASH).
67407      if test "xCCACHE" != xBASH; then
67408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67409$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67410      fi
67411      # Try to locate tool using the code snippet
67412      for ac_prog in ccache
67413do
67414  # Extract the first word of "$ac_prog", so it can be a program name with args.
67415set dummy $ac_prog; ac_word=$2
67416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67417$as_echo_n "checking for $ac_word... " >&6; }
67418if ${ac_cv_path_CCACHE+:} false; then :
67419  $as_echo_n "(cached) " >&6
67420else
67421  case $CCACHE in
67422  [\\/]* | ?:[\\/]*)
67423  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67424  ;;
67425  *)
67426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67427for as_dir in $PATH
67428do
67429  IFS=$as_save_IFS
67430  test -z "$as_dir" && as_dir=.
67431    for ac_exec_ext in '' $ac_executable_extensions; do
67432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67433    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67435    break 2
67436  fi
67437done
67438  done
67439IFS=$as_save_IFS
67440
67441  ;;
67442esac
67443fi
67444CCACHE=$ac_cv_path_CCACHE
67445if test -n "$CCACHE"; then
67446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67447$as_echo "$CCACHE" >&6; }
67448else
67449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67450$as_echo "no" >&6; }
67451fi
67452
67453
67454  test -n "$CCACHE" && break
67455done
67456
67457    else
67458      # If it succeeded, then it was overridden by the user. We will use it
67459      # for the tool.
67460
67461      # First remove it from the list of overridden variables, so we can test
67462      # for unknown variables in the end.
67463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67464
67465      # Check if we try to supply an empty value
67466      if test "x$CCACHE" = x; then
67467        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67468$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67469        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67470$as_echo_n "checking for CCACHE... " >&6; }
67471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67472$as_echo "disabled" >&6; }
67473      else
67474        # Check if the provided tool contains a complete path.
67475        tool_specified="$CCACHE"
67476        tool_basename="${tool_specified##*/}"
67477        if test "x$tool_basename" = "x$tool_specified"; then
67478          # A command without a complete path is provided, search $PATH.
67479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67480$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67481          # Extract the first word of "$tool_basename", so it can be a program name with args.
67482set dummy $tool_basename; ac_word=$2
67483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67484$as_echo_n "checking for $ac_word... " >&6; }
67485if ${ac_cv_path_CCACHE+:} false; then :
67486  $as_echo_n "(cached) " >&6
67487else
67488  case $CCACHE in
67489  [\\/]* | ?:[\\/]*)
67490  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67491  ;;
67492  *)
67493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67494for as_dir in $PATH
67495do
67496  IFS=$as_save_IFS
67497  test -z "$as_dir" && as_dir=.
67498    for ac_exec_ext in '' $ac_executable_extensions; do
67499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67500    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67502    break 2
67503  fi
67504done
67505  done
67506IFS=$as_save_IFS
67507
67508  ;;
67509esac
67510fi
67511CCACHE=$ac_cv_path_CCACHE
67512if test -n "$CCACHE"; then
67513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67514$as_echo "$CCACHE" >&6; }
67515else
67516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67517$as_echo "no" >&6; }
67518fi
67519
67520
67521          if test "x$CCACHE" = x; then
67522            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67523          fi
67524        else
67525          # Otherwise we believe it is a complete path. Use it as it is.
67526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67527$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67528          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67529$as_echo_n "checking for CCACHE... " >&6; }
67530          if test ! -x "$tool_specified"; then
67531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67532$as_echo "not found" >&6; }
67533            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67534          fi
67535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67536$as_echo "$tool_specified" >&6; }
67537        fi
67538      fi
67539    fi
67540
67541  fi
67542
67543
67544
67545  if test "x$CCACHE" = x; then
67546    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67547  fi
67548
67549
67550      PATH="$OLD_PATH"
67551      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67552      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67553    else
67554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67555$as_echo "no" >&6; }
67556      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67557$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67558    fi
67559  elif test "x$enable_ccache" = xno; then
67560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67561$as_echo "no, explicitly disabled" >&6; }
67562    CCACHE_STATUS="Disabled"
67563  elif test "x$enable_ccache" = x; then
67564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67565$as_echo "no" >&6; }
67566  else
67567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67568$as_echo "unknown" >&6; }
67569    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67570  fi
67571
67572
67573
67574# Check whether --with-ccache-dir was given.
67575if test "${with_ccache_dir+set}" = set; then :
67576  withval=$with_ccache_dir;
67577fi
67578
67579
67580  if test "x$with_ccache_dir" != x; then
67581    # When using a non home ccache directory, assume the use is to share ccache files
67582    # with other users. Thus change the umask.
67583    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67584    if test "x$CCACHE" = x; then
67585      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67586$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67587    fi
67588  fi
67589
67590  if test "x$CCACHE" != x; then
67591
67592  if test "x$CCACHE" != x; then
67593    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67594      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67595          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67596      if test "x$HAS_BAD_CCACHE" != "x"; then
67597        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67598      fi
67599    fi
67600    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67601      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67602          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67603      if test "x$HAS_BAD_CCACHE" != "x"; then
67604        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67605      fi
67606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67607$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67608      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67609      PUSHED_FLAGS="$CXXFLAGS"
67610      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67612/* end confdefs.h.  */
67613
67614int
67615main ()
67616{
67617
67618  ;
67619  return 0;
67620}
67621_ACEOF
67622if ac_fn_cxx_try_compile "$LINENO"; then :
67623  CC_KNOWS_CCACHE_TRICK=yes
67624else
67625  CC_KNOWS_CCACHE_TRICK=no
67626fi
67627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67628      CXXFLAGS="$PUSHED_FLAGS"
67629      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67631$as_echo "yes" >&6; }
67632        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67633
67634        CCACHE_SLOPPINESS=pch_defines,time_macros
67635      else
67636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67637$as_echo "no" >&6; }
67638        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67639      fi
67640    fi
67641
67642    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67643        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67644
67645    if test "x$SET_CCACHE_DIR" != x; then
67646      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67647      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67648    fi
67649  fi
67650
67651  fi
67652
67653
67654###############################################################################
67655#
67656# And now the finish...
67657#
67658###############################################################################
67659
67660# Check for some common pitfalls
67661
67662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67663    file_to_test="$SRC_ROOT/LICENSE"
67664    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67665      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
67666    fi
67667  fi
67668
67669
67670  # Did user specify any unknown variables?
67671
67672  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67673    # Replace the separating ! with spaces before presenting for end user.
67674    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67676$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67677  fi
67678
67679
67680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67681$as_echo_n "checking if build directory is on local disk... " >&6; }
67682
67683  # df -l lists only local disks; if the given directory is not found then
67684  # a non-zero exit code is given
67685  if test "x$DF" = x; then
67686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67687      # msys does not have df; use Windows "net use" instead.
67688      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67689      if test "x$IS_NETWORK_DISK" = x; then
67690        OUTPUT_DIR_IS_LOCAL="yes"
67691      else
67692        OUTPUT_DIR_IS_LOCAL="no"
67693      fi
67694    else
67695      # No df here, say it's local
67696      OUTPUT_DIR_IS_LOCAL="yes"
67697    fi
67698  else
67699    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67700      OUTPUT_DIR_IS_LOCAL="yes"
67701    else
67702      OUTPUT_DIR_IS_LOCAL="no"
67703    fi
67704  fi
67705
67706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67707$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67708
67709
67710
67711  # Check if the user has any old-style ALT_ variables set.
67712  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67713
67714  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67715  # Since we can't properly handle the dependencies for this, warn the user about the situation
67716  if test -e $OUTPUT_ROOT/spec.gmk; then
67717    IS_RECONFIGURE=yes
67718  else
67719    IS_RECONFIGURE=no
67720  fi
67721
67722
67723# At the end, call the custom hook. (Dummy macro if no custom sources available)
67724
67725
67726# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67727
67728  # Keep feature lists sorted and free of duplicates
67729  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67730  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67731  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67732  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67733  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67734  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67735  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67736
67737  # Validate features
67738  for variant in $JVM_VARIANTS; do
67739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67740$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67741    features_var_name=JVM_FEATURES_$variant
67742    JVM_FEATURES_TO_TEST=${!features_var_name}
67743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67744$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67745    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67746    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67747    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67748    if test "x$INVALID_FEATURES" != x; then
67749      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67750    fi
67751  done
67752
67753
67754# We're messing a bit with internal autoconf variables to put the config.status
67755# in the output directory instead of the current directory.
67756CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67757
67758# Create the actual output files. Now the main work of configure is done.
67759cat >confcache <<\_ACEOF
67760# This file is a shell script that caches the results of configure
67761# tests run on this system so they can be shared between configure
67762# scripts and configure runs, see configure's option --config-cache.
67763# It is not useful on other systems.  If it contains results you don't
67764# want to keep, you may remove or edit it.
67765#
67766# config.status only pays attention to the cache file if you give it
67767# the --recheck option to rerun configure.
67768#
67769# `ac_cv_env_foo' variables (set or unset) will be overridden when
67770# loading this file, other *unset* `ac_cv_foo' will be assigned the
67771# following values.
67772
67773_ACEOF
67774
67775# The following way of writing the cache mishandles newlines in values,
67776# but we know of no workaround that is simple, portable, and efficient.
67777# So, we kill variables containing newlines.
67778# Ultrix sh set writes to stderr and can't be redirected directly,
67779# and sets the high bit in the cache file unless we assign to the vars.
67780(
67781  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67782    eval ac_val=\$$ac_var
67783    case $ac_val in #(
67784    *${as_nl}*)
67785      case $ac_var in #(
67786      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67787$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67788      esac
67789      case $ac_var in #(
67790      _ | IFS | as_nl) ;; #(
67791      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67792      *) { eval $ac_var=; unset $ac_var;} ;;
67793      esac ;;
67794    esac
67795  done
67796
67797  (set) 2>&1 |
67798    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67799    *${as_nl}ac_space=\ *)
67800      # `set' does not quote correctly, so add quotes: double-quote
67801      # substitution turns \\\\ into \\, and sed turns \\ into \.
67802      sed -n \
67803	"s/'/'\\\\''/g;
67804	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67805      ;; #(
67806    *)
67807      # `set' quotes correctly as required by POSIX, so do not add quotes.
67808      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67809      ;;
67810    esac |
67811    sort
67812) |
67813  sed '
67814     /^ac_cv_env_/b end
67815     t clear
67816     :clear
67817     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67818     t end
67819     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67820     :end' >>confcache
67821if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67822  if test -w "$cache_file"; then
67823    if test "x$cache_file" != "x/dev/null"; then
67824      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67825$as_echo "$as_me: updating cache $cache_file" >&6;}
67826      if test ! -f "$cache_file" || test -h "$cache_file"; then
67827	cat confcache >"$cache_file"
67828      else
67829        case $cache_file in #(
67830        */* | ?:*)
67831	  mv -f confcache "$cache_file"$$ &&
67832	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67833        *)
67834	  mv -f confcache "$cache_file" ;;
67835	esac
67836      fi
67837    fi
67838  else
67839    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67840$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67841  fi
67842fi
67843rm -f confcache
67844
67845test "x$prefix" = xNONE && prefix=$ac_default_prefix
67846# Let make expand exec_prefix.
67847test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67848
67849# Transform confdefs.h into DEFS.
67850# Protect against shell expansion while executing Makefile rules.
67851# Protect against Makefile macro expansion.
67852#
67853# If the first sed substitution is executed (which looks for macros that
67854# take arguments), then branch to the quote section.  Otherwise,
67855# look for a macro that doesn't take arguments.
67856ac_script='
67857:mline
67858/\\$/{
67859 N
67860 s,\\\n,,
67861 b mline
67862}
67863t clear
67864:clear
67865s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67866t quote
67867s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67868t quote
67869b any
67870:quote
67871s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67872s/\[/\\&/g
67873s/\]/\\&/g
67874s/\$/$$/g
67875H
67876:any
67877${
67878	g
67879	s/^\n//
67880	s/\n/ /g
67881	p
67882}
67883'
67884DEFS=`sed -n "$ac_script" confdefs.h`
67885
67886
67887ac_libobjs=
67888ac_ltlibobjs=
67889U=
67890for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67891  # 1. Remove the extension, and $U if already installed.
67892  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67893  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67894  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67895  #    will be set to the directory where LIBOBJS objects are built.
67896  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67897  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67898done
67899LIBOBJS=$ac_libobjs
67900
67901LTLIBOBJS=$ac_ltlibobjs
67902
67903
67904
67905: "${CONFIG_STATUS=./config.status}"
67906ac_write_fail=0
67907ac_clean_files_save=$ac_clean_files
67908ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67909{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67910$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67911as_write_fail=0
67912cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67913#! $SHELL
67914# Generated by $as_me.
67915# Run this file to recreate the current configuration.
67916# Compiler output produced by configure, useful for debugging
67917# configure, is in config.log if it exists.
67918
67919debug=false
67920ac_cs_recheck=false
67921ac_cs_silent=false
67922
67923SHELL=\${CONFIG_SHELL-$SHELL}
67924export SHELL
67925_ASEOF
67926cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67927## -------------------- ##
67928## M4sh Initialization. ##
67929## -------------------- ##
67930
67931# Be more Bourne compatible
67932DUALCASE=1; export DUALCASE # for MKS sh
67933if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67934  emulate sh
67935  NULLCMD=:
67936  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67937  # is contrary to our usage.  Disable this feature.
67938  alias -g '${1+"$@"}'='"$@"'
67939  setopt NO_GLOB_SUBST
67940else
67941  case `(set -o) 2>/dev/null` in #(
67942  *posix*) :
67943    set -o posix ;; #(
67944  *) :
67945     ;;
67946esac
67947fi
67948
67949
67950as_nl='
67951'
67952export as_nl
67953# Printing a long string crashes Solaris 7 /usr/bin/printf.
67954as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67955as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67956as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67957# Prefer a ksh shell builtin over an external printf program on Solaris,
67958# but without wasting forks for bash or zsh.
67959if test -z "$BASH_VERSION$ZSH_VERSION" \
67960    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67961  as_echo='print -r --'
67962  as_echo_n='print -rn --'
67963elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67964  as_echo='printf %s\n'
67965  as_echo_n='printf %s'
67966else
67967  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67968    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67969    as_echo_n='/usr/ucb/echo -n'
67970  else
67971    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67972    as_echo_n_body='eval
67973      arg=$1;
67974      case $arg in #(
67975      *"$as_nl"*)
67976	expr "X$arg" : "X\\(.*\\)$as_nl";
67977	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67978      esac;
67979      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67980    '
67981    export as_echo_n_body
67982    as_echo_n='sh -c $as_echo_n_body as_echo'
67983  fi
67984  export as_echo_body
67985  as_echo='sh -c $as_echo_body as_echo'
67986fi
67987
67988# The user is always right.
67989if test "${PATH_SEPARATOR+set}" != set; then
67990  PATH_SEPARATOR=:
67991  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67992    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67993      PATH_SEPARATOR=';'
67994  }
67995fi
67996
67997
67998# IFS
67999# We need space, tab and new line, in precisely that order.  Quoting is
68000# there to prevent editors from complaining about space-tab.
68001# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68002# splitting by setting IFS to empty value.)
68003IFS=" ""	$as_nl"
68004
68005# Find who we are.  Look in the path if we contain no directory separator.
68006as_myself=
68007case $0 in #((
68008  *[\\/]* ) as_myself=$0 ;;
68009  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68010for as_dir in $PATH
68011do
68012  IFS=$as_save_IFS
68013  test -z "$as_dir" && as_dir=.
68014    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
68015  done
68016IFS=$as_save_IFS
68017
68018     ;;
68019esac
68020# We did not find ourselves, most probably we were run as `sh COMMAND'
68021# in which case we are not to be found in the path.
68022if test "x$as_myself" = x; then
68023  as_myself=$0
68024fi
68025if test ! -f "$as_myself"; then
68026  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
68027  exit 1
68028fi
68029
68030# Unset variables that we do not need and which cause bugs (e.g. in
68031# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
68032# suppresses any "Segmentation fault" message there.  '((' could
68033# trigger a bug in pdksh 5.2.14.
68034for as_var in BASH_ENV ENV MAIL MAILPATH
68035do eval test x\${$as_var+set} = xset \
68036  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68037done
68038PS1='$ '
68039PS2='> '
68040PS4='+ '
68041
68042# NLS nuisances.
68043LC_ALL=C
68044export LC_ALL
68045LANGUAGE=C
68046export LANGUAGE
68047
68048# CDPATH.
68049(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68050
68051
68052# as_fn_error STATUS ERROR [LINENO LOG_FD]
68053# ----------------------------------------
68054# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68055# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68056# script with STATUS, using 1 if that was 0.
68057as_fn_error ()
68058{
68059  as_status=$1; test $as_status -eq 0 && as_status=1
68060  if test "$4"; then
68061    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68062    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68063  fi
68064  $as_echo "$as_me: error: $2" >&2
68065  as_fn_exit $as_status
68066} # as_fn_error
68067
68068
68069# as_fn_set_status STATUS
68070# -----------------------
68071# Set $? to STATUS, without forking.
68072as_fn_set_status ()
68073{
68074  return $1
68075} # as_fn_set_status
68076
68077# as_fn_exit STATUS
68078# -----------------
68079# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68080as_fn_exit ()
68081{
68082  set +e
68083  as_fn_set_status $1
68084  exit $1
68085} # as_fn_exit
68086
68087# as_fn_unset VAR
68088# ---------------
68089# Portably unset VAR.
68090as_fn_unset ()
68091{
68092  { eval $1=; unset $1;}
68093}
68094as_unset=as_fn_unset
68095# as_fn_append VAR VALUE
68096# ----------------------
68097# Append the text in VALUE to the end of the definition contained in VAR. Take
68098# advantage of any shell optimizations that allow amortized linear growth over
68099# repeated appends, instead of the typical quadratic growth present in naive
68100# implementations.
68101if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68102  eval 'as_fn_append ()
68103  {
68104    eval $1+=\$2
68105  }'
68106else
68107  as_fn_append ()
68108  {
68109    eval $1=\$$1\$2
68110  }
68111fi # as_fn_append
68112
68113# as_fn_arith ARG...
68114# ------------------
68115# Perform arithmetic evaluation on the ARGs, and store the result in the
68116# global $as_val. Take advantage of shells that can avoid forks. The arguments
68117# must be portable across $(()) and expr.
68118if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68119  eval 'as_fn_arith ()
68120  {
68121    as_val=$(( $* ))
68122  }'
68123else
68124  as_fn_arith ()
68125  {
68126    as_val=`expr "$@" || test $? -eq 1`
68127  }
68128fi # as_fn_arith
68129
68130
68131if expr a : '\(a\)' >/dev/null 2>&1 &&
68132   test "X`expr 00001 : '.*\(...\)'`" = X001; then
68133  as_expr=expr
68134else
68135  as_expr=false
68136fi
68137
68138if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68139  as_basename=basename
68140else
68141  as_basename=false
68142fi
68143
68144if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68145  as_dirname=dirname
68146else
68147  as_dirname=false
68148fi
68149
68150as_me=`$as_basename -- "$0" ||
68151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68152	 X"$0" : 'X\(//\)$' \| \
68153	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68154$as_echo X/"$0" |
68155    sed '/^.*\/\([^/][^/]*\)\/*$/{
68156	    s//\1/
68157	    q
68158	  }
68159	  /^X\/\(\/\/\)$/{
68160	    s//\1/
68161	    q
68162	  }
68163	  /^X\/\(\/\).*/{
68164	    s//\1/
68165	    q
68166	  }
68167	  s/.*/./; q'`
68168
68169# Avoid depending upon Character Ranges.
68170as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68171as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68172as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68173as_cr_digits='0123456789'
68174as_cr_alnum=$as_cr_Letters$as_cr_digits
68175
68176ECHO_C= ECHO_N= ECHO_T=
68177case `echo -n x` in #(((((
68178-n*)
68179  case `echo 'xy\c'` in
68180  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
68181  xy)  ECHO_C='\c';;
68182  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68183       ECHO_T='	';;
68184  esac;;
68185*)
68186  ECHO_N='-n';;
68187esac
68188
68189rm -f conf$$ conf$$.exe conf$$.file
68190if test -d conf$$.dir; then
68191  rm -f conf$$.dir/conf$$.file
68192else
68193  rm -f conf$$.dir
68194  mkdir conf$$.dir 2>/dev/null
68195fi
68196if (echo >conf$$.file) 2>/dev/null; then
68197  if ln -s conf$$.file conf$$ 2>/dev/null; then
68198    as_ln_s='ln -s'
68199    # ... but there are two gotchas:
68200    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68201    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68202    # In both cases, we have to default to `cp -pR'.
68203    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68204      as_ln_s='cp -pR'
68205  elif ln conf$$.file conf$$ 2>/dev/null; then
68206    as_ln_s=ln
68207  else
68208    as_ln_s='cp -pR'
68209  fi
68210else
68211  as_ln_s='cp -pR'
68212fi
68213rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68214rmdir conf$$.dir 2>/dev/null
68215
68216
68217# as_fn_mkdir_p
68218# -------------
68219# Create "$as_dir" as a directory, including parents if necessary.
68220as_fn_mkdir_p ()
68221{
68222
68223  case $as_dir in #(
68224  -*) as_dir=./$as_dir;;
68225  esac
68226  test -d "$as_dir" || eval $as_mkdir_p || {
68227    as_dirs=
68228    while :; do
68229      case $as_dir in #(
68230      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68231      *) as_qdir=$as_dir;;
68232      esac
68233      as_dirs="'$as_qdir' $as_dirs"
68234      as_dir=`$as_dirname -- "$as_dir" ||
68235$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68236	 X"$as_dir" : 'X\(//\)[^/]' \| \
68237	 X"$as_dir" : 'X\(//\)$' \| \
68238	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68239$as_echo X"$as_dir" |
68240    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68241	    s//\1/
68242	    q
68243	  }
68244	  /^X\(\/\/\)[^/].*/{
68245	    s//\1/
68246	    q
68247	  }
68248	  /^X\(\/\/\)$/{
68249	    s//\1/
68250	    q
68251	  }
68252	  /^X\(\/\).*/{
68253	    s//\1/
68254	    q
68255	  }
68256	  s/.*/./; q'`
68257      test -d "$as_dir" && break
68258    done
68259    test -z "$as_dirs" || eval "mkdir $as_dirs"
68260  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68261
68262
68263} # as_fn_mkdir_p
68264if mkdir -p . 2>/dev/null; then
68265  as_mkdir_p='mkdir -p "$as_dir"'
68266else
68267  test -d ./-p && rmdir ./-p
68268  as_mkdir_p=false
68269fi
68270
68271
68272# as_fn_executable_p FILE
68273# -----------------------
68274# Test if FILE is an executable regular file.
68275as_fn_executable_p ()
68276{
68277  test -f "$1" && test -x "$1"
68278} # as_fn_executable_p
68279as_test_x='test -x'
68280as_executable_p=as_fn_executable_p
68281
68282# Sed expression to map a string onto a valid CPP name.
68283as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68284
68285# Sed expression to map a string onto a valid variable name.
68286as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68287
68288
68289exec 6>&1
68290## ----------------------------------- ##
68291## Main body of $CONFIG_STATUS script. ##
68292## ----------------------------------- ##
68293_ASEOF
68294test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68295
68296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68297# Save the log message, to keep $0 and so on meaningful, and to
68298# report actual input values of CONFIG_FILES etc. instead of their
68299# values after options handling.
68300ac_log="
68301This file was extended by OpenJDK $as_me jdk9, which was
68302generated by GNU Autoconf 2.69.  Invocation command line was
68303
68304  CONFIG_FILES    = $CONFIG_FILES
68305  CONFIG_HEADERS  = $CONFIG_HEADERS
68306  CONFIG_LINKS    = $CONFIG_LINKS
68307  CONFIG_COMMANDS = $CONFIG_COMMANDS
68308  $ $0 $@
68309
68310on `(hostname || uname -n) 2>/dev/null | sed 1q`
68311"
68312
68313_ACEOF
68314
68315case $ac_config_files in *"
68316"*) set x $ac_config_files; shift; ac_config_files=$*;;
68317esac
68318
68319
68320
68321cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68322# Files that config.status was made for.
68323config_files="$ac_config_files"
68324
68325_ACEOF
68326
68327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68328ac_cs_usage="\
68329\`$as_me' instantiates files and other configuration actions
68330from templates according to the current configuration.  Unless the files
68331and actions are specified as TAGs, all are instantiated by default.
68332
68333Usage: $0 [OPTION]... [TAG]...
68334
68335  -h, --help       print this help, then exit
68336  -V, --version    print version number and configuration settings, then exit
68337      --config     print configuration, then exit
68338  -q, --quiet, --silent
68339                   do not print progress messages
68340  -d, --debug      don't remove temporary files
68341      --recheck    update $as_me by reconfiguring in the same conditions
68342      --file=FILE[:TEMPLATE]
68343                   instantiate the configuration file FILE
68344
68345Configuration files:
68346$config_files
68347
68348Report bugs to <build-dev@openjdk.java.net>.
68349OpenJDK home page: <http://openjdk.java.net>."
68350
68351_ACEOF
68352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68353ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68354ac_cs_version="\\
68355OpenJDK config.status jdk9
68356configured by $0, generated by GNU Autoconf 2.69,
68357  with options \\"\$ac_cs_config\\"
68358
68359Copyright (C) 2012 Free Software Foundation, Inc.
68360This config.status script is free software; the Free Software Foundation
68361gives unlimited permission to copy, distribute and modify it."
68362
68363ac_pwd='$ac_pwd'
68364srcdir='$srcdir'
68365AWK='$AWK'
68366test -n "\$AWK" || AWK=awk
68367_ACEOF
68368
68369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68370# The default lists apply if the user does not specify any file.
68371ac_need_defaults=:
68372while test $# != 0
68373do
68374  case $1 in
68375  --*=?*)
68376    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68377    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68378    ac_shift=:
68379    ;;
68380  --*=)
68381    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68382    ac_optarg=
68383    ac_shift=:
68384    ;;
68385  *)
68386    ac_option=$1
68387    ac_optarg=$2
68388    ac_shift=shift
68389    ;;
68390  esac
68391
68392  case $ac_option in
68393  # Handling of the options.
68394  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68395    ac_cs_recheck=: ;;
68396  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68397    $as_echo "$ac_cs_version"; exit ;;
68398  --config | --confi | --conf | --con | --co | --c )
68399    $as_echo "$ac_cs_config"; exit ;;
68400  --debug | --debu | --deb | --de | --d | -d )
68401    debug=: ;;
68402  --file | --fil | --fi | --f )
68403    $ac_shift
68404    case $ac_optarg in
68405    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68406    '') as_fn_error $? "missing file argument" ;;
68407    esac
68408    as_fn_append CONFIG_FILES " '$ac_optarg'"
68409    ac_need_defaults=false;;
68410  --he | --h |  --help | --hel | -h )
68411    $as_echo "$ac_cs_usage"; exit ;;
68412  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68413  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68414    ac_cs_silent=: ;;
68415
68416  # This is an error.
68417  -*) as_fn_error $? "unrecognized option: \`$1'
68418Try \`$0 --help' for more information." ;;
68419
68420  *) as_fn_append ac_config_targets " $1"
68421     ac_need_defaults=false ;;
68422
68423  esac
68424  shift
68425done
68426
68427ac_configure_extra_args=
68428
68429if $ac_cs_silent; then
68430  exec 6>/dev/null
68431  ac_configure_extra_args="$ac_configure_extra_args --silent"
68432fi
68433
68434_ACEOF
68435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68436if \$ac_cs_recheck; then
68437  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68438  shift
68439  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68440  CONFIG_SHELL='$SHELL'
68441  export CONFIG_SHELL
68442  exec "\$@"
68443fi
68444
68445_ACEOF
68446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68447exec 5>>config.log
68448{
68449  echo
68450  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68451## Running $as_me. ##
68452_ASBOX
68453  $as_echo "$ac_log"
68454} >&5
68455
68456_ACEOF
68457cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68458_ACEOF
68459
68460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68461
68462# Handling of arguments.
68463for ac_config_target in $ac_config_targets
68464do
68465  case $ac_config_target in
68466    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68467    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68468    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68469    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68470    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68471
68472  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68473  esac
68474done
68475
68476
68477# If the user did not use the arguments to specify the items to instantiate,
68478# then the envvar interface is used.  Set only those that are not.
68479# We use the long form for the default assignment because of an extremely
68480# bizarre bug on SunOS 4.1.3.
68481if $ac_need_defaults; then
68482  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68483fi
68484
68485# Have a temporary directory for convenience.  Make it in the build tree
68486# simply because there is no reason against having it here, and in addition,
68487# creating and moving files from /tmp can sometimes cause problems.
68488# Hook for its removal unless debugging.
68489# Note that there is a small window in which the directory will not be cleaned:
68490# after its creation but before its name has been assigned to `$tmp'.
68491$debug ||
68492{
68493  tmp= ac_tmp=
68494  trap 'exit_status=$?
68495  : "${ac_tmp:=$tmp}"
68496  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68497' 0
68498  trap 'as_fn_exit 1' 1 2 13 15
68499}
68500# Create a (secure) tmp directory for tmp files.
68501
68502{
68503  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68504  test -d "$tmp"
68505}  ||
68506{
68507  tmp=./conf$$-$RANDOM
68508  (umask 077 && mkdir "$tmp")
68509} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68510ac_tmp=$tmp
68511
68512# Set up the scripts for CONFIG_FILES section.
68513# No need to generate them if there are no CONFIG_FILES.
68514# This happens for instance with `./config.status config.h'.
68515if test -n "$CONFIG_FILES"; then
68516
68517
68518ac_cr=`echo X | tr X '\015'`
68519# On cygwin, bash can eat \r inside `` if the user requested igncr.
68520# But we know of no other shell where ac_cr would be empty at this
68521# point, so we can use a bashism as a fallback.
68522if test "x$ac_cr" = x; then
68523  eval ac_cr=\$\'\\r\'
68524fi
68525ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68526if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68527  ac_cs_awk_cr='\\r'
68528else
68529  ac_cs_awk_cr=$ac_cr
68530fi
68531
68532echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68533_ACEOF
68534
68535
68536{
68537  echo "cat >conf$$subs.awk <<_ACEOF" &&
68538  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68539  echo "_ACEOF"
68540} >conf$$subs.sh ||
68541  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68542ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68543ac_delim='%!_!# '
68544for ac_last_try in false false false false false :; do
68545  . ./conf$$subs.sh ||
68546    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68547
68548  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68549  if test $ac_delim_n = $ac_delim_num; then
68550    break
68551  elif $ac_last_try; then
68552    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68553  else
68554    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68555  fi
68556done
68557rm -f conf$$subs.sh
68558
68559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68560cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68561_ACEOF
68562sed -n '
68563h
68564s/^/S["/; s/!.*/"]=/
68565p
68566g
68567s/^[^!]*!//
68568:repl
68569t repl
68570s/'"$ac_delim"'$//
68571t delim
68572:nl
68573h
68574s/\(.\{148\}\)..*/\1/
68575t more1
68576s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68577p
68578n
68579b repl
68580:more1
68581s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68582p
68583g
68584s/.\{148\}//
68585t nl
68586:delim
68587h
68588s/\(.\{148\}\)..*/\1/
68589t more2
68590s/["\\]/\\&/g; s/^/"/; s/$/"/
68591p
68592b
68593:more2
68594s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68595p
68596g
68597s/.\{148\}//
68598t delim
68599' <conf$$subs.awk | sed '
68600/^[^""]/{
68601  N
68602  s/\n//
68603}
68604' >>$CONFIG_STATUS || ac_write_fail=1
68605rm -f conf$$subs.awk
68606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68607_ACAWK
68608cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68609  for (key in S) S_is_set[key] = 1
68610  FS = ""
68611
68612}
68613{
68614  line = $ 0
68615  nfields = split(line, field, "@")
68616  substed = 0
68617  len = length(field[1])
68618  for (i = 2; i < nfields; i++) {
68619    key = field[i]
68620    keylen = length(key)
68621    if (S_is_set[key]) {
68622      value = S[key]
68623      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68624      len += length(value) + length(field[++i])
68625      substed = 1
68626    } else
68627      len += 1 + keylen
68628  }
68629
68630  print line
68631}
68632
68633_ACAWK
68634_ACEOF
68635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68636if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68637  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68638else
68639  cat
68640fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68641  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68642_ACEOF
68643
68644# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68645# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68646# trailing colons and then remove the whole line if VPATH becomes empty
68647# (actually we leave an empty line to preserve line numbers).
68648if test "x$srcdir" = x.; then
68649  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68650h
68651s///
68652s/^/:/
68653s/[	 ]*$/:/
68654s/:\$(srcdir):/:/g
68655s/:\${srcdir}:/:/g
68656s/:@srcdir@:/:/g
68657s/^:*//
68658s/:*$//
68659x
68660s/\(=[	 ]*\).*/\1/
68661G
68662s/\n//
68663s/^[^=]*=[	 ]*$//
68664}'
68665fi
68666
68667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68668fi # test -n "$CONFIG_FILES"
68669
68670
68671eval set X "  :F $CONFIG_FILES      "
68672shift
68673for ac_tag
68674do
68675  case $ac_tag in
68676  :[FHLC]) ac_mode=$ac_tag; continue;;
68677  esac
68678  case $ac_mode$ac_tag in
68679  :[FHL]*:*);;
68680  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68681  :[FH]-) ac_tag=-:-;;
68682  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68683  esac
68684  ac_save_IFS=$IFS
68685  IFS=:
68686  set x $ac_tag
68687  IFS=$ac_save_IFS
68688  shift
68689  ac_file=$1
68690  shift
68691
68692  case $ac_mode in
68693  :L) ac_source=$1;;
68694  :[FH])
68695    ac_file_inputs=
68696    for ac_f
68697    do
68698      case $ac_f in
68699      -) ac_f="$ac_tmp/stdin";;
68700      *) # Look for the file first in the build tree, then in the source tree
68701	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68702	 # because $ac_f cannot contain `:'.
68703	 test -f "$ac_f" ||
68704	   case $ac_f in
68705	   [\\/$]*) false;;
68706	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68707	   esac ||
68708	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68709      esac
68710      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68711      as_fn_append ac_file_inputs " '$ac_f'"
68712    done
68713
68714    # Let's still pretend it is `configure' which instantiates (i.e., don't
68715    # use $as_me), people would be surprised to read:
68716    #    /* config.h.  Generated by config.status.  */
68717    configure_input='Generated from '`
68718	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68719	`' by configure.'
68720    if test x"$ac_file" != x-; then
68721      configure_input="$ac_file.  $configure_input"
68722      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68723$as_echo "$as_me: creating $ac_file" >&6;}
68724    fi
68725    # Neutralize special characters interpreted by sed in replacement strings.
68726    case $configure_input in #(
68727    *\&* | *\|* | *\\* )
68728       ac_sed_conf_input=`$as_echo "$configure_input" |
68729       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68730    *) ac_sed_conf_input=$configure_input;;
68731    esac
68732
68733    case $ac_tag in
68734    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68735      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68736    esac
68737    ;;
68738  esac
68739
68740  ac_dir=`$as_dirname -- "$ac_file" ||
68741$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68742	 X"$ac_file" : 'X\(//\)[^/]' \| \
68743	 X"$ac_file" : 'X\(//\)$' \| \
68744	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68745$as_echo X"$ac_file" |
68746    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68747	    s//\1/
68748	    q
68749	  }
68750	  /^X\(\/\/\)[^/].*/{
68751	    s//\1/
68752	    q
68753	  }
68754	  /^X\(\/\/\)$/{
68755	    s//\1/
68756	    q
68757	  }
68758	  /^X\(\/\).*/{
68759	    s//\1/
68760	    q
68761	  }
68762	  s/.*/./; q'`
68763  as_dir="$ac_dir"; as_fn_mkdir_p
68764  ac_builddir=.
68765
68766case "$ac_dir" in
68767.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68768*)
68769  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68770  # A ".." for each directory in $ac_dir_suffix.
68771  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68772  case $ac_top_builddir_sub in
68773  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68774  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68775  esac ;;
68776esac
68777ac_abs_top_builddir=$ac_pwd
68778ac_abs_builddir=$ac_pwd$ac_dir_suffix
68779# for backward compatibility:
68780ac_top_builddir=$ac_top_build_prefix
68781
68782case $srcdir in
68783  .)  # We are building in place.
68784    ac_srcdir=.
68785    ac_top_srcdir=$ac_top_builddir_sub
68786    ac_abs_top_srcdir=$ac_pwd ;;
68787  [\\/]* | ?:[\\/]* )  # Absolute name.
68788    ac_srcdir=$srcdir$ac_dir_suffix;
68789    ac_top_srcdir=$srcdir
68790    ac_abs_top_srcdir=$srcdir ;;
68791  *) # Relative name.
68792    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68793    ac_top_srcdir=$ac_top_build_prefix$srcdir
68794    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68795esac
68796ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68797
68798
68799  case $ac_mode in
68800  :F)
68801  #
68802  # CONFIG_FILE
68803  #
68804
68805_ACEOF
68806
68807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68808# If the template does not know about datarootdir, expand it.
68809# FIXME: This hack should be removed a few years after 2.60.
68810ac_datarootdir_hack=; ac_datarootdir_seen=
68811ac_sed_dataroot='
68812/datarootdir/ {
68813  p
68814  q
68815}
68816/@datadir@/p
68817/@docdir@/p
68818/@infodir@/p
68819/@localedir@/p
68820/@mandir@/p'
68821case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68822*datarootdir*) ac_datarootdir_seen=yes;;
68823*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68824  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68825$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68826_ACEOF
68827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68828  ac_datarootdir_hack='
68829  s&@datadir@&$datadir&g
68830  s&@docdir@&$docdir&g
68831  s&@infodir@&$infodir&g
68832  s&@localedir@&$localedir&g
68833  s&@mandir@&$mandir&g
68834  s&\\\${datarootdir}&$datarootdir&g' ;;
68835esac
68836_ACEOF
68837
68838# Neutralize VPATH when `$srcdir' = `.'.
68839# Shell code in configure.ac might set extrasub.
68840# FIXME: do we really want to maintain this feature?
68841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68842ac_sed_extra="$ac_vpsub
68843$extrasub
68844_ACEOF
68845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68846:t
68847/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68848s|@configure_input@|$ac_sed_conf_input|;t t
68849s&@top_builddir@&$ac_top_builddir_sub&;t t
68850s&@top_build_prefix@&$ac_top_build_prefix&;t t
68851s&@srcdir@&$ac_srcdir&;t t
68852s&@abs_srcdir@&$ac_abs_srcdir&;t t
68853s&@top_srcdir@&$ac_top_srcdir&;t t
68854s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68855s&@builddir@&$ac_builddir&;t t
68856s&@abs_builddir@&$ac_abs_builddir&;t t
68857s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68858$ac_datarootdir_hack
68859"
68860eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68861  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68862
68863test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68864  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68865  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68866      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68867  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68868which seems to be undefined.  Please make sure it is defined" >&5
68869$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68870which seems to be undefined.  Please make sure it is defined" >&2;}
68871
68872  rm -f "$ac_tmp/stdin"
68873  case $ac_file in
68874  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68875  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68876  esac \
68877  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68878 ;;
68879
68880
68881
68882  esac
68883
68884done # for ac_tag
68885
68886
68887as_fn_exit 0
68888_ACEOF
68889ac_clean_files=$ac_clean_files_save
68890
68891test $ac_write_fail = 0 ||
68892  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68893
68894
68895# configure is writing to config.log, and then calls config.status.
68896# config.status does its own redirection, appending to config.log.
68897# Unfortunately, on DOS this fails, as config.log is still kept open
68898# by configure, so config.status won't be able to write to it; its
68899# output is simply discarded.  So we exec the FD to /dev/null,
68900# effectively closing config.log, so it can be properly (re)opened and
68901# appended to by config.status.  When coming back to configure, we
68902# need to make the FD available again.
68903if test "$no_create" != yes; then
68904  ac_cs_success=:
68905  ac_config_status_args=
68906  test "$silent" = yes &&
68907    ac_config_status_args="$ac_config_status_args --quiet"
68908  exec 5>/dev/null
68909  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68910  exec 5>>config.log
68911  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68912  # would make configure fail if this is the last instruction.
68913  $ac_cs_success || as_fn_exit 1
68914fi
68915if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68916  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68917$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68918fi
68919
68920
68921# After AC_OUTPUT, we need to do final work
68922
68923
68924  # Try to move config.log (generated by autoconf) to the configure-support directory.
68925  if test -e ./config.log; then
68926    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68927  fi
68928
68929  # Rotate our log file (configure.log)
68930  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68931    $RM -f "$OUTPUT_ROOT/configure.log.old"
68932  fi
68933  if test -e "$OUTPUT_ROOT/configure.log"; then
68934    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68935  fi
68936
68937  # Move configure.log from current directory to the build output root
68938  if test -e ./configure.log; then
68939    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68940  fi
68941
68942  # Make the compare script executable
68943  $CHMOD +x $OUTPUT_ROOT/compare.sh
68944
68945
68946# Finally output some useful information to the user
68947
68948  # Finally output some useful information to the user
68949
68950  printf "\n"
68951  printf "====================================================\n"
68952  if test "x$no_create" != "xyes"; then
68953    if test "x$IS_RECONFIGURE" != "xyes"; then
68954      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68955    else
68956      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68957    fi
68958  else
68959    if test "x$IS_RECONFIGURE" != "xyes"; then
68960      printf "A configuration has been successfully checked but not created\n"
68961    else
68962      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68963    fi
68964  fi
68965  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68966    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68967  else
68968    printf "using default settings.\n"
68969  fi
68970
68971  printf "\n"
68972  printf "Configuration summary:\n"
68973  printf "* Debug level:    $DEBUG_LEVEL\n"
68974  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68975  printf "* JDK variant:    $JDK_VARIANT\n"
68976  printf "* JVM variants:   $JVM_VARIANTS\n"
68977  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68978  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68979
68980  printf "\n"
68981  printf "Tools summary:\n"
68982  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68983    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68984  fi
68985  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68986  if test "x$TOOLCHAIN_VERSION" != "x"; then
68987    print_version=" $TOOLCHAIN_VERSION"
68988  fi
68989  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68990  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68991  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68992
68993  printf "\n"
68994  printf "Build performance summary:\n"
68995  printf "* Cores to use:   $JOBS\n"
68996  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68997  if test "x$CCACHE_STATUS" != "x"; then
68998    printf "* ccache status:  $CCACHE_STATUS\n"
68999  fi
69000  printf "\n"
69001
69002  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
69003    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
69004    printf "will result in longer build times.\n"
69005    printf "\n"
69006  fi
69007
69008  if test "x$FOUND_ALT_VARIABLES" != "x"; then
69009    printf "WARNING: You have old-style ALT_ environment variables set.\n"
69010    printf "These are not respected, and will be ignored. It is recommended\n"
69011    printf "that you clean your environment. The following variables are set:\n"
69012    printf "$FOUND_ALT_VARIABLES\n"
69013    printf "\n"
69014  fi
69015
69016  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
69017    printf "WARNING: Your build output directory is not on a local disk.\n"
69018    printf "This will severely degrade build performance!\n"
69019    printf "It is recommended that you create an output directory on a local disk,\n"
69020    printf "and run the configure script again from that directory.\n"
69021    printf "\n"
69022  fi
69023
69024  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
69025    printf "WARNING: The result of this configuration has overridden an older\n"
69026    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
69027    printf "proper build. Failure to do so might result in strange build problems.\n"
69028    printf "\n"
69029  fi
69030
69031  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
69032    printf "WARNING: The result of this configuration was not saved.\n"
69033    printf "You should run without '--no-create | -n' to create the configuration.\n"
69034    printf "\n"
69035  fi
69036
69037
69038
69039  # Locate config.log.
69040  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69041    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69042  elif test -e "./config.log"; then
69043    CONFIG_LOG_PATH="."
69044  fi
69045
69046  if test -e "$CONFIG_LOG_PATH/config.log"; then
69047    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69048    if test $? -eq 0; then
69049      printf "The following warnings were produced. Repeated here for convenience:\n"
69050      # We must quote sed expression (using []) to stop m4 from eating the [].
69051      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69052      printf "\n"
69053    fi
69054  fi
69055
69056