generated-configure.sh revision 1521:569bf5f6cf52
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
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873MAKE
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878PKGHANDLER
879CONFIGURESUPPORT_OUTPUTDIR
880OUTPUT_ROOT
881CONF_NAME
882SPEC
883SDKROOT
884XCODEBUILD
885BUILD_VARIANT_RELEASE
886DEBUG_CLASSFILES
887FASTDEBUG
888VARIANT
889DEBUG_LEVEL
890MACOSX_UNIVERSAL
891INCLUDE_SA
892JVM_VARIANT_CORE
893JVM_VARIANT_ZEROSHARK
894JVM_VARIANT_ZERO
895JVM_VARIANT_KERNEL
896JVM_VARIANT_MINIMAL1
897JVM_VARIANT_CLIENT
898JVM_VARIANT_SERVER
899JVM_VARIANTS
900JVM_INTERPRETER
901JDK_VARIANT
902SET_OPENJDK
903CANONICAL_TOPDIR
904ORIGINAL_TOPDIR
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_TYPE
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_TYPE
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948CPIO
949SETFILE
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995ORIGINAL_PATH
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063enable_rmiconnector_iiop
1064with_milestone
1065with_update_version
1066with_user_release_suffix
1067with_build_number
1068with_copyright_year
1069with_boot_jdk
1070with_add_source_root
1071with_override_source_root
1072with_adds_and_overrides
1073with_override_langtools
1074with_override_corba
1075with_override_jaxp
1076with_override_jaxws
1077with_override_hotspot
1078with_override_nashorn
1079with_override_jdk
1080with_import_hotspot
1081with_toolchain_type
1082with_toolchain_version
1083with_jtreg
1084with_extra_cflags
1085with_extra_cxxflags
1086with_extra_ldflags
1087enable_warnings_as_errors
1088enable_debug_symbols
1089enable_zip_debug_info
1090enable_native_coverage
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libjpeg
1103with_giflib
1104with_lcms
1105with_libpng
1106with_zlib
1107with_stdc__lib
1108with_msvcr_dll
1109with_msvcp_dll
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_precompiled_headers
1120enable_ccache
1121with_ccache_dir
1122'
1123      ac_precious_vars='build_alias
1124host_alias
1125target_alias
1126BASENAME
1127BASH
1128CAT
1129CHMOD
1130CMP
1131COMM
1132CP
1133CUT
1134DATE
1135DIFF
1136DIRNAME
1137ECHO
1138EXPR
1139FILE
1140FIND
1141HEAD
1142LN
1143LS
1144MKDIR
1145MKTEMP
1146MV
1147NAWK
1148PRINTF
1149RM
1150SH
1151SORT
1152TAIL
1153TAR
1154TEE
1155TOUCH
1156TR
1157UNAME
1158UNIQ
1159WC
1160WHICH
1161XARGS
1162AWK
1163GREP
1164EGREP
1165FGREP
1166SED
1167CYGPATH
1168READLINK
1169DF
1170SETFILE
1171CPIO
1172UNZIP
1173ZIP
1174LDD
1175OTOOL
1176READELF
1177HG
1178STAT
1179TIME
1180DSYMUTIL
1181XATTR
1182CODESIGN
1183PKG_CONFIG
1184JAVA
1185JAVAC
1186JAVAH
1187JAR
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201LIPO
1202STRIP
1203NM
1204GNM
1205OBJCOPY
1206OBJDUMP
1207BUILD_CC
1208BUILD_CXX
1209BUILD_LD
1210JTREGEXE
1211XMKMF
1212FREETYPE_CFLAGS
1213FREETYPE_LIBS
1214ALSA_CFLAGS
1215ALSA_LIBS
1216LCMS_CFLAGS
1217LCMS_LIBS
1218PNG_CFLAGS
1219PNG_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222CCACHE'
1223
1224
1225# Initialize some variables set by options.
1226ac_init_help=
1227ac_init_version=false
1228ac_unrecognized_opts=
1229ac_unrecognized_sep=
1230# The variables have the same names as the options, with
1231# dashes changed to underlines.
1232cache_file=/dev/null
1233exec_prefix=NONE
1234no_create=
1235no_recursion=
1236prefix=NONE
1237program_prefix=NONE
1238program_suffix=NONE
1239program_transform_name=s,x,x,
1240silent=
1241site=
1242srcdir=
1243verbose=
1244x_includes=NONE
1245x_libraries=NONE
1246
1247# Installation directory options.
1248# These are left unexpanded so users can "make install exec_prefix=/foo"
1249# and all the variables that are supposed to be based on exec_prefix
1250# by default will actually change.
1251# Use braces instead of parens because sh, perl, etc. also accept them.
1252# (The list follows the same order as the GNU Coding Standards.)
1253bindir='${exec_prefix}/bin'
1254sbindir='${exec_prefix}/sbin'
1255libexecdir='${exec_prefix}/libexec'
1256datarootdir='${prefix}/share'
1257datadir='${datarootdir}'
1258sysconfdir='${prefix}/etc'
1259sharedstatedir='${prefix}/com'
1260localstatedir='${prefix}/var'
1261includedir='${prefix}/include'
1262oldincludedir='/usr/include'
1263docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264infodir='${datarootdir}/info'
1265htmldir='${docdir}'
1266dvidir='${docdir}'
1267pdfdir='${docdir}'
1268psdir='${docdir}'
1269libdir='${exec_prefix}/lib'
1270localedir='${datarootdir}/locale'
1271mandir='${datarootdir}/man'
1272
1273ac_prev=
1274ac_dashdash=
1275for ac_option
1276do
1277  # If the previous option needs an argument, assign it.
1278  if test -n "$ac_prev"; then
1279    eval $ac_prev=\$ac_option
1280    ac_prev=
1281    continue
1282  fi
1283
1284  case $ac_option in
1285  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286  *=)   ac_optarg= ;;
1287  *)    ac_optarg=yes ;;
1288  esac
1289
1290  # Accept the important Cygnus configure options, so we can diagnose typos.
1291
1292  case $ac_dashdash$ac_option in
1293  --)
1294    ac_dashdash=yes ;;
1295
1296  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297    ac_prev=bindir ;;
1298  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299    bindir=$ac_optarg ;;
1300
1301  -build | --build | --buil | --bui | --bu)
1302    ac_prev=build_alias ;;
1303  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304    build_alias=$ac_optarg ;;
1305
1306  -cache-file | --cache-file | --cache-fil | --cache-fi \
1307  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308    ac_prev=cache_file ;;
1309  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311    cache_file=$ac_optarg ;;
1312
1313  --config-cache | -C)
1314    cache_file=config.cache ;;
1315
1316  -datadir | --datadir | --datadi | --datad)
1317    ac_prev=datadir ;;
1318  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319    datadir=$ac_optarg ;;
1320
1321  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322  | --dataroo | --dataro | --datar)
1323    ac_prev=datarootdir ;;
1324  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326    datarootdir=$ac_optarg ;;
1327
1328  -disable-* | --disable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=no ;;
1343
1344  -docdir | --docdir | --docdi | --doc | --do)
1345    ac_prev=docdir ;;
1346  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347    docdir=$ac_optarg ;;
1348
1349  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350    ac_prev=dvidir ;;
1351  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352    dvidir=$ac_optarg ;;
1353
1354  -enable-* | --enable-*)
1355    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356    # Reject names that are not valid shell variable names.
1357    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358      as_fn_error $? "invalid feature name: $ac_useropt"
1359    ac_useropt_orig=$ac_useropt
1360    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361    case $ac_user_opts in
1362      *"
1363"enable_$ac_useropt"
1364"*) ;;
1365      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366	 ac_unrecognized_sep=', ';;
1367    esac
1368    eval enable_$ac_useropt=\$ac_optarg ;;
1369
1370  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372  | --exec | --exe | --ex)
1373    ac_prev=exec_prefix ;;
1374  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376  | --exec=* | --exe=* | --ex=*)
1377    exec_prefix=$ac_optarg ;;
1378
1379  -gas | --gas | --ga | --g)
1380    # Obsolete; use --with-gas.
1381    with_gas=yes ;;
1382
1383  -help | --help | --hel | --he | -h)
1384    ac_init_help=long ;;
1385  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386    ac_init_help=recursive ;;
1387  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388    ac_init_help=short ;;
1389
1390  -host | --host | --hos | --ho)
1391    ac_prev=host_alias ;;
1392  -host=* | --host=* | --hos=* | --ho=*)
1393    host_alias=$ac_optarg ;;
1394
1395  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396    ac_prev=htmldir ;;
1397  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398  | --ht=*)
1399    htmldir=$ac_optarg ;;
1400
1401  -includedir | --includedir | --includedi | --included | --include \
1402  | --includ | --inclu | --incl | --inc)
1403    ac_prev=includedir ;;
1404  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405  | --includ=* | --inclu=* | --incl=* | --inc=*)
1406    includedir=$ac_optarg ;;
1407
1408  -infodir | --infodir | --infodi | --infod | --info | --inf)
1409    ac_prev=infodir ;;
1410  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411    infodir=$ac_optarg ;;
1412
1413  -libdir | --libdir | --libdi | --libd)
1414    ac_prev=libdir ;;
1415  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416    libdir=$ac_optarg ;;
1417
1418  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419  | --libexe | --libex | --libe)
1420    ac_prev=libexecdir ;;
1421  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422  | --libexe=* | --libex=* | --libe=*)
1423    libexecdir=$ac_optarg ;;
1424
1425  -localedir | --localedir | --localedi | --localed | --locale)
1426    ac_prev=localedir ;;
1427  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428    localedir=$ac_optarg ;;
1429
1430  -localstatedir | --localstatedir | --localstatedi | --localstated \
1431  | --localstate | --localstat | --localsta | --localst | --locals)
1432    ac_prev=localstatedir ;;
1433  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435    localstatedir=$ac_optarg ;;
1436
1437  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438    ac_prev=mandir ;;
1439  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440    mandir=$ac_optarg ;;
1441
1442  -nfp | --nfp | --nf)
1443    # Obsolete; use --without-fp.
1444    with_fp=no ;;
1445
1446  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447  | --no-cr | --no-c | -n)
1448    no_create=yes ;;
1449
1450  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452    no_recursion=yes ;;
1453
1454  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456  | --oldin | --oldi | --old | --ol | --o)
1457    ac_prev=oldincludedir ;;
1458  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461    oldincludedir=$ac_optarg ;;
1462
1463  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464    ac_prev=prefix ;;
1465  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466    prefix=$ac_optarg ;;
1467
1468  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469  | --program-pre | --program-pr | --program-p)
1470    ac_prev=program_prefix ;;
1471  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473    program_prefix=$ac_optarg ;;
1474
1475  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476  | --program-suf | --program-su | --program-s)
1477    ac_prev=program_suffix ;;
1478  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480    program_suffix=$ac_optarg ;;
1481
1482  -program-transform-name | --program-transform-name \
1483  | --program-transform-nam | --program-transform-na \
1484  | --program-transform-n | --program-transform- \
1485  | --program-transform | --program-transfor \
1486  | --program-transfo | --program-transf \
1487  | --program-trans | --program-tran \
1488  | --progr-tra | --program-tr | --program-t)
1489    ac_prev=program_transform_name ;;
1490  -program-transform-name=* | --program-transform-name=* \
1491  | --program-transform-nam=* | --program-transform-na=* \
1492  | --program-transform-n=* | --program-transform-=* \
1493  | --program-transform=* | --program-transfor=* \
1494  | --program-transfo=* | --program-transf=* \
1495  | --program-trans=* | --program-tran=* \
1496  | --progr-tra=* | --program-tr=* | --program-t=*)
1497    program_transform_name=$ac_optarg ;;
1498
1499  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500    ac_prev=pdfdir ;;
1501  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502    pdfdir=$ac_optarg ;;
1503
1504  -psdir | --psdir | --psdi | --psd | --ps)
1505    ac_prev=psdir ;;
1506  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507    psdir=$ac_optarg ;;
1508
1509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510  | -silent | --silent | --silen | --sile | --sil)
1511    silent=yes ;;
1512
1513  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514    ac_prev=sbindir ;;
1515  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516  | --sbi=* | --sb=*)
1517    sbindir=$ac_optarg ;;
1518
1519  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521  | --sharedst | --shareds | --shared | --share | --shar \
1522  | --sha | --sh)
1523    ac_prev=sharedstatedir ;;
1524  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527  | --sha=* | --sh=*)
1528    sharedstatedir=$ac_optarg ;;
1529
1530  -site | --site | --sit)
1531    ac_prev=site ;;
1532  -site=* | --site=* | --sit=*)
1533    site=$ac_optarg ;;
1534
1535  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536    ac_prev=srcdir ;;
1537  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538    srcdir=$ac_optarg ;;
1539
1540  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541  | --syscon | --sysco | --sysc | --sys | --sy)
1542    ac_prev=sysconfdir ;;
1543  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545    sysconfdir=$ac_optarg ;;
1546
1547  -target | --target | --targe | --targ | --tar | --ta | --t)
1548    ac_prev=target_alias ;;
1549  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550    target_alias=$ac_optarg ;;
1551
1552  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553    verbose=yes ;;
1554
1555  -version | --version | --versio | --versi | --vers | -V)
1556    ac_init_version=: ;;
1557
1558  -with-* | --with-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=\$ac_optarg ;;
1573
1574  -without-* | --without-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=no ;;
1589
1590  --x)
1591    # Obsolete; use --with-x.
1592    with_x=yes ;;
1593
1594  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595  | --x-incl | --x-inc | --x-in | --x-i)
1596    ac_prev=x_includes ;;
1597  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599    x_includes=$ac_optarg ;;
1600
1601  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603    ac_prev=x_libraries ;;
1604  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606    x_libraries=$ac_optarg ;;
1607
1608  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609Try \`$0 --help' for more information"
1610    ;;
1611
1612  *=*)
1613    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614    # Reject names that are not valid shell variable names.
1615    case $ac_envvar in #(
1616      '' | [0-9]* | *[!_$as_cr_alnum]* )
1617      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618    esac
1619    eval $ac_envvar=\$ac_optarg
1620    export $ac_envvar ;;
1621
1622  *)
1623    # FIXME: should be removed in autoconf 3.0.
1624    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628    ;;
1629
1630  esac
1631done
1632
1633if test -n "$ac_prev"; then
1634  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635  as_fn_error $? "missing argument to $ac_option"
1636fi
1637
1638if test -n "$ac_unrecognized_opts"; then
1639  case $enable_option_checking in
1640    no) ;;
1641    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643  esac
1644fi
1645
1646# Check all directory arguments for consistency.
1647for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648		datadir sysconfdir sharedstatedir localstatedir includedir \
1649		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650		libdir localedir mandir
1651do
1652  eval ac_val=\$$ac_var
1653  # Remove trailing slashes.
1654  case $ac_val in
1655    */ )
1656      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657      eval $ac_var=\$ac_val;;
1658  esac
1659  # Be sure to have absolute directory names.
1660  case $ac_val in
1661    [\\/$]* | ?:[\\/]* )  continue;;
1662    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663  esac
1664  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665done
1666
1667# There might be people who depend on the old broken behavior: `$host'
1668# used to hold the argument of --host etc.
1669# FIXME: To remove some day.
1670build=$build_alias
1671host=$host_alias
1672target=$target_alias
1673
1674# FIXME: To remove some day.
1675if test "x$host_alias" != x; then
1676  if test "x$build_alias" = x; then
1677    cross_compiling=maybe
1678  elif test "x$build_alias" != "x$host_alias"; then
1679    cross_compiling=yes
1680  fi
1681fi
1682
1683ac_tool_prefix=
1684test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685
1686test "$silent" = yes && exec 6>/dev/null
1687
1688
1689ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690ac_ls_di=`ls -di .` &&
1691ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692  as_fn_error $? "working directory cannot be determined"
1693test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694  as_fn_error $? "pwd does not report name of working directory"
1695
1696
1697# Find the source files, if location was not specified.
1698if test -z "$srcdir"; then
1699  ac_srcdir_defaulted=yes
1700  # Try the directory containing this script, then the parent directory.
1701  ac_confdir=`$as_dirname -- "$as_myself" ||
1702$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703	 X"$as_myself" : 'X\(//\)[^/]' \| \
1704	 X"$as_myself" : 'X\(//\)$' \| \
1705	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706$as_echo X"$as_myself" |
1707    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)[^/].*/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\).*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  s/.*/./; q'`
1724  srcdir=$ac_confdir
1725  if test ! -r "$srcdir/$ac_unique_file"; then
1726    srcdir=..
1727  fi
1728else
1729  ac_srcdir_defaulted=no
1730fi
1731if test ! -r "$srcdir/$ac_unique_file"; then
1732  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734fi
1735ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736ac_abs_confdir=`(
1737	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738	pwd)`
1739# When building in place, set srcdir=.
1740if test "$ac_abs_confdir" = "$ac_pwd"; then
1741  srcdir=.
1742fi
1743# Remove unnecessary trailing slashes from srcdir.
1744# Double slashes in file names in object file debugging info
1745# mess up M-x gdb in Emacs.
1746case $srcdir in
1747*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748esac
1749for ac_var in $ac_precious_vars; do
1750  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_env_${ac_var}_value=\$${ac_var}
1752  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754done
1755
1756#
1757# Report the --help message.
1758#
1759if test "$ac_init_help" = "long"; then
1760  # Omit some internal or obsolete options to make the list less imposing.
1761  # This message is too long to be a string in the A/UX 3.1 sh.
1762  cat <<_ACEOF
1763\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764
1765Usage: $0 [OPTION]... [VAR=VALUE]...
1766
1767To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768VAR=VALUE.  See below for descriptions of some of the useful variables.
1769
1770Defaults for the options are specified in brackets.
1771
1772Configuration:
1773  -h, --help              display this help and exit
1774      --help=short        display options specific to this package
1775      --help=recursive    display the short help of all the included packages
1776  -V, --version           display version information and exit
1777  -q, --quiet, --silent   do not print \`checking ...' messages
1778      --cache-file=FILE   cache test results in FILE [disabled]
1779  -C, --config-cache      alias for \`--cache-file=config.cache'
1780  -n, --no-create         do not create output files
1781      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782
1783Installation directories:
1784  --prefix=PREFIX         install architecture-independent files in PREFIX
1785                          [$ac_default_prefix]
1786  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                          [PREFIX]
1788
1789By default, \`make install' will install all the files in
1790\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792for instance \`--prefix=\$HOME'.
1793
1794For better control, use the options below.
1795
1796Fine tuning of the installation directories:
1797  --bindir=DIR            user executables [EPREFIX/bin]
1798  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799  --libexecdir=DIR        program executables [EPREFIX/libexec]
1800  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803  --libdir=DIR            object code libraries [EPREFIX/lib]
1804  --includedir=DIR        C header files [PREFIX/include]
1805  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808  --infodir=DIR           info documentation [DATAROOTDIR/info]
1809  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810  --mandir=DIR            man documentation [DATAROOTDIR/man]
1811  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812  --htmldir=DIR           html documentation [DOCDIR]
1813  --dvidir=DIR            dvi documentation [DOCDIR]
1814  --pdfdir=DIR            pdf documentation [DOCDIR]
1815  --psdir=DIR             ps documentation [DOCDIR]
1816_ACEOF
1817
1818  cat <<\_ACEOF
1819
1820X features:
1821  --x-includes=DIR    X include files are in DIR
1822  --x-libraries=DIR   X library files are in DIR
1823
1824System types:
1825  --build=BUILD     configure for building on BUILD [guessed]
1826  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827  --target=TARGET   configure for building compilers for TARGET [HOST]
1828_ACEOF
1829fi
1830
1831if test -n "$ac_init_help"; then
1832  case $ac_init_help in
1833     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834   esac
1835  cat <<\_ACEOF
1836
1837Optional Features:
1838  --disable-option-checking  ignore unrecognized --enable/--with options
1839  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841  --enable-openjdk-only   suppress building custom source even if present
1842                          [disabled]
1843  --enable-debug          set the debug level to fastdebug (shorthand for
1844                          --with-debug-level=fastdebug) [disabled]
1845  --disable-headful       disable building headful support (graphical UI
1846                          support) [enabled]
1847  --enable-hotspot-test-in-build
1848                          run the Queens test after Hotspot build [disabled]
1849  --enable-unlimited-crypto
1850                          Enable unlimited crypto policy [disabled]
1851  --enable-rmiconnector-iiop
1852                          enable the JMX RMIConnector iiop transport
1853                          [disabled]
1854  --disable-warnings-as-errors
1855                          do not consider native warnings to be an error
1856                          [enabled]
1857  --disable-debug-symbols disable generation of debug symbols [enabled]
1858  --disable-zip-debug-info
1859                          disable zipping of debug-info files [enabled]
1860  --enable-native-coverage
1861                          enable native compilation with code coverage
1862                          data[disabled]
1863  --disable-freetype-bundling
1864                          disable bundling of the freetype library with the
1865                          build result [enabled on Windows or when using
1866                          --with-freetype, disabled otherwise]
1867  --enable-sjavac         use sjavac to do fast incremental compiles
1868                          [disabled]
1869  --disable-precompiled-headers
1870                          disable using precompiled headers when compiling C++
1871                          [enabled]
1872  --enable-ccache         enable using ccache to speed up recompilations
1873                          [disabled]
1874
1875Optional Packages:
1876  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1877  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1878  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1879                          support it), e.g. --with-target-bits=32 [guessed]
1880  --with-custom-make-dir  Deprecated. Option is kept for backwards
1881                          compatibility and is ignored
1882  --with-jdk-variant      JDK variant to build (normal) [normal]
1883  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1884  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1885                          client, minimal1, kernel, zero, zeroshark, core)
1886                          [server]
1887  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1888                          optimized (HotSpot build only)) [release]
1889  --with-devkit           use this devkit for compilers, tools and resources
1890  --with-sys-root         alias for --with-sysroot for backwards compatability
1891  --with-sysroot          use this directory as sysroot
1892  --with-tools-dir        alias for --with-toolchain-path for backwards
1893                          compatibility
1894  --with-toolchain-path   prepend these directories when searching for
1895                          toolchain binaries (compilers etc)
1896  --with-extra-path       prepend these directories to the default path
1897  --with-sdk-name         use the platform SDK of the given name. [macosx]
1898  --with-conf-name        use this as the name of the configuration [generated
1899                          from important configuration options]
1900  --with-output-sync      set make output sync type if supported by make.
1901                          [recurse]
1902  --with-builddeps-conf   use this configuration file for the builddeps
1903  --with-builddeps-server download and use build dependencies from this server
1904                          url
1905  --with-builddeps-dir    store downloaded build dependencies here
1906                          [/localhome/builddeps]
1907  --with-builddeps-group  chgrp the downloaded build dependencies to this
1908                          group
1909  --with-cacerts-file     specify alternative cacerts file
1910  --with-milestone        Set milestone value for build [internal]
1911  --with-update-version   Set update version value for build [b00]
1912  --with-user-release-suffix
1913                          Add a custom string to the version string if build
1914                          number is not set.[username_builddateb00]
1915  --with-build-number     Set build number value for build [b00]
1916  --with-copyright-year   Set copyright year value for build [current year]
1917  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1918  --with-add-source-root  for each and every source directory, look in this
1919                          additional source root for the same directory; if it
1920                          exists and have files in it, include it in the build
1921  --with-override-source-root
1922                          for each and every source directory, look in this
1923                          override source root for the same directory; if it
1924                          exists, use that directory instead and ignore the
1925                          directory in the original source root
1926  --with-adds-and-overrides
1927                          use the subdirs 'adds' and 'overrides' in the
1928                          specified directory as add-source-root and
1929                          override-source-root
1930  --with-override-langtools
1931                          use this langtools dir for the build
1932  --with-override-corba   use this corba dir for the build
1933  --with-override-jaxp    use this jaxp dir for the build
1934  --with-override-jaxws   use this jaxws dir for the build
1935  --with-override-hotspot use this hotspot dir for the build
1936  --with-override-nashorn use this nashorn dir for the build
1937  --with-override-jdk     use this jdk dir for the build
1938  --with-import-hotspot   import hotspot binaries from this jdk image or
1939                          hotspot build dist dir instead of building from
1940                          source
1941  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1942                          to show possible values [platform dependent]
1943  --with-toolchain-version
1944                          the version of the toolchain to look for, use
1945                          '--help' to show possible values [platform
1946                          dependent]
1947  --with-jtreg            Regression Test Harness [probed]
1948  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1949  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1950  --with-extra-ldflags    extra flags to be used when linking jdk
1951  --with-x                use the X Window System
1952  --with-cups             specify prefix directory for the cups package
1953                          (expecting the headers under PATH/include)
1954  --with-cups-include     specify directory for the cups include files
1955  --with-freetype         specify prefix directory for the freetype package
1956                          (expecting the libraries under PATH/lib and the
1957                          headers under PATH/include)
1958  --with-freetype-include specify directory for the freetype include files
1959  --with-freetype-lib     specify directory for the freetype library
1960  --with-freetype-src     specify directory with freetype sources to
1961                          automatically build the library (experimental,
1962                          Windows-only)
1963  --with-alsa             specify prefix directory for the alsa package
1964                          (expecting the libraries under PATH/lib and the
1965                          headers under PATH/include)
1966  --with-alsa-include     specify directory for the alsa include files
1967  --with-alsa-lib         specify directory for the alsa library
1968  --with-libjpeg          use libjpeg from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-giflib           use giflib from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-lcms             use lcms2 from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-libpng           use libpng from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-zlib             use zlib from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-stdc++lib=<static>,<dynamic>,<default>
1979                          force linking of the C++ runtime on Linux to either
1980                          static or dynamic, default is static with dynamic as
1981                          fallback
1982  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1983                          (Windows only) [probed]
1984  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1985                          (Windows only) [probed]
1986  --with-dxsdk            Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-include    Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-num-cores        number of cores in the build system, e.g.
1993                          --with-num-cores=8 [probed]
1994  --with-memory-size      memory (in MB) available in the build system, e.g.
1995                          --with-memory-size=1024 [probed]
1996  --with-jobs             number of parallel jobs to let make run [calculated
1997                          based on cores and memory]
1998  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1999                          invocations of boot JDK, overriding the default
2000                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2001                          -enableassertions"
2002  --with-sjavac-server-java
2003                          use this java binary for running the sjavac
2004                          background server [Boot JDK java]
2005  --with-ccache-dir       where to store ccache files [~/.ccache]
2006
2007Some influential environment variables:
2008  BASENAME    Override default value for BASENAME
2009  BASH        Override default value for BASH
2010  CAT         Override default value for CAT
2011  CHMOD       Override default value for CHMOD
2012  CMP         Override default value for CMP
2013  COMM        Override default value for COMM
2014  CP          Override default value for CP
2015  CUT         Override default value for CUT
2016  DATE        Override default value for DATE
2017  DIFF        Override default value for DIFF
2018  DIRNAME     Override default value for DIRNAME
2019  ECHO        Override default value for ECHO
2020  EXPR        Override default value for EXPR
2021  FILE        Override default value for FILE
2022  FIND        Override default value for FIND
2023  HEAD        Override default value for HEAD
2024  LN          Override default value for LN
2025  LS          Override default value for LS
2026  MKDIR       Override default value for MKDIR
2027  MKTEMP      Override default value for MKTEMP
2028  MV          Override default value for MV
2029  NAWK        Override default value for NAWK
2030  PRINTF      Override default value for PRINTF
2031  RM          Override default value for RM
2032  SH          Override default value for SH
2033  SORT        Override default value for SORT
2034  TAIL        Override default value for TAIL
2035  TAR         Override default value for TAR
2036  TEE         Override default value for TEE
2037  TOUCH       Override default value for TOUCH
2038  TR          Override default value for TR
2039  UNAME       Override default value for UNAME
2040  UNIQ        Override default value for UNIQ
2041  WC          Override default value for WC
2042  WHICH       Override default value for WHICH
2043  XARGS       Override default value for XARGS
2044  AWK         Override default value for AWK
2045  GREP        Override default value for GREP
2046  EGREP       Override default value for EGREP
2047  FGREP       Override default value for FGREP
2048  SED         Override default value for SED
2049  CYGPATH     Override default value for CYGPATH
2050  READLINK    Override default value for READLINK
2051  DF          Override default value for DF
2052  SETFILE     Override default value for SETFILE
2053  CPIO        Override default value for CPIO
2054  UNZIP       Override default value for UNZIP
2055  ZIP         Override default value for ZIP
2056  LDD         Override default value for LDD
2057  OTOOL       Override default value for OTOOL
2058  READELF     Override default value for READELF
2059  HG          Override default value for HG
2060  STAT        Override default value for STAT
2061  TIME        Override default value for TIME
2062  DSYMUTIL    Override default value for DSYMUTIL
2063  XATTR       Override default value for XATTR
2064  CODESIGN    Override default value for CODESIGN
2065  PKG_CONFIG  path to pkg-config utility
2066  JAVA        Override default value for JAVA
2067  JAVAC       Override default value for JAVAC
2068  JAVAH       Override default value for JAVAH
2069  JAR         Override default value for JAR
2070  JARSIGNER   Override default value for JARSIGNER
2071  CC          C compiler command
2072  CFLAGS      C compiler flags
2073  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2074              nonstandard directory <lib dir>
2075  LIBS        libraries to pass to the linker, e.g. -l<library>
2076  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2077              you have headers in a nonstandard directory <include dir>
2078  CXX         C++ compiler command
2079  CXXFLAGS    C++ compiler flags
2080  CPP         C preprocessor
2081  CXXCPP      C++ preprocessor
2082  AS          Override default value for AS
2083  AR          Override default value for AR
2084  LIPO        Override default value for LIPO
2085  STRIP       Override default value for STRIP
2086  NM          Override default value for NM
2087  GNM         Override default value for GNM
2088  OBJCOPY     Override default value for OBJCOPY
2089  OBJDUMP     Override default value for OBJDUMP
2090  BUILD_CC    Override default value for BUILD_CC
2091  BUILD_CXX   Override default value for BUILD_CXX
2092  BUILD_LD    Override default value for BUILD_LD
2093  JTREGEXE    Override default value for JTREGEXE
2094  XMKMF       Path to xmkmf, Makefile generator for X Window System
2095  FREETYPE_CFLAGS
2096              C compiler flags for FREETYPE, overriding pkg-config
2097  FREETYPE_LIBS
2098              linker flags for FREETYPE, overriding pkg-config
2099  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2100  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2101  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2102  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2103  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2104  PNG_LIBS    linker flags for PNG, overriding pkg-config
2105  LIBFFI_CFLAGS
2106              C compiler flags for LIBFFI, overriding pkg-config
2107  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2108  CCACHE      Override default value for CCACHE
2109
2110Use these variables to override the choices made by `configure' or to help
2111it to find libraries and programs with nonstandard names/locations.
2112
2113Report bugs to <build-dev@openjdk.java.net>.
2114OpenJDK home page: <http://openjdk.java.net>.
2115_ACEOF
2116ac_status=$?
2117fi
2118
2119if test "$ac_init_help" = "recursive"; then
2120  # If there are subdirs, report their specific --help.
2121  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2122    test -d "$ac_dir" ||
2123      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2124      continue
2125    ac_builddir=.
2126
2127case "$ac_dir" in
2128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2129*)
2130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2131  # A ".." for each directory in $ac_dir_suffix.
2132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2133  case $ac_top_builddir_sub in
2134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2136  esac ;;
2137esac
2138ac_abs_top_builddir=$ac_pwd
2139ac_abs_builddir=$ac_pwd$ac_dir_suffix
2140# for backward compatibility:
2141ac_top_builddir=$ac_top_build_prefix
2142
2143case $srcdir in
2144  .)  # We are building in place.
2145    ac_srcdir=.
2146    ac_top_srcdir=$ac_top_builddir_sub
2147    ac_abs_top_srcdir=$ac_pwd ;;
2148  [\\/]* | ?:[\\/]* )  # Absolute name.
2149    ac_srcdir=$srcdir$ac_dir_suffix;
2150    ac_top_srcdir=$srcdir
2151    ac_abs_top_srcdir=$srcdir ;;
2152  *) # Relative name.
2153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2154    ac_top_srcdir=$ac_top_build_prefix$srcdir
2155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2156esac
2157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2158
2159    cd "$ac_dir" || { ac_status=$?; continue; }
2160    # Check for guested configure.
2161    if test -f "$ac_srcdir/configure.gnu"; then
2162      echo &&
2163      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2164    elif test -f "$ac_srcdir/configure"; then
2165      echo &&
2166      $SHELL "$ac_srcdir/configure" --help=recursive
2167    else
2168      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2169    fi || ac_status=$?
2170    cd "$ac_pwd" || { ac_status=$?; break; }
2171  done
2172fi
2173
2174test -n "$ac_init_help" && exit $ac_status
2175if $ac_init_version; then
2176  cat <<\_ACEOF
2177OpenJDK configure jdk9
2178generated by GNU Autoconf 2.69
2179
2180Copyright (C) 2012 Free Software Foundation, Inc.
2181This configure script is free software; the Free Software Foundation
2182gives unlimited permission to copy, distribute and modify it.
2183_ACEOF
2184  exit
2185fi
2186
2187## ------------------------ ##
2188## Autoconf initialization. ##
2189## ------------------------ ##
2190
2191# ac_fn_c_try_compile LINENO
2192# --------------------------
2193# Try to compile conftest.$ac_ext, and return whether this succeeded.
2194ac_fn_c_try_compile ()
2195{
2196  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197  rm -f conftest.$ac_objext
2198  if { { ac_try="$ac_compile"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_compile") 2>conftest.err
2206  ac_status=$?
2207  if test -s conftest.err; then
2208    grep -v '^ *+' conftest.err >conftest.er1
2209    cat conftest.er1 >&5
2210    mv -f conftest.er1 conftest.err
2211  fi
2212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213  test $ac_status = 0; } && {
2214	 test -z "$ac_c_werror_flag" ||
2215	 test ! -s conftest.err
2216       } && test -s conftest.$ac_objext; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: failed program was:" >&5
2220sed 's/^/| /' conftest.$ac_ext >&5
2221
2222	ac_retval=1
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_c_try_compile
2228
2229# ac_fn_cxx_try_compile LINENO
2230# ----------------------------
2231# Try to compile conftest.$ac_ext, and return whether this succeeded.
2232ac_fn_cxx_try_compile ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  rm -f conftest.$ac_objext
2236  if { { ac_try="$ac_compile"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_compile") 2>conftest.err
2244  ac_status=$?
2245  if test -s conftest.err; then
2246    grep -v '^ *+' conftest.err >conftest.er1
2247    cat conftest.er1 >&5
2248    mv -f conftest.er1 conftest.err
2249  fi
2250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251  test $ac_status = 0; } && {
2252	 test -z "$ac_cxx_werror_flag" ||
2253	 test ! -s conftest.err
2254       } && test -s conftest.$ac_objext; then :
2255  ac_retval=0
2256else
2257  $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260	ac_retval=1
2261fi
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_compile
2266
2267# ac_fn_c_try_cpp LINENO
2268# ----------------------
2269# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_cpp ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if { { ac_try="$ac_cpp conftest.$ac_ext"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } > conftest.i && {
2289	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2290	 test ! -s conftest.err
2291       }; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297    ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_c_try_cpp
2303
2304# ac_fn_cxx_try_cpp LINENO
2305# ------------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_cxx_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_cxx_try_cpp
2340
2341# ac_fn_c_try_link LINENO
2342# -----------------------
2343# Try to link conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_c_try_link ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  rm -f conftest.$ac_objext conftest$ac_exeext
2348  if { { ac_try="$ac_link"
2349case "(($ac_try" in
2350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351  *) ac_try_echo=$ac_try;;
2352esac
2353eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354$as_echo "$ac_try_echo"; } >&5
2355  (eval "$ac_link") 2>conftest.err
2356  ac_status=$?
2357  if test -s conftest.err; then
2358    grep -v '^ *+' conftest.err >conftest.er1
2359    cat conftest.er1 >&5
2360    mv -f conftest.er1 conftest.err
2361  fi
2362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363  test $ac_status = 0; } && {
2364	 test -z "$ac_c_werror_flag" ||
2365	 test ! -s conftest.err
2366       } && test -s conftest$ac_exeext && {
2367	 test "$cross_compiling" = yes ||
2368	 test -x conftest$ac_exeext
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375	ac_retval=1
2376fi
2377  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2378  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2379  # interfere with the next link command; also delete a directory that is
2380  # left behind by Apple's compiler.  We do this before executing the actions.
2381  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2382  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_c_try_link
2386
2387# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2388# ---------------------------------------------------------
2389# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2390# the include files in INCLUDES and setting the cache variable VAR
2391# accordingly.
2392ac_fn_cxx_check_header_mongrel ()
2393{
2394  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395  if eval \${$3+:} false; then :
2396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397$as_echo_n "checking for $2... " >&6; }
2398if eval \${$3+:} false; then :
2399  $as_echo_n "(cached) " >&6
2400fi
2401eval ac_res=\$$3
2402	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
2404else
2405  # Is the header compilable?
2406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2407$as_echo_n "checking $2 usability... " >&6; }
2408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411#include <$2>
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_header_compiler=yes
2415else
2416  ac_header_compiler=no
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2420$as_echo "$ac_header_compiler" >&6; }
2421
2422# Is the header present?
2423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2424$as_echo_n "checking $2 presence... " >&6; }
2425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427#include <$2>
2428_ACEOF
2429if ac_fn_cxx_try_cpp "$LINENO"; then :
2430  ac_header_preproc=yes
2431else
2432  ac_header_preproc=no
2433fi
2434rm -f conftest.err conftest.i conftest.$ac_ext
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2436$as_echo "$ac_header_preproc" >&6; }
2437
2438# So?  What about this header?
2439case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2440  yes:no: )
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2442$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2444$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2445    ;;
2446  no:yes:* )
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2448$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2450$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2452$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2454$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457( $as_echo "## ----------------------------------------- ##
2458## Report this to build-dev@openjdk.java.net ##
2459## ----------------------------------------- ##"
2460     ) | sed "s/^/$as_me: WARNING:     /" >&2
2461    ;;
2462esac
2463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2464$as_echo_n "checking for $2... " >&6; }
2465if eval \${$3+:} false; then :
2466  $as_echo_n "(cached) " >&6
2467else
2468  eval "$3=\$ac_header_compiler"
2469fi
2470eval ac_res=\$$3
2471	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2472$as_echo "$ac_res" >&6; }
2473fi
2474  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_cxx_check_header_mongrel
2477
2478# ac_fn_cxx_try_run LINENO
2479# ------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2481# that executables *can* be run.
2482ac_fn_cxx_try_run ()
2483{
2484  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2485  if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488  *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492  (eval "$ac_link") 2>&5
2493  ac_status=$?
2494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2495  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2496  { { case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_try") 2>&5
2503  ac_status=$?
2504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505  test $ac_status = 0; }; }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: program exited with status $ac_status" >&5
2509       $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512       ac_retval=$ac_status
2513fi
2514  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516  as_fn_set_status $ac_retval
2517
2518} # ac_fn_cxx_try_run
2519
2520# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2521# ---------------------------------------------------------
2522# Tests whether HEADER exists and can be compiled using the include files in
2523# INCLUDES, setting the cache variable VAR accordingly.
2524ac_fn_cxx_check_header_compile ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534$4
2535#include <$2>
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  eval "$3=yes"
2539else
2540  eval "$3=no"
2541fi
2542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2543fi
2544eval ac_res=\$$3
2545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2546$as_echo "$ac_res" >&6; }
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548
2549} # ac_fn_cxx_check_header_compile
2550
2551# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2552# ----------------------------------------------
2553# Tries to find the compile-time value of EXPR in a program that includes
2554# INCLUDES, setting VAR accordingly. Returns whether the value could be
2555# computed
2556ac_fn_cxx_compute_int ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  if test "$cross_compiling" = yes; then
2560    # Depending upon the size, compute the lo and hi bounds.
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564int
2565main ()
2566{
2567static int test_array [1 - 2 * !(($2) >= 0)];
2568test_array [0] = 0;
2569return test_array [0];
2570
2571  ;
2572  return 0;
2573}
2574_ACEOF
2575if ac_fn_cxx_try_compile "$LINENO"; then :
2576  ac_lo=0 ac_mid=0
2577  while :; do
2578    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h.  */
2580$4
2581int
2582main ()
2583{
2584static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2585test_array [0] = 0;
2586return test_array [0];
2587
2588  ;
2589  return 0;
2590}
2591_ACEOF
2592if ac_fn_cxx_try_compile "$LINENO"; then :
2593  ac_hi=$ac_mid; break
2594else
2595  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2596			if test $ac_lo -le $ac_mid; then
2597			  ac_lo= ac_hi=
2598			  break
2599			fi
2600			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2601fi
2602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2603  done
2604else
2605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) < 0)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=-1 ac_mid=-1
2621  while :; do
2622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625int
2626main ()
2627{
2628static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2629test_array [0] = 0;
2630return test_array [0];
2631
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_lo=$ac_mid; break
2638else
2639  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2640			if test $ac_mid -le $ac_hi; then
2641			  ac_lo= ac_hi=
2642			  break
2643			fi
2644			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2645fi
2646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2647  done
2648else
2649  ac_lo= ac_hi=
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654# Binary search between lo and hi bounds.
2655while test "x$ac_lo" != "x$ac_hi"; do
2656  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_hi=$ac_mid
2673else
2674  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677done
2678case $ac_lo in #((
2679?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2680'') ac_retval=1 ;;
2681esac
2682  else
2683    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686static long int longval () { return $2; }
2687static unsigned long int ulongval () { return $2; }
2688#include <stdio.h>
2689#include <stdlib.h>
2690int
2691main ()
2692{
2693
2694  FILE *f = fopen ("conftest.val", "w");
2695  if (! f)
2696    return 1;
2697  if (($2) < 0)
2698    {
2699      long int i = longval ();
2700      if (i != ($2))
2701	return 1;
2702      fprintf (f, "%ld", i);
2703    }
2704  else
2705    {
2706      unsigned long int i = ulongval ();
2707      if (i != ($2))
2708	return 1;
2709      fprintf (f, "%lu", i);
2710    }
2711  /* Do not output a trailing newline, as this causes \r\n confusion
2712     on some platforms.  */
2713  return ferror (f) || fclose (f) != 0;
2714
2715  ;
2716  return 0;
2717}
2718_ACEOF
2719if ac_fn_cxx_try_run "$LINENO"; then :
2720  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2721else
2722  ac_retval=1
2723fi
2724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2725  conftest.$ac_objext conftest.beam conftest.$ac_ext
2726rm -f conftest.val
2727
2728  fi
2729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730  as_fn_set_status $ac_retval
2731
2732} # ac_fn_cxx_compute_int
2733
2734# ac_fn_cxx_try_link LINENO
2735# -------------------------
2736# Try to link conftest.$ac_ext, and return whether this succeeded.
2737ac_fn_cxx_try_link ()
2738{
2739  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740  rm -f conftest.$ac_objext conftest$ac_exeext
2741  if { { ac_try="$ac_link"
2742case "(($ac_try" in
2743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744  *) ac_try_echo=$ac_try;;
2745esac
2746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747$as_echo "$ac_try_echo"; } >&5
2748  (eval "$ac_link") 2>conftest.err
2749  ac_status=$?
2750  if test -s conftest.err; then
2751    grep -v '^ *+' conftest.err >conftest.er1
2752    cat conftest.er1 >&5
2753    mv -f conftest.er1 conftest.err
2754  fi
2755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756  test $ac_status = 0; } && {
2757	 test -z "$ac_cxx_werror_flag" ||
2758	 test ! -s conftest.err
2759       } && test -s conftest$ac_exeext && {
2760	 test "$cross_compiling" = yes ||
2761	 test -x conftest$ac_exeext
2762       }; then :
2763  ac_retval=0
2764else
2765  $as_echo "$as_me: failed program was:" >&5
2766sed 's/^/| /' conftest.$ac_ext >&5
2767
2768	ac_retval=1
2769fi
2770  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2771  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2772  # interfere with the next link command; also delete a directory that is
2773  # left behind by Apple's compiler.  We do this before executing the actions.
2774  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2775  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776  as_fn_set_status $ac_retval
2777
2778} # ac_fn_cxx_try_link
2779
2780# ac_fn_cxx_check_func LINENO FUNC VAR
2781# ------------------------------------
2782# Tests whether FUNC exists, setting the cache variable VAR accordingly
2783ac_fn_cxx_check_func ()
2784{
2785  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787$as_echo_n "checking for $2... " >&6; }
2788if eval \${$3+:} false; then :
2789  $as_echo_n "(cached) " >&6
2790else
2791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2792/* end confdefs.h.  */
2793/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2794   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2795#define $2 innocuous_$2
2796
2797/* System header to define __stub macros and hopefully few prototypes,
2798    which can conflict with char $2 (); below.
2799    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2800    <limits.h> exists even on freestanding compilers.  */
2801
2802#ifdef __STDC__
2803# include <limits.h>
2804#else
2805# include <assert.h>
2806#endif
2807
2808#undef $2
2809
2810/* Override any GCC internal prototype to avoid an error.
2811   Use char because int might match the return type of a GCC
2812   builtin and then its argument prototype would still apply.  */
2813#ifdef __cplusplus
2814extern "C"
2815#endif
2816char $2 ();
2817/* The GNU C library defines this for functions which it implements
2818    to always fail with ENOSYS.  Some functions are actually named
2819    something starting with __ and the normal name is an alias.  */
2820#if defined __stub_$2 || defined __stub___$2
2821choke me
2822#endif
2823
2824int
2825main ()
2826{
2827return $2 ();
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_link "$LINENO"; then :
2833  eval "$3=yes"
2834else
2835  eval "$3=no"
2836fi
2837rm -f core conftest.err conftest.$ac_objext \
2838    conftest$ac_exeext conftest.$ac_ext
2839fi
2840eval ac_res=\$$3
2841	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842$as_echo "$ac_res" >&6; }
2843  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844
2845} # ac_fn_cxx_check_func
2846
2847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2848# -------------------------------------------------------
2849# Tests whether HEADER exists and can be compiled using the include files in
2850# INCLUDES, setting the cache variable VAR accordingly.
2851ac_fn_c_check_header_compile ()
2852{
2853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855$as_echo_n "checking for $2... " >&6; }
2856if eval \${$3+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862#include <$2>
2863_ACEOF
2864if ac_fn_c_try_compile "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871eval ac_res=\$$3
2872	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2873$as_echo "$ac_res" >&6; }
2874  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2875
2876} # ac_fn_c_check_header_compile
2877cat >config.log <<_ACEOF
2878This file contains any messages produced by compilers while
2879running configure, to aid debugging if configure makes a mistake.
2880
2881It was created by OpenJDK $as_me jdk9, which was
2882generated by GNU Autoconf 2.69.  Invocation command line was
2883
2884  $ $0 $@
2885
2886_ACEOF
2887exec 5>>config.log
2888{
2889cat <<_ASUNAME
2890## --------- ##
2891## Platform. ##
2892## --------- ##
2893
2894hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2895uname -m = `(uname -m) 2>/dev/null || echo unknown`
2896uname -r = `(uname -r) 2>/dev/null || echo unknown`
2897uname -s = `(uname -s) 2>/dev/null || echo unknown`
2898uname -v = `(uname -v) 2>/dev/null || echo unknown`
2899
2900/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2901/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2902
2903/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2904/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2905/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2906/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2907/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2908/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2909/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2910
2911_ASUNAME
2912
2913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914for as_dir in $PATH
2915do
2916  IFS=$as_save_IFS
2917  test -z "$as_dir" && as_dir=.
2918    $as_echo "PATH: $as_dir"
2919  done
2920IFS=$as_save_IFS
2921
2922} >&5
2923
2924cat >&5 <<_ACEOF
2925
2926
2927## ----------- ##
2928## Core tests. ##
2929## ----------- ##
2930
2931_ACEOF
2932
2933
2934# Keep a trace of the command line.
2935# Strip out --no-create and --no-recursion so they do not pile up.
2936# Strip out --silent because we don't want to record it for future runs.
2937# Also quote any args containing shell meta-characters.
2938# Make two passes to allow for proper duplicate-argument suppression.
2939ac_configure_args=
2940ac_configure_args0=
2941ac_configure_args1=
2942ac_must_keep_next=false
2943for ac_pass in 1 2
2944do
2945  for ac_arg
2946  do
2947    case $ac_arg in
2948    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2949    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2950    | -silent | --silent | --silen | --sile | --sil)
2951      continue ;;
2952    *\'*)
2953      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    esac
2955    case $ac_pass in
2956    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2957    2)
2958      as_fn_append ac_configure_args1 " '$ac_arg'"
2959      if test $ac_must_keep_next = true; then
2960	ac_must_keep_next=false # Got value, back to normal.
2961      else
2962	case $ac_arg in
2963	  *=* | --config-cache | -C | -disable-* | --disable-* \
2964	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2965	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2966	  | -with-* | --with-* | -without-* | --without-* | --x)
2967	    case "$ac_configure_args0 " in
2968	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2969	    esac
2970	    ;;
2971	  -* ) ac_must_keep_next=true ;;
2972	esac
2973      fi
2974      as_fn_append ac_configure_args " '$ac_arg'"
2975      ;;
2976    esac
2977  done
2978done
2979{ ac_configure_args0=; unset ac_configure_args0;}
2980{ ac_configure_args1=; unset ac_configure_args1;}
2981
2982# When interrupted or exit'd, cleanup temporary files, and complete
2983# config.log.  We remove comments because anyway the quotes in there
2984# would cause problems or look ugly.
2985# WARNING: Use '\'' to represent an apostrophe within the trap.
2986# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2987trap 'exit_status=$?
2988  # Save into config.log some information that might help in debugging.
2989  {
2990    echo
2991
2992    $as_echo "## ---------------- ##
2993## Cache variables. ##
2994## ---------------- ##"
2995    echo
2996    # The following way of writing the cache mishandles newlines in values,
2997(
2998  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2999    eval ac_val=\$$ac_var
3000    case $ac_val in #(
3001    *${as_nl}*)
3002      case $ac_var in #(
3003      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3004$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3005      esac
3006      case $ac_var in #(
3007      _ | IFS | as_nl) ;; #(
3008      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3009      *) { eval $ac_var=; unset $ac_var;} ;;
3010      esac ;;
3011    esac
3012  done
3013  (set) 2>&1 |
3014    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3015    *${as_nl}ac_space=\ *)
3016      sed -n \
3017	"s/'\''/'\''\\\\'\'''\''/g;
3018	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3019      ;; #(
3020    *)
3021      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3022      ;;
3023    esac |
3024    sort
3025)
3026    echo
3027
3028    $as_echo "## ----------------- ##
3029## Output variables. ##
3030## ----------------- ##"
3031    echo
3032    for ac_var in $ac_subst_vars
3033    do
3034      eval ac_val=\$$ac_var
3035      case $ac_val in
3036      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3037      esac
3038      $as_echo "$ac_var='\''$ac_val'\''"
3039    done | sort
3040    echo
3041
3042    if test -n "$ac_subst_files"; then
3043      $as_echo "## ------------------- ##
3044## File substitutions. ##
3045## ------------------- ##"
3046      echo
3047      for ac_var in $ac_subst_files
3048      do
3049	eval ac_val=\$$ac_var
3050	case $ac_val in
3051	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052	esac
3053	$as_echo "$ac_var='\''$ac_val'\''"
3054      done | sort
3055      echo
3056    fi
3057
3058    if test -s confdefs.h; then
3059      $as_echo "## ----------- ##
3060## confdefs.h. ##
3061## ----------- ##"
3062      echo
3063      cat confdefs.h
3064      echo
3065    fi
3066    test "$ac_signal" != 0 &&
3067      $as_echo "$as_me: caught signal $ac_signal"
3068    $as_echo "$as_me: exit $exit_status"
3069  } >&5
3070  rm -f core *.core core.conftest.* &&
3071    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3072    exit $exit_status
3073' 0
3074for ac_signal in 1 2 13 15; do
3075  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3076done
3077ac_signal=0
3078
3079# confdefs.h avoids OS command line length limits that DEFS can exceed.
3080rm -f -r conftest* confdefs.h
3081
3082$as_echo "/* confdefs.h */" > confdefs.h
3083
3084# Predefined preprocessor variables.
3085
3086cat >>confdefs.h <<_ACEOF
3087#define PACKAGE_NAME "$PACKAGE_NAME"
3088_ACEOF
3089
3090cat >>confdefs.h <<_ACEOF
3091#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3092_ACEOF
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_VERSION "$PACKAGE_VERSION"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_STRING "$PACKAGE_STRING"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_URL "$PACKAGE_URL"
3108_ACEOF
3109
3110
3111# Let the site file select an alternate cache file if it wants to.
3112# Prefer an explicitly selected file to automatically selected ones.
3113ac_site_file1=NONE
3114ac_site_file2=NONE
3115if test -n "$CONFIG_SITE"; then
3116  # We do not want a PATH search for config.site.
3117  case $CONFIG_SITE in #((
3118    -*)  ac_site_file1=./$CONFIG_SITE;;
3119    */*) ac_site_file1=$CONFIG_SITE;;
3120    *)   ac_site_file1=./$CONFIG_SITE;;
3121  esac
3122elif test "x$prefix" != xNONE; then
3123  ac_site_file1=$prefix/share/config.site
3124  ac_site_file2=$prefix/etc/config.site
3125else
3126  ac_site_file1=$ac_default_prefix/share/config.site
3127  ac_site_file2=$ac_default_prefix/etc/config.site
3128fi
3129for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3130do
3131  test "x$ac_site_file" = xNONE && continue
3132  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3133    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3134$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3135    sed 's/^/| /' "$ac_site_file" >&5
3136    . "$ac_site_file" \
3137      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3139as_fn_error $? "failed to load site script $ac_site_file
3140See \`config.log' for more details" "$LINENO" 5; }
3141  fi
3142done
3143
3144if test -r "$cache_file"; then
3145  # Some versions of bash will fail to source /dev/null (special files
3146  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3147  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3149$as_echo "$as_me: loading cache $cache_file" >&6;}
3150    case $cache_file in
3151      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3152      *)                      . "./$cache_file";;
3153    esac
3154  fi
3155else
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3157$as_echo "$as_me: creating cache $cache_file" >&6;}
3158  >$cache_file
3159fi
3160
3161# Check that the precious variables saved in the cache have kept the same
3162# value.
3163ac_cache_corrupted=false
3164for ac_var in $ac_precious_vars; do
3165  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3166  eval ac_new_set=\$ac_env_${ac_var}_set
3167  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3168  eval ac_new_val=\$ac_env_${ac_var}_value
3169  case $ac_old_set,$ac_new_set in
3170    set,)
3171      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3172$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3173      ac_cache_corrupted=: ;;
3174    ,set)
3175      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3176$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3177      ac_cache_corrupted=: ;;
3178    ,);;
3179    *)
3180      if test "x$ac_old_val" != "x$ac_new_val"; then
3181	# differences in whitespace do not lead to failure.
3182	ac_old_val_w=`echo x $ac_old_val`
3183	ac_new_val_w=`echo x $ac_new_val`
3184	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3185	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3186$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3187	  ac_cache_corrupted=:
3188	else
3189	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3190$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3191	  eval $ac_var=\$ac_old_val
3192	fi
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3194$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3196$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3197      fi;;
3198  esac
3199  # Pass precious variables to config.status.
3200  if test "$ac_new_set" = set; then
3201    case $ac_new_val in
3202    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3203    *) ac_arg=$ac_var=$ac_new_val ;;
3204    esac
3205    case " $ac_configure_args " in
3206      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3207      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3208    esac
3209  fi
3210done
3211if $ac_cache_corrupted; then
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3215$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3216  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3217fi
3218## -------------------- ##
3219## Main body of script. ##
3220## -------------------- ##
3221
3222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
3227
3228
3229
3230ac_aux_dir=
3231for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3232  if test -f "$ac_dir/install-sh"; then
3233    ac_aux_dir=$ac_dir
3234    ac_install_sh="$ac_aux_dir/install-sh -c"
3235    break
3236  elif test -f "$ac_dir/install.sh"; then
3237    ac_aux_dir=$ac_dir
3238    ac_install_sh="$ac_aux_dir/install.sh -c"
3239    break
3240  elif test -f "$ac_dir/shtool"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/shtool install -c"
3243    break
3244  fi
3245done
3246if test -z "$ac_aux_dir"; then
3247  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
3248fi
3249
3250# These three variables are undocumented and unsupported,
3251# and are intended to be withdrawn in a future Autoconf release.
3252# They can cause serious problems if a builder's source tree is in a directory
3253# whose full name contains unusual characters.
3254ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3255ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3256ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3257
3258
3259# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3260
3261#
3262# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286#
3287# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3288#
3289# This program is free software; you can redistribute it and/or modify
3290# it under the terms of the GNU General Public License as published by
3291# the Free Software Foundation; either version 2 of the License, or
3292# (at your option) any later version.
3293#
3294# This program is distributed in the hope that it will be useful, but
3295# WITHOUT ANY WARRANTY; without even the implied warranty of
3296# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3297# General Public License for more details.
3298#
3299# You should have received a copy of the GNU General Public License
3300# along with this program; if not, write to the Free Software
3301# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3302#
3303# As a special exception to the GNU General Public License, if you
3304# distribute this file as part of a program that contains a
3305# configuration script generated by Autoconf, you may include it under
3306# the same distribution terms that you use for the rest of that program.
3307
3308# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3309# ----------------------------------
3310# PKG_PROG_PKG_CONFIG
3311
3312# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3313#
3314# Check to see whether a particular set of modules exists.  Similar
3315# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3316#
3317#
3318# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3319# this or PKG_CHECK_MODULES is called, or make sure to call
3320# PKG_CHECK_EXISTS manually
3321# --------------------------------------------------------------
3322
3323
3324
3325# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3326# ---------------------------------------------
3327# _PKG_CONFIG
3328
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330# -----------------------------
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332
3333
3334# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3335# [ACTION-IF-NOT-FOUND])
3336#
3337#
3338# Note that if there is a possibility the first call to
3339# PKG_CHECK_MODULES might not happen, you should be sure to include an
3340# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3341#
3342#
3343# --------------------------------------------------------------
3344# PKG_CHECK_MODULES
3345
3346
3347# Include these first...
3348#
3349# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3351#
3352# This code is free software; you can redistribute it and/or modify it
3353# under the terms of the GNU General Public License version 2 only, as
3354# published by the Free Software Foundation.  Oracle designates this
3355# particular file as subject to the "Classpath" exception as provided
3356# by Oracle in the LICENSE file that accompanied this code.
3357#
3358# This code is distributed in the hope that it will be useful, but WITHOUT
3359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3361# version 2 for more details (a copy is included in the LICENSE file that
3362# accompanied this code).
3363#
3364# You should have received a copy of the GNU General Public License version
3365# 2 along with this work; if not, write to the Free Software Foundation,
3366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3367#
3368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3369# or visit www.oracle.com if you need additional information or have any
3370# questions.
3371#
3372
3373# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3374# If so, then append $1 to $2 \
3375# Also set JVM_ARG_OK to true/false depending on outcome.
3376
3377
3378# Appends a string to a path variable, only adding the : when needed.
3379
3380
3381# Prepends a string to a path variable, only adding the : when needed.
3382
3383
3384# This will make sure the given variable points to a full and proper
3385# path. This means:
3386# 1) There will be no spaces in the path. On unix platforms,
3387#    spaces in the path will result in an error. On Windows,
3388#    the path will be rewritten using short-style to be space-free.
3389# 2) The path will be absolute, and it will be in unix-style (on
3390#     cygwin).
3391# $1: The name of the variable to fix
3392
3393
3394# This will make sure the given variable points to a executable
3395# with a full and proper path. This means:
3396# 1) There will be no spaces in the path. On unix platforms,
3397#    spaces in the path will result in an error. On Windows,
3398#    the path will be rewritten using short-style to be space-free.
3399# 2) The path will be absolute, and it will be in unix-style (on
3400#     cygwin).
3401# Any arguments given to the executable is preserved.
3402# If the input variable does not have a directory specification, then
3403# it need to be in the PATH.
3404# $1: The name of the variable to fix
3405
3406
3407
3408
3409# Register a --with argument but mark it as deprecated
3410# $1: The name of the with argument to deprecate, not including --with-
3411
3412
3413# Register a --enable argument but mark it as deprecated
3414# $1: The name of the with argument to deprecate, not including --enable-
3415# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3416
3417
3418
3419
3420# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3421# $1: variable to check
3422
3423
3424# Check that there are no unprocessed overridden variables left.
3425# If so, they are an incorrect argument and we will exit with an error.
3426
3427
3428# Setup a tool for the given variable. If correctly specified by the user,
3429# use that value, otherwise search for the tool using the supplied code snippet.
3430# $1: variable to set
3431# $2: code snippet to call to look for the tool
3432
3433
3434# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3435# $1: variable to set
3436# $2: executable name (or list of names) to look for
3437
3438
3439# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3440# $1: variable to set
3441# $2: executable name (or list of names) to look for
3442
3443
3444# Like BASIC_PATH_PROGS but fails if no tool was found.
3445# $1: variable to set
3446# $2: executable name (or list of names) to look for
3447
3448
3449# Like BASIC_SETUP_TOOL but fails if no tool was found.
3450# $1: variable to set
3451# $2: autoconf macro to call to look for the special tool
3452
3453
3454# Setup the most fundamental tools that relies on not much else to set up,
3455# but is used by much of the early bootstrap code.
3456
3457
3458# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3459
3460
3461# Evaluates platform specific overrides for devkit variables.
3462# $1: Name of variable
3463
3464
3465
3466
3467
3468
3469#%%% Simple tools %%%
3470
3471# Check if we have found a usable version of make
3472# $1: the path to a potential make binary (or empty)
3473# $2: the description on how we found this
3474
3475
3476
3477
3478# Goes looking for a usable version of GNU make.
3479
3480
3481
3482
3483
3484
3485# Check if build directory is on local disk. If not possible to determine,
3486# we prefer to claim it's local.
3487# Argument 1: directory to test
3488# Argument 2: what to do if it is on local disk
3489# Argument 3: what to do otherwise (remote disk or failure)
3490
3491
3492# Check that source files have basic read permissions set. This might
3493# not be the case in cygwin in certain conditions.
3494
3495
3496
3497
3498# Check for support for specific options in bash
3499
3500
3501# Code to run after AC_OUTPUT
3502
3503
3504#
3505# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# Helper function which possibly converts a path using DOS-style short mode.
3539# If so, the updated path is stored in $new_path.
3540# $1: The path to check
3541
3542
3543# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3544# and could probably be heavily simplified. However, all changes in this
3545# area tend to need lot of testing in different scenarios, and in lack of
3546# proper unit testing, cleaning this up has not been deemed worth the effort
3547# at the moment.
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3558
3559
3560
3561
3562#
3563# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565#
3566# This code is free software; you can redistribute it and/or modify it
3567# under the terms of the GNU General Public License version 2 only, as
3568# published by the Free Software Foundation.  Oracle designates this
3569# particular file as subject to the "Classpath" exception as provided
3570# by Oracle in the LICENSE file that accompanied this code.
3571#
3572# This code is distributed in the hope that it will be useful, but WITHOUT
3573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575# version 2 for more details (a copy is included in the LICENSE file that
3576# accompanied this code).
3577#
3578# You should have received a copy of the GNU General Public License version
3579# 2 along with this work; if not, write to the Free Software Foundation,
3580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581#
3582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583# or visit www.oracle.com if you need additional information or have any
3584# questions.
3585#
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597# ... then the rest
3598#
3599# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601#
3602# This code is free software; you can redistribute it and/or modify it
3603# under the terms of the GNU General Public License version 2 only, as
3604# published by the Free Software Foundation.  Oracle designates this
3605# particular file as subject to the "Classpath" exception as provided
3606# by Oracle in the LICENSE file that accompanied this code.
3607#
3608# This code is distributed in the hope that it will be useful, but WITHOUT
3609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611# version 2 for more details (a copy is included in the LICENSE file that
3612# accompanied this code).
3613#
3614# You should have received a copy of the GNU General Public License version
3615# 2 along with this work; if not, write to the Free Software Foundation,
3616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617#
3618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619# or visit www.oracle.com if you need additional information or have any
3620# questions.
3621#
3622
3623########################################################################
3624# This file handles detection of the Boot JDK. The Boot JDK detection
3625# process has been developed as a response to solve a complex real-world
3626# problem. Initially, it was simple, but it has grown as platform after
3627# platform, idiosyncracy after idiosyncracy has been supported.
3628#
3629# The basic idea is this:
3630# 1) You need an acceptable *) JDK to use as a Boot JDK
3631# 2) There are several ways to locate a JDK, that are mostly platform
3632#    dependent **)
3633# 3) You can have multiple JDKs installed
3634# 4) If possible, configure should try to dig out an acceptable JDK
3635#    automatically, without having to resort to command-line options
3636#
3637# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3638#     javac) and not a JRE, etc.
3639#
3640# **) On Windows we typically use a well-known path.
3641#     On MacOSX we typically use the tool java_home.
3642#     On Linux we typically find javac in the $PATH, and then follow a
3643#     chain of symlinks that often ends up in a real JDK.
3644#
3645# This leads to the code where we check in different ways to locate a
3646# JDK, and if one is found, check if it is acceptable. If not, we print
3647# our reasons for rejecting it (useful when debugging non-working
3648# configure situations) and continue checking the next one.
3649########################################################################
3650
3651# Execute the check given as argument, and verify the result
3652# If the Boot JDK was previously found, do nothing
3653# $1 A command line (typically autoconf macro) to execute
3654
3655
3656# Test: Is bootjdk explicitely set by command line arguments?
3657
3658
3659# Test: Is bootjdk available from builddeps?
3660
3661
3662# Test: Is $JAVA_HOME set?
3663
3664
3665# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3666
3667
3668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3669# $1: Argument to the java_home binary (optional)
3670
3671
3672# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3673
3674
3675# Look for a jdk in the given path. If there are multiple, try to select the newest.
3676# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3677# $1 = Path to directory containing jdk installations.
3678# $2 = String to append to the found JDK directory to get the proper JDK home
3679
3680
3681# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3682# environmental variable as base for where to look.
3683# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3684
3685
3686# Test: Is there a JDK installed in default, well-known locations?
3687
3688
3689# Check that a command-line tool in the Boot JDK is correct
3690# $1 = name of variable to assign
3691# $2 = name of binary
3692
3693
3694###############################################################################
3695#
3696# We need a Boot JDK to bootstrap the build.
3697#
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Documentation on common flags used for solstudio in HIGHEST.
3777#
3778# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3779#          done with care, there are some assumptions below that need to
3780#          be understood about the use of pointers, and IEEE behavior.
3781#
3782# -fns: Use non-standard floating point mode (not IEEE 754)
3783# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3784# -fsingle: Use single precision floating point with 'float'
3785# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3786#   (Source with excessing pointer casting and data access with mixed
3787#    pointer types are not recommended)
3788# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3789#   (If you expect perfect errno behavior, do not use this)
3790# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3791# -xrestrict: Pointer parameters to functions do not overlap
3792#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3793#    If you pass in multiple pointers to the same data, do not use this)
3794# -xlibmil: Inline some library routines
3795#   (If you expect perfect errno behavior, do not use this)
3796# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3797#   (If you expect perfect errno behavior, do not use this)
3798#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3799
3800    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3801    # Bug?
3802    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3803    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3804    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3805    #fi
3806
3807
3808
3809
3810
3811# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3812#                                   [RUN-IF-FALSE])
3813# ------------------------------------------------------------
3814# Check that the c and c++ compilers support an argument
3815
3816
3817# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3818#                                    [RUN-IF-FALSE])
3819# ------------------------------------------------------------
3820# Check that the linker support an argument
3821
3822
3823
3824
3825#
3826# Copyright (c) 2011, 2014, 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
3852
3853
3854cygwin_help() {
3855  case $1 in
3856    unzip)
3857      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3858      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3859      ;;
3860    zip)
3861      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3862      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3863      ;;
3864    make)
3865      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3867      ;;
3868    freetype)
3869      HELP_MSG="
3870The freetype library can now be build during the configure process.
3871Download the freetype sources and unpack them into an arbitrary directory:
3872
3873wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3874tar -xzf freetype-2.5.3.tar.gz
3875
3876Then run configure with '--with-freetype-src=<freetype_src>'. This will
3877automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3878builds or into '<freetype_src>/lib32' for 32-bit builds.
3879Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3880and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3881      ;;
3882  esac
3883}
3884
3885msys_help() {
3886  PKGHANDLER_COMMAND=""
3887}
3888
3889apt_help() {
3890  case $1 in
3891    devkit)
3892      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3893    openjdk)
3894      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3895    alsa)
3896      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3897    cups)
3898      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3899    freetype)
3900      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3901    pulse)
3902      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3903    x11)
3904      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3905    ccache)
3906      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3907  esac
3908}
3909
3910yum_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3928  esac
3929}
3930
3931port_help() {
3932  PKGHANDLER_COMMAND=""
3933}
3934
3935pkgutil_help() {
3936  PKGHANDLER_COMMAND=""
3937}
3938
3939pkgadd_help() {
3940  PKGHANDLER_COMMAND=""
3941}
3942
3943# This function will check if we're called from the "configure" wrapper while
3944# printing --help. If so, we will print out additional information that can
3945# only be extracted within the autoconf script, and then exit. This must be
3946# called at the very beginning in configure.ac.
3947
3948
3949
3950
3951
3952
3953#
3954# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3956#
3957# This code is free software; you can redistribute it and/or modify it
3958# under the terms of the GNU General Public License version 2 only, as
3959# published by the Free Software Foundation.  Oracle designates this
3960# particular file as subject to the "Classpath" exception as provided
3961# by Oracle in the LICENSE file that accompanied this code.
3962#
3963# This code is distributed in the hope that it will be useful, but WITHOUT
3964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3966# version 2 for more details (a copy is included in the LICENSE file that
3967# accompanied this code).
3968#
3969# You should have received a copy of the GNU General Public License version
3970# 2 along with this work; if not, write to the Free Software Foundation,
3971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3972#
3973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3974# or visit www.oracle.com if you need additional information or have any
3975# questions.
3976#
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987###############################################################################
3988#
3989# Should we build only OpenJDK even if closed sources are present?
3990#
3991
3992
3993
3994
3995###############################################################################
3996#
3997# Setup version numbers
3998#
3999
4000
4001
4002
4003
4004
4005################################################################################
4006#
4007# Gcov coverage data for hotspot
4008#
4009
4010
4011#
4012# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4013# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4014#
4015# This code is free software; you can redistribute it and/or modify it
4016# under the terms of the GNU General Public License version 2 only, as
4017# published by the Free Software Foundation.  Oracle designates this
4018# particular file as subject to the "Classpath" exception as provided
4019# by Oracle in the LICENSE file that accompanied this code.
4020#
4021# This code is distributed in the hope that it will be useful, but WITHOUT
4022# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4023# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4024# version 2 for more details (a copy is included in the LICENSE file that
4025# accompanied this code).
4026#
4027# You should have received a copy of the GNU General Public License version
4028# 2 along with this work; if not, write to the Free Software Foundation,
4029# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4030#
4031# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4032# or visit www.oracle.com if you need additional information or have any
4033# questions.
4034#
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056#
4057# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4059#
4060# This code is free software; you can redistribute it and/or modify it
4061# under the terms of the GNU General Public License version 2 only, as
4062# published by the Free Software Foundation.  Oracle designates this
4063# particular file as subject to the "Classpath" exception as provided
4064# by Oracle in the LICENSE file that accompanied this code.
4065#
4066# This code is distributed in the hope that it will be useful, but WITHOUT
4067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4069# version 2 for more details (a copy is included in the LICENSE file that
4070# accompanied this code).
4071#
4072# You should have received a copy of the GNU General Public License version
4073# 2 along with this work; if not, write to the Free Software Foundation,
4074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4075#
4076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4077# or visit www.oracle.com if you need additional information or have any
4078# questions.
4079#
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style CPU name to OpenJDK style, into
4083# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4084
4085
4086# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4087# Converts autoconf style OS name to OpenJDK style, into
4088# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4089
4090
4091# Expects $host_os $host_cpu $build_os and $build_cpu
4092# and $with_target_bits to have been setup!
4093#
4094# Translate the standard triplet(quadruplet) definition
4095# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4096# OPENJDK_BUILD_OS, etc.
4097
4098
4099# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4100# accordingly. Must be done after setting up build and target system, but before
4101# doing anything else with these values.
4102
4103
4104# Setup the legacy variables, for controlling the old makefiles.
4105#
4106
4107
4108
4109
4110#%%% Build and target systems %%%
4111
4112
4113
4114
4115# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4116# Add -mX to various FLAGS variables.
4117
4118
4119
4120
4121
4122
4123#
4124# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126#
4127# This code is free software; you can redistribute it and/or modify it
4128# under the terms of the GNU General Public License version 2 only, as
4129# published by the Free Software Foundation.  Oracle designates this
4130# particular file as subject to the "Classpath" exception as provided
4131# by Oracle in the LICENSE file that accompanied this code.
4132#
4133# This code is distributed in the hope that it will be useful, but WITHOUT
4134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136# version 2 for more details (a copy is included in the LICENSE file that
4137# accompanied this code).
4138#
4139# You should have received a copy of the GNU General Public License version
4140# 2 along with this work; if not, write to the Free Software Foundation,
4141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142#
4143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144# or visit www.oracle.com if you need additional information or have any
4145# questions.
4146#
4147
4148
4149
4150
4151
4152
4153
4154
4155#
4156# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4157# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4158#
4159# This code is free software; you can redistribute it and/or modify it
4160# under the terms of the GNU General Public License version 2 only, as
4161# published by the Free Software Foundation.  Oracle designates this
4162# particular file as subject to the "Classpath" exception as provided
4163# by Oracle in the LICENSE file that accompanied this code.
4164#
4165# This code is distributed in the hope that it will be useful, but WITHOUT
4166# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4167# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4168# version 2 for more details (a copy is included in the LICENSE file that
4169# accompanied this code).
4170#
4171# You should have received a copy of the GNU General Public License version
4172# 2 along with this work; if not, write to the Free Software Foundation,
4173# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4174#
4175# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4176# or visit www.oracle.com if you need additional information or have any
4177# questions.
4178#
4179
4180########################################################################
4181# This file is responsible for detecting, verifying and setting up the
4182# toolchain, i.e. the compiler, linker and related utilities. It will setup
4183# proper paths to the binaries, but it will not setup any flags.
4184#
4185# The binaries used is determined by the toolchain type, which is the family of
4186# compilers and related tools that are used.
4187########################################################################
4188
4189
4190# All valid toolchains, regardless of platform (used by help.m4)
4191VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4192
4193# These toolchains are valid on different platforms
4194VALID_TOOLCHAINS_linux="gcc clang"
4195VALID_TOOLCHAINS_solaris="solstudio"
4196VALID_TOOLCHAINS_macosx="gcc clang"
4197VALID_TOOLCHAINS_aix="xlc"
4198VALID_TOOLCHAINS_windows="microsoft"
4199
4200# Toolchain descriptions
4201TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4202TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4203TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4204TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4205TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4206
4207# Setup a number of variables describing how native output files are
4208# named on this platform/toolchain.
4209
4210
4211# Determine which toolchain type to use, and make sure it is valid for this
4212# platform. Setup various information about the selected toolchain.
4213
4214
4215# Before we start detecting the toolchain executables, we might need some
4216# special setup, e.g. additional paths etc.
4217
4218
4219# Restore path, etc
4220
4221
4222# Check if a compiler is of the toolchain type we expect, and save the version
4223# information from it. If the compiler does not match the expected type,
4224# this function will abort using AC_MSG_ERROR. If it matches, the version will
4225# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4226# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4227#
4228# $1 = compiler to test (CC or CXX)
4229# $2 = human readable name of compiler (C or C++)
4230
4231
4232# Try to locate the given C or C++ compiler in the path, or otherwise.
4233#
4234# $1 = compiler to test (CC or CXX)
4235# $2 = human readable name of compiler (C or C++)
4236# $3 = list of compiler names to search for
4237
4238
4239# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4240# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4241# archiver (AR). Verify that the compilers are correct according to the
4242# toolchain type.
4243
4244
4245# Setup additional tools that is considered a part of the toolchain, but not the
4246# core part. Many of these are highly platform-specific and do not exist,
4247# and/or are not needed on all platforms.
4248
4249
4250# Setup the build tools (i.e, the compiler and linker used to build programs
4251# that should be run on the build platform, not the target platform, as a build
4252# helper). Since the non-cross-compile case uses the normal, target compilers
4253# for this, we can only do this after these have been setup.
4254
4255
4256# Setup legacy variables that are still needed as alternative ways to refer to
4257# parts of the toolchain.
4258
4259
4260# Do some additional checks on the detected tools.
4261
4262
4263# Setup the JTReg Regression Test Harness.
4264
4265
4266#
4267# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4268# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4269#
4270# This code is free software; you can redistribute it and/or modify it
4271# under the terms of the GNU General Public License version 2 only, as
4272# published by the Free Software Foundation.  Oracle designates this
4273# particular file as subject to the "Classpath" exception as provided
4274# by Oracle in the LICENSE file that accompanied this code.
4275#
4276# This code is distributed in the hope that it will be useful, but WITHOUT
4277# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4278# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4279# version 2 for more details (a copy is included in the LICENSE file that
4280# accompanied this code).
4281#
4282# You should have received a copy of the GNU General Public License version
4283# 2 along with this work; if not, write to the Free Software Foundation,
4284# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4285#
4286# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4287# or visit www.oracle.com if you need additional information or have any
4288# questions.
4289#
4290
4291################################################################################
4292# The order of these defines the priority by which we try to find them.
4293VALID_VS_VERSIONS="2013 2012 2010"
4294
4295VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4296VS_VERSION_INTERNAL_2010=100
4297VS_MSVCR_2010=msvcr100.dll
4298# We don't use msvcp on Visual Studio 2010
4299#VS_MSVCP_2010=msvcp100.dll
4300VS_ENVVAR_2010="VS100COMNTOOLS"
4301VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4302VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4303VS_VS_PLATFORM_NAME_2010="v100"
4304VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4305
4306VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4307VS_VERSION_INTERNAL_2012=110
4308VS_MSVCR_2012=msvcr110.dll
4309VS_MSVCP_2012=msvcp110.dll
4310VS_ENVVAR_2012="VS110COMNTOOLS"
4311VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4312VS_SDK_INSTALLDIR_2012=
4313VS_VS_PLATFORM_NAME_2012="v110"
4314VS_SDK_PLATFORM_NAME_2012=
4315
4316VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4317VS_VERSION_INTERNAL_2013=120
4318VS_MSVCR_2013=msvcr120.dll
4319VS_MSVCP_2013=msvcp120.dll
4320VS_ENVVAR_2013="VS120COMNTOOLS"
4321VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4322VS_SDK_INSTALLDIR_2013=
4323VS_VS_PLATFORM_NAME_2013="v120"
4324VS_SDK_PLATFORM_NAME_2013=
4325
4326################################################################################
4327
4328
4329
4330################################################################################
4331
4332
4333
4334################################################################################
4335# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4336# build environment and assigns it to VS_ENV_CMD
4337
4338
4339################################################################################
4340
4341
4342
4343################################################################################
4344# Check if the VS env variables were setup prior to running configure.
4345# If not, then find vcvarsall.bat and run it automatically, and integrate
4346# the set env variables into the spec file.
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361# This line needs to be here, verbatim, after all includes and the dummy hook
4362# definitions. It is replaced with custom functionality when building
4363# custom sources.
4364#CUSTOM_AUTOCONF_INCLUDE
4365
4366# Do not change or remove the following line, it is needed for consistency checks:
4367DATE_WHEN_GENERATED=1433337614
4368
4369###############################################################################
4370#
4371# Initialization / Boot-strapping
4372#
4373# The bootstrapping process needs to solve the "chicken or the egg" problem,
4374# thus it jumps back and forth, each time gaining something needed later on.
4375#
4376###############################################################################
4377
4378# If we are requested to print additional help, do that and then exit.
4379# This must be the very first call.
4380
4381  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4382    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4383    $PRINTF "Which are valid to use depends on the build platform.\n"
4384    for toolchain in $VALID_TOOLCHAINS_all; do
4385      # Use indirect variable referencing
4386      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4387      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4388      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4389    done
4390
4391    # And now exit directly
4392    exit 0
4393  fi
4394
4395
4396# Basic initialization that must happen first of all in the normal process.
4397
4398  # Save the original command line. This is passed to us by the wrapper configure script.
4399
4400  # Save the path variable before it gets changed
4401  ORIGINAL_PATH="$PATH"
4402
4403  DATE_WHEN_CONFIGURED=`LANG=C date`
4404
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4406$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4408$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4409
4410
4411  # Start with tools that do not need have cross compilation support
4412  # and can be expected to be found in the default PATH. These tools are
4413  # used by configure. Nor are these tools expected to be found in the
4414  # devkit from the builddeps server either, since they are
4415  # needed to download the devkit.
4416
4417  # First are all the simple required tools.
4418
4419
4420
4421  # Publish this variable in the help.
4422
4423
4424  if test "x$BASENAME" = x; then
4425    # The variable is not set by user, try to locate tool using the code snippet
4426    for ac_prog in basename
4427do
4428  # Extract the first word of "$ac_prog", so it can be a program name with args.
4429set dummy $ac_prog; ac_word=$2
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
4432if ${ac_cv_path_BASENAME+:} false; then :
4433  $as_echo_n "(cached) " >&6
4434else
4435  case $BASENAME in
4436  [\\/]* | ?:[\\/]*)
4437  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4438  ;;
4439  *)
4440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443  IFS=$as_save_IFS
4444  test -z "$as_dir" && as_dir=.
4445    for ac_exec_ext in '' $ac_executable_extensions; do
4446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4449    break 2
4450  fi
4451done
4452  done
4453IFS=$as_save_IFS
4454
4455  ;;
4456esac
4457fi
4458BASENAME=$ac_cv_path_BASENAME
4459if test -n "$BASENAME"; then
4460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4461$as_echo "$BASENAME" >&6; }
4462else
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464$as_echo "no" >&6; }
4465fi
4466
4467
4468  test -n "$BASENAME" && break
4469done
4470
4471  else
4472    # The variable is set, but is it from the command line or the environment?
4473
4474    # Try to remove the string !BASENAME! from our list.
4475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4477      # If it failed, the variable was not from the command line. Ignore it,
4478      # but warn the user (except for BASH, which is always set by the calling BASH).
4479      if test "xBASENAME" != xBASH; then
4480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4481$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4482      fi
4483      # Try to locate tool using the code snippet
4484      for ac_prog in basename
4485do
4486  # Extract the first word of "$ac_prog", so it can be a program name with args.
4487set dummy $ac_prog; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if ${ac_cv_path_BASENAME+:} false; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493  case $BASENAME in
4494  [\\/]* | ?:[\\/]*)
4495  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4496  ;;
4497  *)
4498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in $PATH
4500do
4501  IFS=$as_save_IFS
4502  test -z "$as_dir" && as_dir=.
4503    for ac_exec_ext in '' $ac_executable_extensions; do
4504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4505    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507    break 2
4508  fi
4509done
4510  done
4511IFS=$as_save_IFS
4512
4513  ;;
4514esac
4515fi
4516BASENAME=$ac_cv_path_BASENAME
4517if test -n "$BASENAME"; then
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4519$as_echo "$BASENAME" >&6; }
4520else
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525
4526  test -n "$BASENAME" && break
4527done
4528
4529    else
4530      # If it succeeded, then it was overridden by the user. We will use it
4531      # for the tool.
4532
4533      # First remove it from the list of overridden variables, so we can test
4534      # for unknown variables in the end.
4535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4536
4537      # Check if the provided tool contains a complete path.
4538      tool_specified="$BASENAME"
4539      tool_basename="${tool_specified##*/}"
4540      if test "x$tool_basename" = "x$tool_specified"; then
4541        # A command without a complete path is provided, search $PATH.
4542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4543$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4544        # Extract the first word of "$tool_basename", so it can be a program name with args.
4545set dummy $tool_basename; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_path_BASENAME+:} false; then :
4549  $as_echo_n "(cached) " >&6
4550else
4551  case $BASENAME in
4552  [\\/]* | ?:[\\/]*)
4553  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4554  ;;
4555  *)
4556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in $PATH
4558do
4559  IFS=$as_save_IFS
4560  test -z "$as_dir" && as_dir=.
4561    for ac_exec_ext in '' $ac_executable_extensions; do
4562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4565    break 2
4566  fi
4567done
4568  done
4569IFS=$as_save_IFS
4570
4571  ;;
4572esac
4573fi
4574BASENAME=$ac_cv_path_BASENAME
4575if test -n "$BASENAME"; then
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4577$as_echo "$BASENAME" >&6; }
4578else
4579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583
4584        if test "x$BASENAME" = x; then
4585          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4586        fi
4587      else
4588        # Otherwise we believe it is a complete path. Use it as it is.
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4590$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4592$as_echo_n "checking for BASENAME... " >&6; }
4593        if test ! -x "$tool_specified"; then
4594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4595$as_echo "not found" >&6; }
4596          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4597        fi
4598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4599$as_echo "$tool_specified" >&6; }
4600      fi
4601    fi
4602  fi
4603
4604
4605
4606  if test "x$BASENAME" = x; then
4607    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4608  fi
4609
4610
4611
4612
4613
4614  # Publish this variable in the help.
4615
4616
4617  if test "x$BASH" = x; then
4618    # The variable is not set by user, try to locate tool using the code snippet
4619    for ac_prog in bash
4620do
4621  # Extract the first word of "$ac_prog", so it can be a program name with args.
4622set dummy $ac_prog; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_BASH+:} false; then :
4626  $as_echo_n "(cached) " >&6
4627else
4628  case $BASH in
4629  [\\/]* | ?:[\\/]*)
4630  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4631  ;;
4632  *)
4633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in $PATH
4635do
4636  IFS=$as_save_IFS
4637  test -z "$as_dir" && as_dir=.
4638    for ac_exec_ext in '' $ac_executable_extensions; do
4639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4640    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642    break 2
4643  fi
4644done
4645  done
4646IFS=$as_save_IFS
4647
4648  ;;
4649esac
4650fi
4651BASH=$ac_cv_path_BASH
4652if test -n "$BASH"; then
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4654$as_echo "$BASH" >&6; }
4655else
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661  test -n "$BASH" && break
4662done
4663
4664  else
4665    # The variable is set, but is it from the command line or the environment?
4666
4667    # Try to remove the string !BASH! from our list.
4668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4670      # If it failed, the variable was not from the command line. Ignore it,
4671      # but warn the user (except for BASH, which is always set by the calling BASH).
4672      if test "xBASH" != xBASH; then
4673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4674$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4675      fi
4676      # Try to locate tool using the code snippet
4677      for ac_prog in bash
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_BASH+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $BASH in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4698    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709BASH=$ac_cv_path_BASH
4710if test -n "$BASH"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4712$as_echo "$BASH" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$BASH" && break
4720done
4721
4722    else
4723      # If it succeeded, then it was overridden by the user. We will use it
4724      # for the tool.
4725
4726      # First remove it from the list of overridden variables, so we can test
4727      # for unknown variables in the end.
4728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4729
4730      # Check if the provided tool contains a complete path.
4731      tool_specified="$BASH"
4732      tool_basename="${tool_specified##*/}"
4733      if test "x$tool_basename" = "x$tool_specified"; then
4734        # A command without a complete path is provided, search $PATH.
4735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4736$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4737        # Extract the first word of "$tool_basename", so it can be a program name with args.
4738set dummy $tool_basename; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_path_BASH+:} false; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $BASH in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4756    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767BASH=$ac_cv_path_BASH
4768if test -n "$BASH"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4770$as_echo "$BASH" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777        if test "x$BASH" = x; then
4778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4779        fi
4780      else
4781        # Otherwise we believe it is a complete path. Use it as it is.
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4783$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4785$as_echo_n "checking for BASH... " >&6; }
4786        if test ! -x "$tool_specified"; then
4787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4788$as_echo "not found" >&6; }
4789          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4790        fi
4791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4792$as_echo "$tool_specified" >&6; }
4793      fi
4794    fi
4795  fi
4796
4797
4798
4799  if test "x$BASH" = x; then
4800    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4801  fi
4802
4803
4804
4805
4806
4807  # Publish this variable in the help.
4808
4809
4810  if test "x$CAT" = x; then
4811    # The variable is not set by user, try to locate tool using the code snippet
4812    for ac_prog in cat
4813do
4814  # Extract the first word of "$ac_prog", so it can be a program name with args.
4815set dummy $ac_prog; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if ${ac_cv_path_CAT+:} false; then :
4819  $as_echo_n "(cached) " >&6
4820else
4821  case $CAT in
4822  [\\/]* | ?:[\\/]*)
4823  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4824  ;;
4825  *)
4826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829  IFS=$as_save_IFS
4830  test -z "$as_dir" && as_dir=.
4831    for ac_exec_ext in '' $ac_executable_extensions; do
4832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4833    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835    break 2
4836  fi
4837done
4838  done
4839IFS=$as_save_IFS
4840
4841  ;;
4842esac
4843fi
4844CAT=$ac_cv_path_CAT
4845if test -n "$CAT"; then
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4847$as_echo "$CAT" >&6; }
4848else
4849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852
4853
4854  test -n "$CAT" && break
4855done
4856
4857  else
4858    # The variable is set, but is it from the command line or the environment?
4859
4860    # Try to remove the string !CAT! from our list.
4861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4863      # If it failed, the variable was not from the command line. Ignore it,
4864      # but warn the user (except for BASH, which is always set by the calling BASH).
4865      if test "xCAT" != xBASH; then
4866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4867$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4868      fi
4869      # Try to locate tool using the code snippet
4870      for ac_prog in cat
4871do
4872  # Extract the first word of "$ac_prog", so it can be a program name with args.
4873set dummy $ac_prog; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CAT+:} false; then :
4877  $as_echo_n "(cached) " >&6
4878else
4879  case $CAT in
4880  [\\/]* | ?:[\\/]*)
4881  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4882  ;;
4883  *)
4884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4891    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899  ;;
4900esac
4901fi
4902CAT=$ac_cv_path_CAT
4903if test -n "$CAT"; then
4904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4905$as_echo "$CAT" >&6; }
4906else
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
4911
4912  test -n "$CAT" && break
4913done
4914
4915    else
4916      # If it succeeded, then it was overridden by the user. We will use it
4917      # for the tool.
4918
4919      # First remove it from the list of overridden variables, so we can test
4920      # for unknown variables in the end.
4921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4922
4923      # Check if the provided tool contains a complete path.
4924      tool_specified="$CAT"
4925      tool_basename="${tool_specified##*/}"
4926      if test "x$tool_basename" = "x$tool_specified"; then
4927        # A command without a complete path is provided, search $PATH.
4928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4929$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4930        # Extract the first word of "$tool_basename", so it can be a program name with args.
4931set dummy $tool_basename; ac_word=$2
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CAT+:} false; then :
4935  $as_echo_n "(cached) " >&6
4936else
4937  case $CAT in
4938  [\\/]* | ?:[\\/]*)
4939  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4940  ;;
4941  *)
4942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in $PATH
4944do
4945  IFS=$as_save_IFS
4946  test -z "$as_dir" && as_dir=.
4947    for ac_exec_ext in '' $ac_executable_extensions; do
4948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4949    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951    break 2
4952  fi
4953done
4954  done
4955IFS=$as_save_IFS
4956
4957  ;;
4958esac
4959fi
4960CAT=$ac_cv_path_CAT
4961if test -n "$CAT"; then
4962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4963$as_echo "$CAT" >&6; }
4964else
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
4969
4970        if test "x$CAT" = x; then
4971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4972        fi
4973      else
4974        # Otherwise we believe it is a complete path. Use it as it is.
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4976$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4978$as_echo_n "checking for CAT... " >&6; }
4979        if test ! -x "$tool_specified"; then
4980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4981$as_echo "not found" >&6; }
4982          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4983        fi
4984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4985$as_echo "$tool_specified" >&6; }
4986      fi
4987    fi
4988  fi
4989
4990
4991
4992  if test "x$CAT" = x; then
4993    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4994  fi
4995
4996
4997
4998
4999
5000  # Publish this variable in the help.
5001
5002
5003  if test "x$CHMOD" = x; then
5004    # The variable is not set by user, try to locate tool using the code snippet
5005    for ac_prog in chmod
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if ${ac_cv_path_CHMOD+:} false; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $CHMOD in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037CHMOD=$ac_cv_path_CHMOD
5038if test -n "$CHMOD"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5040$as_echo "$CHMOD" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$CHMOD" && break
5048done
5049
5050  else
5051    # The variable is set, but is it from the command line or the environment?
5052
5053    # Try to remove the string !CHMOD! from our list.
5054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5056      # If it failed, the variable was not from the command line. Ignore it,
5057      # but warn the user (except for BASH, which is always set by the calling BASH).
5058      if test "xCHMOD" != xBASH; then
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5060$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5061      fi
5062      # Try to locate tool using the code snippet
5063      for ac_prog in chmod
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if ${ac_cv_path_CHMOD+:} false; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $CHMOD in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095CHMOD=$ac_cv_path_CHMOD
5096if test -n "$CHMOD"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5098$as_echo "$CHMOD" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$CHMOD" && break
5106done
5107
5108    else
5109      # If it succeeded, then it was overridden by the user. We will use it
5110      # for the tool.
5111
5112      # First remove it from the list of overridden variables, so we can test
5113      # for unknown variables in the end.
5114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5115
5116      # Check if the provided tool contains a complete path.
5117      tool_specified="$CHMOD"
5118      tool_basename="${tool_specified##*/}"
5119      if test "x$tool_basename" = "x$tool_specified"; then
5120        # A command without a complete path is provided, search $PATH.
5121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5122$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5123        # Extract the first word of "$tool_basename", so it can be a program name with args.
5124set dummy $tool_basename; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_path_CHMOD+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  case $CHMOD in
5131  [\\/]* | ?:[\\/]*)
5132  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5133  ;;
5134  *)
5135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  test -z "$as_dir" && as_dir=.
5140    for ac_exec_ext in '' $ac_executable_extensions; do
5141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144    break 2
5145  fi
5146done
5147  done
5148IFS=$as_save_IFS
5149
5150  ;;
5151esac
5152fi
5153CHMOD=$ac_cv_path_CHMOD
5154if test -n "$CHMOD"; then
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5156$as_echo "$CHMOD" >&6; }
5157else
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163        if test "x$CHMOD" = x; then
5164          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5165        fi
5166      else
5167        # Otherwise we believe it is a complete path. Use it as it is.
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5169$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5171$as_echo_n "checking for CHMOD... " >&6; }
5172        if test ! -x "$tool_specified"; then
5173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5174$as_echo "not found" >&6; }
5175          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5178$as_echo "$tool_specified" >&6; }
5179      fi
5180    fi
5181  fi
5182
5183
5184
5185  if test "x$CHMOD" = x; then
5186    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5187  fi
5188
5189
5190
5191
5192
5193  # Publish this variable in the help.
5194
5195
5196  if test "x$CMP" = x; then
5197    # The variable is not set by user, try to locate tool using the code snippet
5198    for ac_prog in cmp
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_CMP+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $CMP in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230CMP=$ac_cv_path_CMP
5231if test -n "$CMP"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5233$as_echo "$CMP" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$CMP" && break
5241done
5242
5243  else
5244    # The variable is set, but is it from the command line or the environment?
5245
5246    # Try to remove the string !CMP! from our list.
5247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5249      # If it failed, the variable was not from the command line. Ignore it,
5250      # but warn the user (except for BASH, which is always set by the calling BASH).
5251      if test "xCMP" != xBASH; then
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5253$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5254      fi
5255      # Try to locate tool using the code snippet
5256      for ac_prog in cmp
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_CMP+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $CMP in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288CMP=$ac_cv_path_CMP
5289if test -n "$CMP"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5291$as_echo "$CMP" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$CMP" && break
5299done
5300
5301    else
5302      # If it succeeded, then it was overridden by the user. We will use it
5303      # for the tool.
5304
5305      # First remove it from the list of overridden variables, so we can test
5306      # for unknown variables in the end.
5307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5308
5309      # Check if the provided tool contains a complete path.
5310      tool_specified="$CMP"
5311      tool_basename="${tool_specified##*/}"
5312      if test "x$tool_basename" = "x$tool_specified"; then
5313        # A command without a complete path is provided, search $PATH.
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5315$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5316        # Extract the first word of "$tool_basename", so it can be a program name with args.
5317set dummy $tool_basename; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if ${ac_cv_path_CMP+:} false; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $CMP in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346CMP=$ac_cv_path_CMP
5347if test -n "$CMP"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5349$as_echo "$CMP" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356        if test "x$CMP" = x; then
5357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5358        fi
5359      else
5360        # Otherwise we believe it is a complete path. Use it as it is.
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5362$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5364$as_echo_n "checking for CMP... " >&6; }
5365        if test ! -x "$tool_specified"; then
5366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5367$as_echo "not found" >&6; }
5368          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5369        fi
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5371$as_echo "$tool_specified" >&6; }
5372      fi
5373    fi
5374  fi
5375
5376
5377
5378  if test "x$CMP" = x; then
5379    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5380  fi
5381
5382
5383
5384
5385
5386  # Publish this variable in the help.
5387
5388
5389  if test "x$COMM" = x; then
5390    # The variable is not set by user, try to locate tool using the code snippet
5391    for ac_prog in comm
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if ${ac_cv_path_COMM+:} false; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $COMM in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423COMM=$ac_cv_path_COMM
5424if test -n "$COMM"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5426$as_echo "$COMM" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$COMM" && break
5434done
5435
5436  else
5437    # The variable is set, but is it from the command line or the environment?
5438
5439    # Try to remove the string !COMM! from our list.
5440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5442      # If it failed, the variable was not from the command line. Ignore it,
5443      # but warn the user (except for BASH, which is always set by the calling BASH).
5444      if test "xCOMM" != xBASH; then
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5446$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5447      fi
5448      # Try to locate tool using the code snippet
5449      for ac_prog in comm
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if ${ac_cv_path_COMM+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $COMM in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481COMM=$ac_cv_path_COMM
5482if test -n "$COMM"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5484$as_echo "$COMM" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$COMM" && break
5492done
5493
5494    else
5495      # If it succeeded, then it was overridden by the user. We will use it
5496      # for the tool.
5497
5498      # First remove it from the list of overridden variables, so we can test
5499      # for unknown variables in the end.
5500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5501
5502      # Check if the provided tool contains a complete path.
5503      tool_specified="$COMM"
5504      tool_basename="${tool_specified##*/}"
5505      if test "x$tool_basename" = "x$tool_specified"; then
5506        # A command without a complete path is provided, search $PATH.
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5508$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5509        # Extract the first word of "$tool_basename", so it can be a program name with args.
5510set dummy $tool_basename; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_COMM+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $COMM in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539COMM=$ac_cv_path_COMM
5540if test -n "$COMM"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5542$as_echo "$COMM" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549        if test "x$COMM" = x; then
5550          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5551        fi
5552      else
5553        # Otherwise we believe it is a complete path. Use it as it is.
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5555$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5557$as_echo_n "checking for COMM... " >&6; }
5558        if test ! -x "$tool_specified"; then
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5560$as_echo "not found" >&6; }
5561          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5562        fi
5563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5564$as_echo "$tool_specified" >&6; }
5565      fi
5566    fi
5567  fi
5568
5569
5570
5571  if test "x$COMM" = x; then
5572    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5573  fi
5574
5575
5576
5577
5578
5579  # Publish this variable in the help.
5580
5581
5582  if test "x$CP" = x; then
5583    # The variable is not set by user, try to locate tool using the code snippet
5584    for ac_prog in cp
5585do
5586  # Extract the first word of "$ac_prog", so it can be a program name with args.
5587set dummy $ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_path_CP+:} false; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $CP in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5605    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616CP=$ac_cv_path_CP
5617if test -n "$CP"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5619$as_echo "$CP" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626  test -n "$CP" && break
5627done
5628
5629  else
5630    # The variable is set, but is it from the command line or the environment?
5631
5632    # Try to remove the string !CP! from our list.
5633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5635      # If it failed, the variable was not from the command line. Ignore it,
5636      # but warn the user (except for BASH, which is always set by the calling BASH).
5637      if test "xCP" != xBASH; then
5638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5639$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5640      fi
5641      # Try to locate tool using the code snippet
5642      for ac_prog in cp
5643do
5644  # Extract the first word of "$ac_prog", so it can be a program name with args.
5645set dummy $ac_prog; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_path_CP+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  case $CP in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5657for as_dir in $PATH
5658do
5659  IFS=$as_save_IFS
5660  test -z "$as_dir" && as_dir=.
5661    for ac_exec_ext in '' $ac_executable_extensions; do
5662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5663    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5665    break 2
5666  fi
5667done
5668  done
5669IFS=$as_save_IFS
5670
5671  ;;
5672esac
5673fi
5674CP=$ac_cv_path_CP
5675if test -n "$CP"; then
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5677$as_echo "$CP" >&6; }
5678else
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
5681fi
5682
5683
5684  test -n "$CP" && break
5685done
5686
5687    else
5688      # If it succeeded, then it was overridden by the user. We will use it
5689      # for the tool.
5690
5691      # First remove it from the list of overridden variables, so we can test
5692      # for unknown variables in the end.
5693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5694
5695      # Check if the provided tool contains a complete path.
5696      tool_specified="$CP"
5697      tool_basename="${tool_specified##*/}"
5698      if test "x$tool_basename" = "x$tool_specified"; then
5699        # A command without a complete path is provided, search $PATH.
5700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5701$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5702        # Extract the first word of "$tool_basename", so it can be a program name with args.
5703set dummy $tool_basename; ac_word=$2
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5705$as_echo_n "checking for $ac_word... " >&6; }
5706if ${ac_cv_path_CP+:} false; then :
5707  $as_echo_n "(cached) " >&6
5708else
5709  case $CP in
5710  [\\/]* | ?:[\\/]*)
5711  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5712  ;;
5713  *)
5714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717  IFS=$as_save_IFS
5718  test -z "$as_dir" && as_dir=.
5719    for ac_exec_ext in '' $ac_executable_extensions; do
5720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5721    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5723    break 2
5724  fi
5725done
5726  done
5727IFS=$as_save_IFS
5728
5729  ;;
5730esac
5731fi
5732CP=$ac_cv_path_CP
5733if test -n "$CP"; then
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5735$as_echo "$CP" >&6; }
5736else
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
5739fi
5740
5741
5742        if test "x$CP" = x; then
5743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5744        fi
5745      else
5746        # Otherwise we believe it is a complete path. Use it as it is.
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5748$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5750$as_echo_n "checking for CP... " >&6; }
5751        if test ! -x "$tool_specified"; then
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5753$as_echo "not found" >&6; }
5754          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5755        fi
5756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5757$as_echo "$tool_specified" >&6; }
5758      fi
5759    fi
5760  fi
5761
5762
5763
5764  if test "x$CP" = x; then
5765    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5766  fi
5767
5768
5769
5770
5771
5772  # Publish this variable in the help.
5773
5774
5775  if test "x$CUT" = x; then
5776    # The variable is not set by user, try to locate tool using the code snippet
5777    for ac_prog in cut
5778do
5779  # Extract the first word of "$ac_prog", so it can be a program name with args.
5780set dummy $ac_prog; ac_word=$2
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5782$as_echo_n "checking for $ac_word... " >&6; }
5783if ${ac_cv_path_CUT+:} false; then :
5784  $as_echo_n "(cached) " >&6
5785else
5786  case $CUT in
5787  [\\/]* | ?:[\\/]*)
5788  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5789  ;;
5790  *)
5791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5792for as_dir in $PATH
5793do
5794  IFS=$as_save_IFS
5795  test -z "$as_dir" && as_dir=.
5796    for ac_exec_ext in '' $ac_executable_extensions; do
5797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5798    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5800    break 2
5801  fi
5802done
5803  done
5804IFS=$as_save_IFS
5805
5806  ;;
5807esac
5808fi
5809CUT=$ac_cv_path_CUT
5810if test -n "$CUT"; then
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5812$as_echo "$CUT" >&6; }
5813else
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819  test -n "$CUT" && break
5820done
5821
5822  else
5823    # The variable is set, but is it from the command line or the environment?
5824
5825    # Try to remove the string !CUT! from our list.
5826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5828      # If it failed, the variable was not from the command line. Ignore it,
5829      # but warn the user (except for BASH, which is always set by the calling BASH).
5830      if test "xCUT" != xBASH; then
5831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5832$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5833      fi
5834      # Try to locate tool using the code snippet
5835      for ac_prog in cut
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_CUT+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $CUT in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867CUT=$ac_cv_path_CUT
5868if test -n "$CUT"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5870$as_echo "$CUT" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$CUT" && break
5878done
5879
5880    else
5881      # If it succeeded, then it was overridden by the user. We will use it
5882      # for the tool.
5883
5884      # First remove it from the list of overridden variables, so we can test
5885      # for unknown variables in the end.
5886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5887
5888      # Check if the provided tool contains a complete path.
5889      tool_specified="$CUT"
5890      tool_basename="${tool_specified##*/}"
5891      if test "x$tool_basename" = "x$tool_specified"; then
5892        # A command without a complete path is provided, search $PATH.
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5894$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5895        # Extract the first word of "$tool_basename", so it can be a program name with args.
5896set dummy $tool_basename; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CUT+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CUT in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CUT=$ac_cv_path_CUT
5926if test -n "$CUT"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5928$as_echo "$CUT" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935        if test "x$CUT" = x; then
5936          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5937        fi
5938      else
5939        # Otherwise we believe it is a complete path. Use it as it is.
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5941$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5943$as_echo_n "checking for CUT... " >&6; }
5944        if test ! -x "$tool_specified"; then
5945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5946$as_echo "not found" >&6; }
5947          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5948        fi
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5950$as_echo "$tool_specified" >&6; }
5951      fi
5952    fi
5953  fi
5954
5955
5956
5957  if test "x$CUT" = x; then
5958    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5959  fi
5960
5961
5962
5963
5964
5965  # Publish this variable in the help.
5966
5967
5968  if test "x$DATE" = x; then
5969    # The variable is not set by user, try to locate tool using the code snippet
5970    for ac_prog in date
5971do
5972  # Extract the first word of "$ac_prog", so it can be a program name with args.
5973set dummy $ac_prog; ac_word=$2
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975$as_echo_n "checking for $ac_word... " >&6; }
5976if ${ac_cv_path_DATE+:} false; then :
5977  $as_echo_n "(cached) " >&6
5978else
5979  case $DATE in
5980  [\\/]* | ?:[\\/]*)
5981  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5982  ;;
5983  *)
5984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987  IFS=$as_save_IFS
5988  test -z "$as_dir" && as_dir=.
5989    for ac_exec_ext in '' $ac_executable_extensions; do
5990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5991    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993    break 2
5994  fi
5995done
5996  done
5997IFS=$as_save_IFS
5998
5999  ;;
6000esac
6001fi
6002DATE=$ac_cv_path_DATE
6003if test -n "$DATE"; then
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6005$as_echo "$DATE" >&6; }
6006else
6007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
6009fi
6010
6011
6012  test -n "$DATE" && break
6013done
6014
6015  else
6016    # The variable is set, but is it from the command line or the environment?
6017
6018    # Try to remove the string !DATE! from our list.
6019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6021      # If it failed, the variable was not from the command line. Ignore it,
6022      # but warn the user (except for BASH, which is always set by the calling BASH).
6023      if test "xDATE" != xBASH; then
6024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6025$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6026      fi
6027      # Try to locate tool using the code snippet
6028      for ac_prog in date
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_path_DATE+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  case $DATE in
6038  [\\/]* | ?:[\\/]*)
6039  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6040  ;;
6041  *)
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051    break 2
6052  fi
6053done
6054  done
6055IFS=$as_save_IFS
6056
6057  ;;
6058esac
6059fi
6060DATE=$ac_cv_path_DATE
6061if test -n "$DATE"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6063$as_echo "$DATE" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  test -n "$DATE" && break
6071done
6072
6073    else
6074      # If it succeeded, then it was overridden by the user. We will use it
6075      # for the tool.
6076
6077      # First remove it from the list of overridden variables, so we can test
6078      # for unknown variables in the end.
6079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6080
6081      # Check if the provided tool contains a complete path.
6082      tool_specified="$DATE"
6083      tool_basename="${tool_specified##*/}"
6084      if test "x$tool_basename" = "x$tool_specified"; then
6085        # A command without a complete path is provided, search $PATH.
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6087$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6088        # Extract the first word of "$tool_basename", so it can be a program name with args.
6089set dummy $tool_basename; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_DATE+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $DATE in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118DATE=$ac_cv_path_DATE
6119if test -n "$DATE"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6121$as_echo "$DATE" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128        if test "x$DATE" = x; then
6129          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6130        fi
6131      else
6132        # Otherwise we believe it is a complete path. Use it as it is.
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6134$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6136$as_echo_n "checking for DATE... " >&6; }
6137        if test ! -x "$tool_specified"; then
6138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139$as_echo "not found" >&6; }
6140          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6141        fi
6142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6143$as_echo "$tool_specified" >&6; }
6144      fi
6145    fi
6146  fi
6147
6148
6149
6150  if test "x$DATE" = x; then
6151    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6152  fi
6153
6154
6155
6156
6157
6158  # Publish this variable in the help.
6159
6160
6161  if test "x$DIFF" = x; then
6162    # The variable is not set by user, try to locate tool using the code snippet
6163    for ac_prog in gdiff diff
6164do
6165  # Extract the first word of "$ac_prog", so it can be a program name with args.
6166set dummy $ac_prog; ac_word=$2
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6168$as_echo_n "checking for $ac_word... " >&6; }
6169if ${ac_cv_path_DIFF+:} false; then :
6170  $as_echo_n "(cached) " >&6
6171else
6172  case $DIFF in
6173  [\\/]* | ?:[\\/]*)
6174  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6175  ;;
6176  *)
6177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180  IFS=$as_save_IFS
6181  test -z "$as_dir" && as_dir=.
6182    for ac_exec_ext in '' $ac_executable_extensions; do
6183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6184    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186    break 2
6187  fi
6188done
6189  done
6190IFS=$as_save_IFS
6191
6192  ;;
6193esac
6194fi
6195DIFF=$ac_cv_path_DIFF
6196if test -n "$DIFF"; then
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6198$as_echo "$DIFF" >&6; }
6199else
6200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }
6202fi
6203
6204
6205  test -n "$DIFF" && break
6206done
6207
6208  else
6209    # The variable is set, but is it from the command line or the environment?
6210
6211    # Try to remove the string !DIFF! from our list.
6212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6214      # If it failed, the variable was not from the command line. Ignore it,
6215      # but warn the user (except for BASH, which is always set by the calling BASH).
6216      if test "xDIFF" != xBASH; then
6217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6218$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6219      fi
6220      # Try to locate tool using the code snippet
6221      for ac_prog in gdiff diff
6222do
6223  # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_path_DIFF+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  case $DIFF in
6231  [\\/]* | ?:[\\/]*)
6232  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6233  ;;
6234  *)
6235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238  IFS=$as_save_IFS
6239  test -z "$as_dir" && as_dir=.
6240    for ac_exec_ext in '' $ac_executable_extensions; do
6241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244    break 2
6245  fi
6246done
6247  done
6248IFS=$as_save_IFS
6249
6250  ;;
6251esac
6252fi
6253DIFF=$ac_cv_path_DIFF
6254if test -n "$DIFF"; then
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6256$as_echo "$DIFF" >&6; }
6257else
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263  test -n "$DIFF" && break
6264done
6265
6266    else
6267      # If it succeeded, then it was overridden by the user. We will use it
6268      # for the tool.
6269
6270      # First remove it from the list of overridden variables, so we can test
6271      # for unknown variables in the end.
6272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6273
6274      # Check if the provided tool contains a complete path.
6275      tool_specified="$DIFF"
6276      tool_basename="${tool_specified##*/}"
6277      if test "x$tool_basename" = "x$tool_specified"; then
6278        # A command without a complete path is provided, search $PATH.
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6280$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6281        # Extract the first word of "$tool_basename", so it can be a program name with args.
6282set dummy $tool_basename; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_DIFF+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $DIFF in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311DIFF=$ac_cv_path_DIFF
6312if test -n "$DIFF"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6314$as_echo "$DIFF" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321        if test "x$DIFF" = x; then
6322          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6323        fi
6324      else
6325        # Otherwise we believe it is a complete path. Use it as it is.
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6327$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6329$as_echo_n "checking for DIFF... " >&6; }
6330        if test ! -x "$tool_specified"; then
6331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6332$as_echo "not found" >&6; }
6333          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6334        fi
6335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6336$as_echo "$tool_specified" >&6; }
6337      fi
6338    fi
6339  fi
6340
6341
6342
6343  if test "x$DIFF" = x; then
6344    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6345  fi
6346
6347
6348
6349
6350
6351  # Publish this variable in the help.
6352
6353
6354  if test "x$DIRNAME" = x; then
6355    # The variable is not set by user, try to locate tool using the code snippet
6356    for ac_prog in dirname
6357do
6358  # Extract the first word of "$ac_prog", so it can be a program name with args.
6359set dummy $ac_prog; ac_word=$2
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361$as_echo_n "checking for $ac_word... " >&6; }
6362if ${ac_cv_path_DIRNAME+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365  case $DIRNAME in
6366  [\\/]* | ?:[\\/]*)
6367  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6368  ;;
6369  *)
6370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371for as_dir in $PATH
6372do
6373  IFS=$as_save_IFS
6374  test -z "$as_dir" && as_dir=.
6375    for ac_exec_ext in '' $ac_executable_extensions; do
6376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6377    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6379    break 2
6380  fi
6381done
6382  done
6383IFS=$as_save_IFS
6384
6385  ;;
6386esac
6387fi
6388DIRNAME=$ac_cv_path_DIRNAME
6389if test -n "$DIRNAME"; then
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6391$as_echo "$DIRNAME" >&6; }
6392else
6393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397
6398  test -n "$DIRNAME" && break
6399done
6400
6401  else
6402    # The variable is set, but is it from the command line or the environment?
6403
6404    # Try to remove the string !DIRNAME! from our list.
6405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6407      # If it failed, the variable was not from the command line. Ignore it,
6408      # but warn the user (except for BASH, which is always set by the calling BASH).
6409      if test "xDIRNAME" != xBASH; then
6410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6411$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6412      fi
6413      # Try to locate tool using the code snippet
6414      for ac_prog in dirname
6415do
6416  # Extract the first word of "$ac_prog", so it can be a program name with args.
6417set dummy $ac_prog; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_DIRNAME+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DIRNAME in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DIRNAME=$ac_cv_path_DIRNAME
6447if test -n "$DIRNAME"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6449$as_echo "$DIRNAME" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456  test -n "$DIRNAME" && break
6457done
6458
6459    else
6460      # If it succeeded, then it was overridden by the user. We will use it
6461      # for the tool.
6462
6463      # First remove it from the list of overridden variables, so we can test
6464      # for unknown variables in the end.
6465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6466
6467      # Check if the provided tool contains a complete path.
6468      tool_specified="$DIRNAME"
6469      tool_basename="${tool_specified##*/}"
6470      if test "x$tool_basename" = "x$tool_specified"; then
6471        # A command without a complete path is provided, search $PATH.
6472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6473$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6474        # Extract the first word of "$tool_basename", so it can be a program name with args.
6475set dummy $tool_basename; ac_word=$2
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6477$as_echo_n "checking for $ac_word... " >&6; }
6478if ${ac_cv_path_DIRNAME+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  case $DIRNAME in
6482  [\\/]* | ?:[\\/]*)
6483  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6484  ;;
6485  *)
6486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487for as_dir in $PATH
6488do
6489  IFS=$as_save_IFS
6490  test -z "$as_dir" && as_dir=.
6491    for ac_exec_ext in '' $ac_executable_extensions; do
6492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495    break 2
6496  fi
6497done
6498  done
6499IFS=$as_save_IFS
6500
6501  ;;
6502esac
6503fi
6504DIRNAME=$ac_cv_path_DIRNAME
6505if test -n "$DIRNAME"; then
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6507$as_echo "$DIRNAME" >&6; }
6508else
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
6511fi
6512
6513
6514        if test "x$DIRNAME" = x; then
6515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6516        fi
6517      else
6518        # Otherwise we believe it is a complete path. Use it as it is.
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6520$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6522$as_echo_n "checking for DIRNAME... " >&6; }
6523        if test ! -x "$tool_specified"; then
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6525$as_echo "not found" >&6; }
6526          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6527        fi
6528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6529$as_echo "$tool_specified" >&6; }
6530      fi
6531    fi
6532  fi
6533
6534
6535
6536  if test "x$DIRNAME" = x; then
6537    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6538  fi
6539
6540
6541
6542
6543
6544  # Publish this variable in the help.
6545
6546
6547  if test "x$ECHO" = x; then
6548    # The variable is not set by user, try to locate tool using the code snippet
6549    for ac_prog in echo
6550do
6551  # Extract the first word of "$ac_prog", so it can be a program name with args.
6552set dummy $ac_prog; ac_word=$2
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554$as_echo_n "checking for $ac_word... " >&6; }
6555if ${ac_cv_path_ECHO+:} false; then :
6556  $as_echo_n "(cached) " >&6
6557else
6558  case $ECHO in
6559  [\\/]* | ?:[\\/]*)
6560  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6561  ;;
6562  *)
6563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564for as_dir in $PATH
6565do
6566  IFS=$as_save_IFS
6567  test -z "$as_dir" && as_dir=.
6568    for ac_exec_ext in '' $ac_executable_extensions; do
6569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6570    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572    break 2
6573  fi
6574done
6575  done
6576IFS=$as_save_IFS
6577
6578  ;;
6579esac
6580fi
6581ECHO=$ac_cv_path_ECHO
6582if test -n "$ECHO"; then
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6584$as_echo "$ECHO" >&6; }
6585else
6586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590
6591  test -n "$ECHO" && break
6592done
6593
6594  else
6595    # The variable is set, but is it from the command line or the environment?
6596
6597    # Try to remove the string !ECHO! from our list.
6598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6600      # If it failed, the variable was not from the command line. Ignore it,
6601      # but warn the user (except for BASH, which is always set by the calling BASH).
6602      if test "xECHO" != xBASH; then
6603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6604$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6605      fi
6606      # Try to locate tool using the code snippet
6607      for ac_prog in echo
6608do
6609  # Extract the first word of "$ac_prog", so it can be a program name with args.
6610set dummy $ac_prog; ac_word=$2
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612$as_echo_n "checking for $ac_word... " >&6; }
6613if ${ac_cv_path_ECHO+:} false; then :
6614  $as_echo_n "(cached) " >&6
6615else
6616  case $ECHO in
6617  [\\/]* | ?:[\\/]*)
6618  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6619  ;;
6620  *)
6621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622for as_dir in $PATH
6623do
6624  IFS=$as_save_IFS
6625  test -z "$as_dir" && as_dir=.
6626    for ac_exec_ext in '' $ac_executable_extensions; do
6627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630    break 2
6631  fi
6632done
6633  done
6634IFS=$as_save_IFS
6635
6636  ;;
6637esac
6638fi
6639ECHO=$ac_cv_path_ECHO
6640if test -n "$ECHO"; then
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6642$as_echo "$ECHO" >&6; }
6643else
6644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
6646fi
6647
6648
6649  test -n "$ECHO" && break
6650done
6651
6652    else
6653      # If it succeeded, then it was overridden by the user. We will use it
6654      # for the tool.
6655
6656      # First remove it from the list of overridden variables, so we can test
6657      # for unknown variables in the end.
6658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6659
6660      # Check if the provided tool contains a complete path.
6661      tool_specified="$ECHO"
6662      tool_basename="${tool_specified##*/}"
6663      if test "x$tool_basename" = "x$tool_specified"; then
6664        # A command without a complete path is provided, search $PATH.
6665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6666$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6667        # Extract the first word of "$tool_basename", so it can be a program name with args.
6668set dummy $tool_basename; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if ${ac_cv_path_ECHO+:} false; then :
6672  $as_echo_n "(cached) " >&6
6673else
6674  case $ECHO in
6675  [\\/]* | ?:[\\/]*)
6676  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6677  ;;
6678  *)
6679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in $PATH
6681do
6682  IFS=$as_save_IFS
6683  test -z "$as_dir" && as_dir=.
6684    for ac_exec_ext in '' $ac_executable_extensions; do
6685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6686    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6688    break 2
6689  fi
6690done
6691  done
6692IFS=$as_save_IFS
6693
6694  ;;
6695esac
6696fi
6697ECHO=$ac_cv_path_ECHO
6698if test -n "$ECHO"; then
6699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6700$as_echo "$ECHO" >&6; }
6701else
6702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6703$as_echo "no" >&6; }
6704fi
6705
6706
6707        if test "x$ECHO" = x; then
6708          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6709        fi
6710      else
6711        # Otherwise we believe it is a complete path. Use it as it is.
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6713$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6715$as_echo_n "checking for ECHO... " >&6; }
6716        if test ! -x "$tool_specified"; then
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6718$as_echo "not found" >&6; }
6719          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6720        fi
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6722$as_echo "$tool_specified" >&6; }
6723      fi
6724    fi
6725  fi
6726
6727
6728
6729  if test "x$ECHO" = x; then
6730    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6731  fi
6732
6733
6734
6735
6736
6737  # Publish this variable in the help.
6738
6739
6740  if test "x$EXPR" = x; then
6741    # The variable is not set by user, try to locate tool using the code snippet
6742    for ac_prog in expr
6743do
6744  # Extract the first word of "$ac_prog", so it can be a program name with args.
6745set dummy $ac_prog; ac_word=$2
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6747$as_echo_n "checking for $ac_word... " >&6; }
6748if ${ac_cv_path_EXPR+:} false; then :
6749  $as_echo_n "(cached) " >&6
6750else
6751  case $EXPR in
6752  [\\/]* | ?:[\\/]*)
6753  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6754  ;;
6755  *)
6756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757for as_dir in $PATH
6758do
6759  IFS=$as_save_IFS
6760  test -z "$as_dir" && as_dir=.
6761    for ac_exec_ext in '' $ac_executable_extensions; do
6762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6763    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6765    break 2
6766  fi
6767done
6768  done
6769IFS=$as_save_IFS
6770
6771  ;;
6772esac
6773fi
6774EXPR=$ac_cv_path_EXPR
6775if test -n "$EXPR"; then
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6777$as_echo "$EXPR" >&6; }
6778else
6779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780$as_echo "no" >&6; }
6781fi
6782
6783
6784  test -n "$EXPR" && break
6785done
6786
6787  else
6788    # The variable is set, but is it from the command line or the environment?
6789
6790    # Try to remove the string !EXPR! from our list.
6791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6793      # If it failed, the variable was not from the command line. Ignore it,
6794      # but warn the user (except for BASH, which is always set by the calling BASH).
6795      if test "xEXPR" != xBASH; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6797$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6798      fi
6799      # Try to locate tool using the code snippet
6800      for ac_prog in expr
6801do
6802  # Extract the first word of "$ac_prog", so it can be a program name with args.
6803set dummy $ac_prog; ac_word=$2
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if ${ac_cv_path_EXPR+:} false; then :
6807  $as_echo_n "(cached) " >&6
6808else
6809  case $EXPR in
6810  [\\/]* | ?:[\\/]*)
6811  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6812  ;;
6813  *)
6814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817  IFS=$as_save_IFS
6818  test -z "$as_dir" && as_dir=.
6819    for ac_exec_ext in '' $ac_executable_extensions; do
6820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6821    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6823    break 2
6824  fi
6825done
6826  done
6827IFS=$as_save_IFS
6828
6829  ;;
6830esac
6831fi
6832EXPR=$ac_cv_path_EXPR
6833if test -n "$EXPR"; then
6834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6835$as_echo "$EXPR" >&6; }
6836else
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6838$as_echo "no" >&6; }
6839fi
6840
6841
6842  test -n "$EXPR" && break
6843done
6844
6845    else
6846      # If it succeeded, then it was overridden by the user. We will use it
6847      # for the tool.
6848
6849      # First remove it from the list of overridden variables, so we can test
6850      # for unknown variables in the end.
6851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6852
6853      # Check if the provided tool contains a complete path.
6854      tool_specified="$EXPR"
6855      tool_basename="${tool_specified##*/}"
6856      if test "x$tool_basename" = "x$tool_specified"; then
6857        # A command without a complete path is provided, search $PATH.
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6859$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6860        # Extract the first word of "$tool_basename", so it can be a program name with args.
6861set dummy $tool_basename; ac_word=$2
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6863$as_echo_n "checking for $ac_word... " >&6; }
6864if ${ac_cv_path_EXPR+:} false; then :
6865  $as_echo_n "(cached) " >&6
6866else
6867  case $EXPR in
6868  [\\/]* | ?:[\\/]*)
6869  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6870  ;;
6871  *)
6872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6873for as_dir in $PATH
6874do
6875  IFS=$as_save_IFS
6876  test -z "$as_dir" && as_dir=.
6877    for ac_exec_ext in '' $ac_executable_extensions; do
6878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6879    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6881    break 2
6882  fi
6883done
6884  done
6885IFS=$as_save_IFS
6886
6887  ;;
6888esac
6889fi
6890EXPR=$ac_cv_path_EXPR
6891if test -n "$EXPR"; then
6892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6893$as_echo "$EXPR" >&6; }
6894else
6895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896$as_echo "no" >&6; }
6897fi
6898
6899
6900        if test "x$EXPR" = x; then
6901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6902        fi
6903      else
6904        # Otherwise we believe it is a complete path. Use it as it is.
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6906$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6908$as_echo_n "checking for EXPR... " >&6; }
6909        if test ! -x "$tool_specified"; then
6910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6911$as_echo "not found" >&6; }
6912          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6913        fi
6914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6915$as_echo "$tool_specified" >&6; }
6916      fi
6917    fi
6918  fi
6919
6920
6921
6922  if test "x$EXPR" = x; then
6923    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6924  fi
6925
6926
6927
6928
6929
6930  # Publish this variable in the help.
6931
6932
6933  if test "x$FILE" = x; then
6934    # The variable is not set by user, try to locate tool using the code snippet
6935    for ac_prog in file
6936do
6937  # Extract the first word of "$ac_prog", so it can be a program name with args.
6938set dummy $ac_prog; ac_word=$2
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940$as_echo_n "checking for $ac_word... " >&6; }
6941if ${ac_cv_path_FILE+:} false; then :
6942  $as_echo_n "(cached) " >&6
6943else
6944  case $FILE in
6945  [\\/]* | ?:[\\/]*)
6946  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6947  ;;
6948  *)
6949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950for as_dir in $PATH
6951do
6952  IFS=$as_save_IFS
6953  test -z "$as_dir" && as_dir=.
6954    for ac_exec_ext in '' $ac_executable_extensions; do
6955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958    break 2
6959  fi
6960done
6961  done
6962IFS=$as_save_IFS
6963
6964  ;;
6965esac
6966fi
6967FILE=$ac_cv_path_FILE
6968if test -n "$FILE"; then
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6970$as_echo "$FILE" >&6; }
6971else
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973$as_echo "no" >&6; }
6974fi
6975
6976
6977  test -n "$FILE" && break
6978done
6979
6980  else
6981    # The variable is set, but is it from the command line or the environment?
6982
6983    # Try to remove the string !FILE! from our list.
6984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6986      # If it failed, the variable was not from the command line. Ignore it,
6987      # but warn the user (except for BASH, which is always set by the calling BASH).
6988      if test "xFILE" != xBASH; then
6989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6990$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6991      fi
6992      # Try to locate tool using the code snippet
6993      for ac_prog in file
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_FILE+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $FILE in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025FILE=$ac_cv_path_FILE
7026if test -n "$FILE"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7028$as_echo "$FILE" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$FILE" && break
7036done
7037
7038    else
7039      # If it succeeded, then it was overridden by the user. We will use it
7040      # for the tool.
7041
7042      # First remove it from the list of overridden variables, so we can test
7043      # for unknown variables in the end.
7044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7045
7046      # Check if the provided tool contains a complete path.
7047      tool_specified="$FILE"
7048      tool_basename="${tool_specified##*/}"
7049      if test "x$tool_basename" = "x$tool_specified"; then
7050        # A command without a complete path is provided, search $PATH.
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7052$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7053        # Extract the first word of "$tool_basename", so it can be a program name with args.
7054set dummy $tool_basename; ac_word=$2
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7056$as_echo_n "checking for $ac_word... " >&6; }
7057if ${ac_cv_path_FILE+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  case $FILE in
7061  [\\/]* | ?:[\\/]*)
7062  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7063  ;;
7064  *)
7065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066for as_dir in $PATH
7067do
7068  IFS=$as_save_IFS
7069  test -z "$as_dir" && as_dir=.
7070    for ac_exec_ext in '' $ac_executable_extensions; do
7071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7072    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7074    break 2
7075  fi
7076done
7077  done
7078IFS=$as_save_IFS
7079
7080  ;;
7081esac
7082fi
7083FILE=$ac_cv_path_FILE
7084if test -n "$FILE"; then
7085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7086$as_echo "$FILE" >&6; }
7087else
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089$as_echo "no" >&6; }
7090fi
7091
7092
7093        if test "x$FILE" = x; then
7094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7095        fi
7096      else
7097        # Otherwise we believe it is a complete path. Use it as it is.
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7099$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7101$as_echo_n "checking for FILE... " >&6; }
7102        if test ! -x "$tool_specified"; then
7103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7104$as_echo "not found" >&6; }
7105          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7106        fi
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7108$as_echo "$tool_specified" >&6; }
7109      fi
7110    fi
7111  fi
7112
7113
7114
7115  if test "x$FILE" = x; then
7116    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7117  fi
7118
7119
7120
7121
7122
7123  # Publish this variable in the help.
7124
7125
7126  if test "x$FIND" = x; then
7127    # The variable is not set by user, try to locate tool using the code snippet
7128    for ac_prog in find
7129do
7130  # Extract the first word of "$ac_prog", so it can be a program name with args.
7131set dummy $ac_prog; ac_word=$2
7132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7133$as_echo_n "checking for $ac_word... " >&6; }
7134if ${ac_cv_path_FIND+:} false; then :
7135  $as_echo_n "(cached) " >&6
7136else
7137  case $FIND in
7138  [\\/]* | ?:[\\/]*)
7139  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7140  ;;
7141  *)
7142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143for as_dir in $PATH
7144do
7145  IFS=$as_save_IFS
7146  test -z "$as_dir" && as_dir=.
7147    for ac_exec_ext in '' $ac_executable_extensions; do
7148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7149    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151    break 2
7152  fi
7153done
7154  done
7155IFS=$as_save_IFS
7156
7157  ;;
7158esac
7159fi
7160FIND=$ac_cv_path_FIND
7161if test -n "$FIND"; then
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7163$as_echo "$FIND" >&6; }
7164else
7165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166$as_echo "no" >&6; }
7167fi
7168
7169
7170  test -n "$FIND" && break
7171done
7172
7173  else
7174    # The variable is set, but is it from the command line or the environment?
7175
7176    # Try to remove the string !FIND! from our list.
7177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7179      # If it failed, the variable was not from the command line. Ignore it,
7180      # but warn the user (except for BASH, which is always set by the calling BASH).
7181      if test "xFIND" != xBASH; then
7182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7183$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7184      fi
7185      # Try to locate tool using the code snippet
7186      for ac_prog in find
7187do
7188  # Extract the first word of "$ac_prog", so it can be a program name with args.
7189set dummy $ac_prog; ac_word=$2
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7191$as_echo_n "checking for $ac_word... " >&6; }
7192if ${ac_cv_path_FIND+:} false; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  case $FIND in
7196  [\\/]* | ?:[\\/]*)
7197  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7198  ;;
7199  *)
7200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7201for as_dir in $PATH
7202do
7203  IFS=$as_save_IFS
7204  test -z "$as_dir" && as_dir=.
7205    for ac_exec_ext in '' $ac_executable_extensions; do
7206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7207    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7209    break 2
7210  fi
7211done
7212  done
7213IFS=$as_save_IFS
7214
7215  ;;
7216esac
7217fi
7218FIND=$ac_cv_path_FIND
7219if test -n "$FIND"; then
7220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7221$as_echo "$FIND" >&6; }
7222else
7223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7224$as_echo "no" >&6; }
7225fi
7226
7227
7228  test -n "$FIND" && break
7229done
7230
7231    else
7232      # If it succeeded, then it was overridden by the user. We will use it
7233      # for the tool.
7234
7235      # First remove it from the list of overridden variables, so we can test
7236      # for unknown variables in the end.
7237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7238
7239      # Check if the provided tool contains a complete path.
7240      tool_specified="$FIND"
7241      tool_basename="${tool_specified##*/}"
7242      if test "x$tool_basename" = "x$tool_specified"; then
7243        # A command without a complete path is provided, search $PATH.
7244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7245$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7246        # Extract the first word of "$tool_basename", so it can be a program name with args.
7247set dummy $tool_basename; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_FIND+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $FIND in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276FIND=$ac_cv_path_FIND
7277if test -n "$FIND"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7279$as_echo "$FIND" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286        if test "x$FIND" = x; then
7287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7288        fi
7289      else
7290        # Otherwise we believe it is a complete path. Use it as it is.
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7292$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7294$as_echo_n "checking for FIND... " >&6; }
7295        if test ! -x "$tool_specified"; then
7296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7297$as_echo "not found" >&6; }
7298          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7299        fi
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7301$as_echo "$tool_specified" >&6; }
7302      fi
7303    fi
7304  fi
7305
7306
7307
7308  if test "x$FIND" = x; then
7309    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7310  fi
7311
7312
7313
7314
7315
7316  # Publish this variable in the help.
7317
7318
7319  if test "x$HEAD" = x; then
7320    # The variable is not set by user, try to locate tool using the code snippet
7321    for ac_prog in head
7322do
7323  # Extract the first word of "$ac_prog", so it can be a program name with args.
7324set dummy $ac_prog; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_path_HEAD+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  case $HEAD in
7331  [\\/]* | ?:[\\/]*)
7332  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7333  ;;
7334  *)
7335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350  ;;
7351esac
7352fi
7353HEAD=$ac_cv_path_HEAD
7354if test -n "$HEAD"; then
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7356$as_echo "$HEAD" >&6; }
7357else
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
7360fi
7361
7362
7363  test -n "$HEAD" && break
7364done
7365
7366  else
7367    # The variable is set, but is it from the command line or the environment?
7368
7369    # Try to remove the string !HEAD! from our list.
7370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7372      # If it failed, the variable was not from the command line. Ignore it,
7373      # but warn the user (except for BASH, which is always set by the calling BASH).
7374      if test "xHEAD" != xBASH; then
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7376$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7377      fi
7378      # Try to locate tool using the code snippet
7379      for ac_prog in head
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_HEAD+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $HEAD in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411HEAD=$ac_cv_path_HEAD
7412if test -n "$HEAD"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7414$as_echo "$HEAD" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$HEAD" && break
7422done
7423
7424    else
7425      # If it succeeded, then it was overridden by the user. We will use it
7426      # for the tool.
7427
7428      # First remove it from the list of overridden variables, so we can test
7429      # for unknown variables in the end.
7430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7431
7432      # Check if the provided tool contains a complete path.
7433      tool_specified="$HEAD"
7434      tool_basename="${tool_specified##*/}"
7435      if test "x$tool_basename" = "x$tool_specified"; then
7436        # A command without a complete path is provided, search $PATH.
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7439        # Extract the first word of "$tool_basename", so it can be a program name with args.
7440set dummy $tool_basename; ac_word=$2
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if ${ac_cv_path_HEAD+:} false; then :
7444  $as_echo_n "(cached) " >&6
7445else
7446  case $HEAD in
7447  [\\/]* | ?:[\\/]*)
7448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7449  ;;
7450  *)
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    for ac_exec_ext in '' $ac_executable_extensions; do
7457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460    break 2
7461  fi
7462done
7463  done
7464IFS=$as_save_IFS
7465
7466  ;;
7467esac
7468fi
7469HEAD=$ac_cv_path_HEAD
7470if test -n "$HEAD"; then
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7472$as_echo "$HEAD" >&6; }
7473else
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
7476fi
7477
7478
7479        if test "x$HEAD" = x; then
7480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7481        fi
7482      else
7483        # Otherwise we believe it is a complete path. Use it as it is.
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7487$as_echo_n "checking for HEAD... " >&6; }
7488        if test ! -x "$tool_specified"; then
7489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7490$as_echo "not found" >&6; }
7491          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7492        fi
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7494$as_echo "$tool_specified" >&6; }
7495      fi
7496    fi
7497  fi
7498
7499
7500
7501  if test "x$HEAD" = x; then
7502    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7503  fi
7504
7505
7506
7507
7508
7509  # Publish this variable in the help.
7510
7511
7512  if test "x$LN" = x; then
7513    # The variable is not set by user, try to locate tool using the code snippet
7514    for ac_prog in ln
7515do
7516  # Extract the first word of "$ac_prog", so it can be a program name with args.
7517set dummy $ac_prog; ac_word=$2
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
7520if ${ac_cv_path_LN+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523  case $LN in
7524  [\\/]* | ?:[\\/]*)
7525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7526  ;;
7527  *)
7528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7529for as_dir in $PATH
7530do
7531  IFS=$as_save_IFS
7532  test -z "$as_dir" && as_dir=.
7533    for ac_exec_ext in '' $ac_executable_extensions; do
7534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7537    break 2
7538  fi
7539done
7540  done
7541IFS=$as_save_IFS
7542
7543  ;;
7544esac
7545fi
7546LN=$ac_cv_path_LN
7547if test -n "$LN"; then
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7549$as_echo "$LN" >&6; }
7550else
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
7553fi
7554
7555
7556  test -n "$LN" && break
7557done
7558
7559  else
7560    # The variable is set, but is it from the command line or the environment?
7561
7562    # Try to remove the string !LN! from our list.
7563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7565      # If it failed, the variable was not from the command line. Ignore it,
7566      # but warn the user (except for BASH, which is always set by the calling BASH).
7567      if test "xLN" != xBASH; then
7568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7569$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7570      fi
7571      # Try to locate tool using the code snippet
7572      for ac_prog in ln
7573do
7574  # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if ${ac_cv_path_LN+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581  case $LN in
7582  [\\/]* | ?:[\\/]*)
7583  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7584  ;;
7585  *)
7586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601  ;;
7602esac
7603fi
7604LN=$ac_cv_path_LN
7605if test -n "$LN"; then
7606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7607$as_echo "$LN" >&6; }
7608else
7609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
7611fi
7612
7613
7614  test -n "$LN" && break
7615done
7616
7617    else
7618      # If it succeeded, then it was overridden by the user. We will use it
7619      # for the tool.
7620
7621      # First remove it from the list of overridden variables, so we can test
7622      # for unknown variables in the end.
7623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7624
7625      # Check if the provided tool contains a complete path.
7626      tool_specified="$LN"
7627      tool_basename="${tool_specified##*/}"
7628      if test "x$tool_basename" = "x$tool_specified"; then
7629        # A command without a complete path is provided, search $PATH.
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7631$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7632        # Extract the first word of "$tool_basename", so it can be a program name with args.
7633set dummy $tool_basename; ac_word=$2
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if ${ac_cv_path_LN+:} false; then :
7637  $as_echo_n "(cached) " >&6
7638else
7639  case $LN in
7640  [\\/]* | ?:[\\/]*)
7641  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7642  ;;
7643  *)
7644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7645for as_dir in $PATH
7646do
7647  IFS=$as_save_IFS
7648  test -z "$as_dir" && as_dir=.
7649    for ac_exec_ext in '' $ac_executable_extensions; do
7650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7651    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7653    break 2
7654  fi
7655done
7656  done
7657IFS=$as_save_IFS
7658
7659  ;;
7660esac
7661fi
7662LN=$ac_cv_path_LN
7663if test -n "$LN"; then
7664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7665$as_echo "$LN" >&6; }
7666else
7667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668$as_echo "no" >&6; }
7669fi
7670
7671
7672        if test "x$LN" = x; then
7673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7674        fi
7675      else
7676        # Otherwise we believe it is a complete path. Use it as it is.
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7678$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7680$as_echo_n "checking for LN... " >&6; }
7681        if test ! -x "$tool_specified"; then
7682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7683$as_echo "not found" >&6; }
7684          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7685        fi
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7687$as_echo "$tool_specified" >&6; }
7688      fi
7689    fi
7690  fi
7691
7692
7693
7694  if test "x$LN" = x; then
7695    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7696  fi
7697
7698
7699
7700
7701
7702  # Publish this variable in the help.
7703
7704
7705  if test "x$LS" = x; then
7706    # The variable is not set by user, try to locate tool using the code snippet
7707    for ac_prog in ls
7708do
7709  # Extract the first word of "$ac_prog", so it can be a program name with args.
7710set dummy $ac_prog; ac_word=$2
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
7713if ${ac_cv_path_LS+:} false; then :
7714  $as_echo_n "(cached) " >&6
7715else
7716  case $LS in
7717  [\\/]* | ?:[\\/]*)
7718  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7719  ;;
7720  *)
7721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7722for as_dir in $PATH
7723do
7724  IFS=$as_save_IFS
7725  test -z "$as_dir" && as_dir=.
7726    for ac_exec_ext in '' $ac_executable_extensions; do
7727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7728    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7730    break 2
7731  fi
7732done
7733  done
7734IFS=$as_save_IFS
7735
7736  ;;
7737esac
7738fi
7739LS=$ac_cv_path_LS
7740if test -n "$LS"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7742$as_echo "$LS" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748
7749  test -n "$LS" && break
7750done
7751
7752  else
7753    # The variable is set, but is it from the command line or the environment?
7754
7755    # Try to remove the string !LS! from our list.
7756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7758      # If it failed, the variable was not from the command line. Ignore it,
7759      # but warn the user (except for BASH, which is always set by the calling BASH).
7760      if test "xLS" != xBASH; then
7761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7762$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7763      fi
7764      # Try to locate tool using the code snippet
7765      for ac_prog in ls
7766do
7767  # Extract the first word of "$ac_prog", so it can be a program name with args.
7768set dummy $ac_prog; ac_word=$2
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770$as_echo_n "checking for $ac_word... " >&6; }
7771if ${ac_cv_path_LS+:} false; then :
7772  $as_echo_n "(cached) " >&6
7773else
7774  case $LS in
7775  [\\/]* | ?:[\\/]*)
7776  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7777  ;;
7778  *)
7779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782  IFS=$as_save_IFS
7783  test -z "$as_dir" && as_dir=.
7784    for ac_exec_ext in '' $ac_executable_extensions; do
7785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788    break 2
7789  fi
7790done
7791  done
7792IFS=$as_save_IFS
7793
7794  ;;
7795esac
7796fi
7797LS=$ac_cv_path_LS
7798if test -n "$LS"; then
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7800$as_echo "$LS" >&6; }
7801else
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
7804fi
7805
7806
7807  test -n "$LS" && break
7808done
7809
7810    else
7811      # If it succeeded, then it was overridden by the user. We will use it
7812      # for the tool.
7813
7814      # First remove it from the list of overridden variables, so we can test
7815      # for unknown variables in the end.
7816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7817
7818      # Check if the provided tool contains a complete path.
7819      tool_specified="$LS"
7820      tool_basename="${tool_specified##*/}"
7821      if test "x$tool_basename" = "x$tool_specified"; then
7822        # A command without a complete path is provided, search $PATH.
7823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7824$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7825        # Extract the first word of "$tool_basename", so it can be a program name with args.
7826set dummy $tool_basename; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_LS+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $LS in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855LS=$ac_cv_path_LS
7856if test -n "$LS"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7858$as_echo "$LS" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865        if test "x$LS" = x; then
7866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7867        fi
7868      else
7869        # Otherwise we believe it is a complete path. Use it as it is.
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7871$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7873$as_echo_n "checking for LS... " >&6; }
7874        if test ! -x "$tool_specified"; then
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7876$as_echo "not found" >&6; }
7877          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7878        fi
7879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7880$as_echo "$tool_specified" >&6; }
7881      fi
7882    fi
7883  fi
7884
7885
7886
7887  if test "x$LS" = x; then
7888    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7889  fi
7890
7891
7892
7893
7894
7895  # Publish this variable in the help.
7896
7897
7898  if test "x$MKDIR" = x; then
7899    # The variable is not set by user, try to locate tool using the code snippet
7900    for ac_prog in mkdir
7901do
7902  # Extract the first word of "$ac_prog", so it can be a program name with args.
7903set dummy $ac_prog; ac_word=$2
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7905$as_echo_n "checking for $ac_word... " >&6; }
7906if ${ac_cv_path_MKDIR+:} false; then :
7907  $as_echo_n "(cached) " >&6
7908else
7909  case $MKDIR in
7910  [\\/]* | ?:[\\/]*)
7911  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7912  ;;
7913  *)
7914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7915for as_dir in $PATH
7916do
7917  IFS=$as_save_IFS
7918  test -z "$as_dir" && as_dir=.
7919    for ac_exec_ext in '' $ac_executable_extensions; do
7920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7921    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7923    break 2
7924  fi
7925done
7926  done
7927IFS=$as_save_IFS
7928
7929  ;;
7930esac
7931fi
7932MKDIR=$ac_cv_path_MKDIR
7933if test -n "$MKDIR"; then
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7935$as_echo "$MKDIR" >&6; }
7936else
7937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7938$as_echo "no" >&6; }
7939fi
7940
7941
7942  test -n "$MKDIR" && break
7943done
7944
7945  else
7946    # The variable is set, but is it from the command line or the environment?
7947
7948    # Try to remove the string !MKDIR! from our list.
7949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7951      # If it failed, the variable was not from the command line. Ignore it,
7952      # but warn the user (except for BASH, which is always set by the calling BASH).
7953      if test "xMKDIR" != xBASH; then
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7955$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7956      fi
7957      # Try to locate tool using the code snippet
7958      for ac_prog in mkdir
7959do
7960  # Extract the first word of "$ac_prog", so it can be a program name with args.
7961set dummy $ac_prog; ac_word=$2
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963$as_echo_n "checking for $ac_word... " >&6; }
7964if ${ac_cv_path_MKDIR+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  case $MKDIR in
7968  [\\/]* | ?:[\\/]*)
7969  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7970  ;;
7971  *)
7972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7973for as_dir in $PATH
7974do
7975  IFS=$as_save_IFS
7976  test -z "$as_dir" && as_dir=.
7977    for ac_exec_ext in '' $ac_executable_extensions; do
7978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7979    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7981    break 2
7982  fi
7983done
7984  done
7985IFS=$as_save_IFS
7986
7987  ;;
7988esac
7989fi
7990MKDIR=$ac_cv_path_MKDIR
7991if test -n "$MKDIR"; then
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7993$as_echo "$MKDIR" >&6; }
7994else
7995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
7997fi
7998
7999
8000  test -n "$MKDIR" && break
8001done
8002
8003    else
8004      # If it succeeded, then it was overridden by the user. We will use it
8005      # for the tool.
8006
8007      # First remove it from the list of overridden variables, so we can test
8008      # for unknown variables in the end.
8009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8010
8011      # Check if the provided tool contains a complete path.
8012      tool_specified="$MKDIR"
8013      tool_basename="${tool_specified##*/}"
8014      if test "x$tool_basename" = "x$tool_specified"; then
8015        # A command without a complete path is provided, search $PATH.
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8018        # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_MKDIR+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $MKDIR in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048MKDIR=$ac_cv_path_MKDIR
8049if test -n "$MKDIR"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8051$as_echo "$MKDIR" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058        if test "x$MKDIR" = x; then
8059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060        fi
8061      else
8062        # Otherwise we believe it is a complete path. Use it as it is.
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8066$as_echo_n "checking for MKDIR... " >&6; }
8067        if test ! -x "$tool_specified"; then
8068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8071        fi
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074      fi
8075    fi
8076  fi
8077
8078
8079
8080  if test "x$MKDIR" = x; then
8081    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8082  fi
8083
8084
8085
8086
8087
8088  # Publish this variable in the help.
8089
8090
8091  if test "x$MKTEMP" = x; then
8092    # The variable is not set by user, try to locate tool using the code snippet
8093    for ac_prog in mktemp
8094do
8095  # Extract the first word of "$ac_prog", so it can be a program name with args.
8096set dummy $ac_prog; ac_word=$2
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if ${ac_cv_path_MKTEMP+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  case $MKTEMP in
8103  [\\/]* | ?:[\\/]*)
8104  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8105  ;;
8106  *)
8107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110  IFS=$as_save_IFS
8111  test -z "$as_dir" && as_dir=.
8112    for ac_exec_ext in '' $ac_executable_extensions; do
8113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8114    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8116    break 2
8117  fi
8118done
8119  done
8120IFS=$as_save_IFS
8121
8122  ;;
8123esac
8124fi
8125MKTEMP=$ac_cv_path_MKTEMP
8126if test -n "$MKTEMP"; then
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8128$as_echo "$MKTEMP" >&6; }
8129else
8130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
8132fi
8133
8134
8135  test -n "$MKTEMP" && break
8136done
8137
8138  else
8139    # The variable is set, but is it from the command line or the environment?
8140
8141    # Try to remove the string !MKTEMP! from our list.
8142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8144      # If it failed, the variable was not from the command line. Ignore it,
8145      # but warn the user (except for BASH, which is always set by the calling BASH).
8146      if test "xMKTEMP" != xBASH; then
8147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8148$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8149      fi
8150      # Try to locate tool using the code snippet
8151      for ac_prog in mktemp
8152do
8153  # Extract the first word of "$ac_prog", so it can be a program name with args.
8154set dummy $ac_prog; ac_word=$2
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156$as_echo_n "checking for $ac_word... " >&6; }
8157if ${ac_cv_path_MKTEMP+:} false; then :
8158  $as_echo_n "(cached) " >&6
8159else
8160  case $MKTEMP in
8161  [\\/]* | ?:[\\/]*)
8162  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8163  ;;
8164  *)
8165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166for as_dir in $PATH
8167do
8168  IFS=$as_save_IFS
8169  test -z "$as_dir" && as_dir=.
8170    for ac_exec_ext in '' $ac_executable_extensions; do
8171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8172    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174    break 2
8175  fi
8176done
8177  done
8178IFS=$as_save_IFS
8179
8180  ;;
8181esac
8182fi
8183MKTEMP=$ac_cv_path_MKTEMP
8184if test -n "$MKTEMP"; then
8185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8186$as_echo "$MKTEMP" >&6; }
8187else
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
8190fi
8191
8192
8193  test -n "$MKTEMP" && break
8194done
8195
8196    else
8197      # If it succeeded, then it was overridden by the user. We will use it
8198      # for the tool.
8199
8200      # First remove it from the list of overridden variables, so we can test
8201      # for unknown variables in the end.
8202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8203
8204      # Check if the provided tool contains a complete path.
8205      tool_specified="$MKTEMP"
8206      tool_basename="${tool_specified##*/}"
8207      if test "x$tool_basename" = "x$tool_specified"; then
8208        # A command without a complete path is provided, search $PATH.
8209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8210$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8211        # Extract the first word of "$tool_basename", so it can be a program name with args.
8212set dummy $tool_basename; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_path_MKTEMP+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $MKTEMP in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241MKTEMP=$ac_cv_path_MKTEMP
8242if test -n "$MKTEMP"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8244$as_echo "$MKTEMP" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251        if test "x$MKTEMP" = x; then
8252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8253        fi
8254      else
8255        # Otherwise we believe it is a complete path. Use it as it is.
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8257$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8259$as_echo_n "checking for MKTEMP... " >&6; }
8260        if test ! -x "$tool_specified"; then
8261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8262$as_echo "not found" >&6; }
8263          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8264        fi
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8266$as_echo "$tool_specified" >&6; }
8267      fi
8268    fi
8269  fi
8270
8271
8272
8273  if test "x$MKTEMP" = x; then
8274    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8275  fi
8276
8277
8278
8279
8280
8281  # Publish this variable in the help.
8282
8283
8284  if test "x$MV" = x; then
8285    # The variable is not set by user, try to locate tool using the code snippet
8286    for ac_prog in mv
8287do
8288  # Extract the first word of "$ac_prog", so it can be a program name with args.
8289set dummy $ac_prog; ac_word=$2
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8291$as_echo_n "checking for $ac_word... " >&6; }
8292if ${ac_cv_path_MV+:} false; then :
8293  $as_echo_n "(cached) " >&6
8294else
8295  case $MV in
8296  [\\/]* | ?:[\\/]*)
8297  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8298  ;;
8299  *)
8300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8301for as_dir in $PATH
8302do
8303  IFS=$as_save_IFS
8304  test -z "$as_dir" && as_dir=.
8305    for ac_exec_ext in '' $ac_executable_extensions; do
8306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8307    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8309    break 2
8310  fi
8311done
8312  done
8313IFS=$as_save_IFS
8314
8315  ;;
8316esac
8317fi
8318MV=$ac_cv_path_MV
8319if test -n "$MV"; then
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8321$as_echo "$MV" >&6; }
8322else
8323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
8325fi
8326
8327
8328  test -n "$MV" && break
8329done
8330
8331  else
8332    # The variable is set, but is it from the command line or the environment?
8333
8334    # Try to remove the string !MV! from our list.
8335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8337      # If it failed, the variable was not from the command line. Ignore it,
8338      # but warn the user (except for BASH, which is always set by the calling BASH).
8339      if test "xMV" != xBASH; then
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8341$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8342      fi
8343      # Try to locate tool using the code snippet
8344      for ac_prog in mv
8345do
8346  # Extract the first word of "$ac_prog", so it can be a program name with args.
8347set dummy $ac_prog; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if ${ac_cv_path_MV+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353  case $MV in
8354  [\\/]* | ?:[\\/]*)
8355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8356  ;;
8357  *)
8358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361  IFS=$as_save_IFS
8362  test -z "$as_dir" && as_dir=.
8363    for ac_exec_ext in '' $ac_executable_extensions; do
8364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367    break 2
8368  fi
8369done
8370  done
8371IFS=$as_save_IFS
8372
8373  ;;
8374esac
8375fi
8376MV=$ac_cv_path_MV
8377if test -n "$MV"; then
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8379$as_echo "$MV" >&6; }
8380else
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382$as_echo "no" >&6; }
8383fi
8384
8385
8386  test -n "$MV" && break
8387done
8388
8389    else
8390      # If it succeeded, then it was overridden by the user. We will use it
8391      # for the tool.
8392
8393      # First remove it from the list of overridden variables, so we can test
8394      # for unknown variables in the end.
8395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8396
8397      # Check if the provided tool contains a complete path.
8398      tool_specified="$MV"
8399      tool_basename="${tool_specified##*/}"
8400      if test "x$tool_basename" = "x$tool_specified"; then
8401        # A command without a complete path is provided, search $PATH.
8402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8404        # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_MV+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $MV in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434MV=$ac_cv_path_MV
8435if test -n "$MV"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8437$as_echo "$MV" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444        if test "x$MV" = x; then
8445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446        fi
8447      else
8448        # Otherwise we believe it is a complete path. Use it as it is.
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8452$as_echo_n "checking for MV... " >&6; }
8453        if test ! -x "$tool_specified"; then
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8457        fi
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460      fi
8461    fi
8462  fi
8463
8464
8465
8466  if test "x$MV" = x; then
8467    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8468  fi
8469
8470
8471
8472
8473
8474  # Publish this variable in the help.
8475
8476
8477  if test "x$NAWK" = x; then
8478    # The variable is not set by user, try to locate tool using the code snippet
8479    for ac_prog in nawk gawk awk
8480do
8481  # Extract the first word of "$ac_prog", so it can be a program name with args.
8482set dummy $ac_prog; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_path_NAWK+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  case $NAWK in
8489  [\\/]* | ?:[\\/]*)
8490  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8491  ;;
8492  *)
8493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494for as_dir in $PATH
8495do
8496  IFS=$as_save_IFS
8497  test -z "$as_dir" && as_dir=.
8498    for ac_exec_ext in '' $ac_executable_extensions; do
8499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8500    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502    break 2
8503  fi
8504done
8505  done
8506IFS=$as_save_IFS
8507
8508  ;;
8509esac
8510fi
8511NAWK=$ac_cv_path_NAWK
8512if test -n "$NAWK"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8514$as_echo "$NAWK" >&6; }
8515else
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521  test -n "$NAWK" && break
8522done
8523
8524  else
8525    # The variable is set, but is it from the command line or the environment?
8526
8527    # Try to remove the string !NAWK! from our list.
8528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8530      # If it failed, the variable was not from the command line. Ignore it,
8531      # but warn the user (except for BASH, which is always set by the calling BASH).
8532      if test "xNAWK" != xBASH; then
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8534$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8535      fi
8536      # Try to locate tool using the code snippet
8537      for ac_prog in nawk gawk awk
8538do
8539  # Extract the first word of "$ac_prog", so it can be a program name with args.
8540set dummy $ac_prog; ac_word=$2
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if ${ac_cv_path_NAWK+:} false; then :
8544  $as_echo_n "(cached) " >&6
8545else
8546  case $NAWK in
8547  [\\/]* | ?:[\\/]*)
8548  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8549  ;;
8550  *)
8551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554  IFS=$as_save_IFS
8555  test -z "$as_dir" && as_dir=.
8556    for ac_exec_ext in '' $ac_executable_extensions; do
8557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8558    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8560    break 2
8561  fi
8562done
8563  done
8564IFS=$as_save_IFS
8565
8566  ;;
8567esac
8568fi
8569NAWK=$ac_cv_path_NAWK
8570if test -n "$NAWK"; then
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8572$as_echo "$NAWK" >&6; }
8573else
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575$as_echo "no" >&6; }
8576fi
8577
8578
8579  test -n "$NAWK" && break
8580done
8581
8582    else
8583      # If it succeeded, then it was overridden by the user. We will use it
8584      # for the tool.
8585
8586      # First remove it from the list of overridden variables, so we can test
8587      # for unknown variables in the end.
8588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8589
8590      # Check if the provided tool contains a complete path.
8591      tool_specified="$NAWK"
8592      tool_basename="${tool_specified##*/}"
8593      if test "x$tool_basename" = "x$tool_specified"; then
8594        # A command without a complete path is provided, search $PATH.
8595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8596$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8597        # Extract the first word of "$tool_basename", so it can be a program name with args.
8598set dummy $tool_basename; ac_word=$2
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if ${ac_cv_path_NAWK+:} false; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  case $NAWK in
8605  [\\/]* | ?:[\\/]*)
8606  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8607  ;;
8608  *)
8609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612  IFS=$as_save_IFS
8613  test -z "$as_dir" && as_dir=.
8614    for ac_exec_ext in '' $ac_executable_extensions; do
8615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618    break 2
8619  fi
8620done
8621  done
8622IFS=$as_save_IFS
8623
8624  ;;
8625esac
8626fi
8627NAWK=$ac_cv_path_NAWK
8628if test -n "$NAWK"; then
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8630$as_echo "$NAWK" >&6; }
8631else
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633$as_echo "no" >&6; }
8634fi
8635
8636
8637        if test "x$NAWK" = x; then
8638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8639        fi
8640      else
8641        # Otherwise we believe it is a complete path. Use it as it is.
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8643$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8645$as_echo_n "checking for NAWK... " >&6; }
8646        if test ! -x "$tool_specified"; then
8647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8648$as_echo "not found" >&6; }
8649          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8650        fi
8651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8652$as_echo "$tool_specified" >&6; }
8653      fi
8654    fi
8655  fi
8656
8657
8658
8659  if test "x$NAWK" = x; then
8660    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8661  fi
8662
8663
8664
8665
8666
8667  # Publish this variable in the help.
8668
8669
8670  if test "x$PRINTF" = x; then
8671    # The variable is not set by user, try to locate tool using the code snippet
8672    for ac_prog in printf
8673do
8674  # Extract the first word of "$ac_prog", so it can be a program name with args.
8675set dummy $ac_prog; ac_word=$2
8676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8677$as_echo_n "checking for $ac_word... " >&6; }
8678if ${ac_cv_path_PRINTF+:} false; then :
8679  $as_echo_n "(cached) " >&6
8680else
8681  case $PRINTF in
8682  [\\/]* | ?:[\\/]*)
8683  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8684  ;;
8685  *)
8686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689  IFS=$as_save_IFS
8690  test -z "$as_dir" && as_dir=.
8691    for ac_exec_ext in '' $ac_executable_extensions; do
8692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8695    break 2
8696  fi
8697done
8698  done
8699IFS=$as_save_IFS
8700
8701  ;;
8702esac
8703fi
8704PRINTF=$ac_cv_path_PRINTF
8705if test -n "$PRINTF"; then
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8707$as_echo "$PRINTF" >&6; }
8708else
8709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710$as_echo "no" >&6; }
8711fi
8712
8713
8714  test -n "$PRINTF" && break
8715done
8716
8717  else
8718    # The variable is set, but is it from the command line or the environment?
8719
8720    # Try to remove the string !PRINTF! from our list.
8721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8723      # If it failed, the variable was not from the command line. Ignore it,
8724      # but warn the user (except for BASH, which is always set by the calling BASH).
8725      if test "xPRINTF" != xBASH; then
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8727$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8728      fi
8729      # Try to locate tool using the code snippet
8730      for ac_prog in printf
8731do
8732  # Extract the first word of "$ac_prog", so it can be a program name with args.
8733set dummy $ac_prog; ac_word=$2
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735$as_echo_n "checking for $ac_word... " >&6; }
8736if ${ac_cv_path_PRINTF+:} false; then :
8737  $as_echo_n "(cached) " >&6
8738else
8739  case $PRINTF in
8740  [\\/]* | ?:[\\/]*)
8741  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8742  ;;
8743  *)
8744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747  IFS=$as_save_IFS
8748  test -z "$as_dir" && as_dir=.
8749    for ac_exec_ext in '' $ac_executable_extensions; do
8750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8751    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8753    break 2
8754  fi
8755done
8756  done
8757IFS=$as_save_IFS
8758
8759  ;;
8760esac
8761fi
8762PRINTF=$ac_cv_path_PRINTF
8763if test -n "$PRINTF"; then
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8765$as_echo "$PRINTF" >&6; }
8766else
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
8769fi
8770
8771
8772  test -n "$PRINTF" && break
8773done
8774
8775    else
8776      # If it succeeded, then it was overridden by the user. We will use it
8777      # for the tool.
8778
8779      # First remove it from the list of overridden variables, so we can test
8780      # for unknown variables in the end.
8781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8782
8783      # Check if the provided tool contains a complete path.
8784      tool_specified="$PRINTF"
8785      tool_basename="${tool_specified##*/}"
8786      if test "x$tool_basename" = "x$tool_specified"; then
8787        # A command without a complete path is provided, search $PATH.
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8789$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8790        # Extract the first word of "$tool_basename", so it can be a program name with args.
8791set dummy $tool_basename; ac_word=$2
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793$as_echo_n "checking for $ac_word... " >&6; }
8794if ${ac_cv_path_PRINTF+:} false; then :
8795  $as_echo_n "(cached) " >&6
8796else
8797  case $PRINTF in
8798  [\\/]* | ?:[\\/]*)
8799  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8800  ;;
8801  *)
8802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805  IFS=$as_save_IFS
8806  test -z "$as_dir" && as_dir=.
8807    for ac_exec_ext in '' $ac_executable_extensions; do
8808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811    break 2
8812  fi
8813done
8814  done
8815IFS=$as_save_IFS
8816
8817  ;;
8818esac
8819fi
8820PRINTF=$ac_cv_path_PRINTF
8821if test -n "$PRINTF"; then
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8823$as_echo "$PRINTF" >&6; }
8824else
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
8827fi
8828
8829
8830        if test "x$PRINTF" = x; then
8831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8832        fi
8833      else
8834        # Otherwise we believe it is a complete path. Use it as it is.
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8836$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8838$as_echo_n "checking for PRINTF... " >&6; }
8839        if test ! -x "$tool_specified"; then
8840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8841$as_echo "not found" >&6; }
8842          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8843        fi
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8845$as_echo "$tool_specified" >&6; }
8846      fi
8847    fi
8848  fi
8849
8850
8851
8852  if test "x$PRINTF" = x; then
8853    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8854  fi
8855
8856
8857
8858
8859
8860  # Publish this variable in the help.
8861
8862
8863  if test "x$RM" = x; then
8864    # The variable is not set by user, try to locate tool using the code snippet
8865    for ac_prog in rm
8866do
8867  # Extract the first word of "$ac_prog", so it can be a program name with args.
8868set dummy $ac_prog; ac_word=$2
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870$as_echo_n "checking for $ac_word... " >&6; }
8871if ${ac_cv_path_RM+:} false; then :
8872  $as_echo_n "(cached) " >&6
8873else
8874  case $RM in
8875  [\\/]* | ?:[\\/]*)
8876  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8877  ;;
8878  *)
8879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880for as_dir in $PATH
8881do
8882  IFS=$as_save_IFS
8883  test -z "$as_dir" && as_dir=.
8884    for ac_exec_ext in '' $ac_executable_extensions; do
8885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8886    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8888    break 2
8889  fi
8890done
8891  done
8892IFS=$as_save_IFS
8893
8894  ;;
8895esac
8896fi
8897RM=$ac_cv_path_RM
8898if test -n "$RM"; then
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8900$as_echo "$RM" >&6; }
8901else
8902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903$as_echo "no" >&6; }
8904fi
8905
8906
8907  test -n "$RM" && break
8908done
8909
8910  else
8911    # The variable is set, but is it from the command line or the environment?
8912
8913    # Try to remove the string !RM! from our list.
8914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8916      # If it failed, the variable was not from the command line. Ignore it,
8917      # but warn the user (except for BASH, which is always set by the calling BASH).
8918      if test "xRM" != xBASH; then
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8920$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8921      fi
8922      # Try to locate tool using the code snippet
8923      for ac_prog in rm
8924do
8925  # Extract the first word of "$ac_prog", so it can be a program name with args.
8926set dummy $ac_prog; ac_word=$2
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if ${ac_cv_path_RM+:} false; then :
8930  $as_echo_n "(cached) " >&6
8931else
8932  case $RM in
8933  [\\/]* | ?:[\\/]*)
8934  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8935  ;;
8936  *)
8937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938for as_dir in $PATH
8939do
8940  IFS=$as_save_IFS
8941  test -z "$as_dir" && as_dir=.
8942    for ac_exec_ext in '' $ac_executable_extensions; do
8943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8946    break 2
8947  fi
8948done
8949  done
8950IFS=$as_save_IFS
8951
8952  ;;
8953esac
8954fi
8955RM=$ac_cv_path_RM
8956if test -n "$RM"; then
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8958$as_echo "$RM" >&6; }
8959else
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
8963
8964
8965  test -n "$RM" && break
8966done
8967
8968    else
8969      # If it succeeded, then it was overridden by the user. We will use it
8970      # for the tool.
8971
8972      # First remove it from the list of overridden variables, so we can test
8973      # for unknown variables in the end.
8974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8975
8976      # Check if the provided tool contains a complete path.
8977      tool_specified="$RM"
8978      tool_basename="${tool_specified##*/}"
8979      if test "x$tool_basename" = "x$tool_specified"; then
8980        # A command without a complete path is provided, search $PATH.
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8982$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8983        # Extract the first word of "$tool_basename", so it can be a program name with args.
8984set dummy $tool_basename; ac_word=$2
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8986$as_echo_n "checking for $ac_word... " >&6; }
8987if ${ac_cv_path_RM+:} false; then :
8988  $as_echo_n "(cached) " >&6
8989else
8990  case $RM in
8991  [\\/]* | ?:[\\/]*)
8992  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8993  ;;
8994  *)
8995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8996for as_dir in $PATH
8997do
8998  IFS=$as_save_IFS
8999  test -z "$as_dir" && as_dir=.
9000    for ac_exec_ext in '' $ac_executable_extensions; do
9001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9002    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9004    break 2
9005  fi
9006done
9007  done
9008IFS=$as_save_IFS
9009
9010  ;;
9011esac
9012fi
9013RM=$ac_cv_path_RM
9014if test -n "$RM"; then
9015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9016$as_echo "$RM" >&6; }
9017else
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019$as_echo "no" >&6; }
9020fi
9021
9022
9023        if test "x$RM" = x; then
9024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9025        fi
9026      else
9027        # Otherwise we believe it is a complete path. Use it as it is.
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9029$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9031$as_echo_n "checking for RM... " >&6; }
9032        if test ! -x "$tool_specified"; then
9033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9034$as_echo "not found" >&6; }
9035          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9036        fi
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9038$as_echo "$tool_specified" >&6; }
9039      fi
9040    fi
9041  fi
9042
9043
9044
9045  if test "x$RM" = x; then
9046    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9047  fi
9048
9049
9050
9051
9052
9053  # Publish this variable in the help.
9054
9055
9056  if test "x$SH" = x; then
9057    # The variable is not set by user, try to locate tool using the code snippet
9058    for ac_prog in sh
9059do
9060  # Extract the first word of "$ac_prog", so it can be a program name with args.
9061set dummy $ac_prog; ac_word=$2
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9063$as_echo_n "checking for $ac_word... " >&6; }
9064if ${ac_cv_path_SH+:} false; then :
9065  $as_echo_n "(cached) " >&6
9066else
9067  case $SH in
9068  [\\/]* | ?:[\\/]*)
9069  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9070  ;;
9071  *)
9072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9073for as_dir in $PATH
9074do
9075  IFS=$as_save_IFS
9076  test -z "$as_dir" && as_dir=.
9077    for ac_exec_ext in '' $ac_executable_extensions; do
9078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9079    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9081    break 2
9082  fi
9083done
9084  done
9085IFS=$as_save_IFS
9086
9087  ;;
9088esac
9089fi
9090SH=$ac_cv_path_SH
9091if test -n "$SH"; then
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9093$as_echo "$SH" >&6; }
9094else
9095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
9097fi
9098
9099
9100  test -n "$SH" && break
9101done
9102
9103  else
9104    # The variable is set, but is it from the command line or the environment?
9105
9106    # Try to remove the string !SH! from our list.
9107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9109      # If it failed, the variable was not from the command line. Ignore it,
9110      # but warn the user (except for BASH, which is always set by the calling BASH).
9111      if test "xSH" != xBASH; then
9112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9113$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9114      fi
9115      # Try to locate tool using the code snippet
9116      for ac_prog in sh
9117do
9118  # Extract the first word of "$ac_prog", so it can be a program name with args.
9119set dummy $ac_prog; ac_word=$2
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121$as_echo_n "checking for $ac_word... " >&6; }
9122if ${ac_cv_path_SH+:} false; then :
9123  $as_echo_n "(cached) " >&6
9124else
9125  case $SH in
9126  [\\/]* | ?:[\\/]*)
9127  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9128  ;;
9129  *)
9130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9131for as_dir in $PATH
9132do
9133  IFS=$as_save_IFS
9134  test -z "$as_dir" && as_dir=.
9135    for ac_exec_ext in '' $ac_executable_extensions; do
9136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9137    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9139    break 2
9140  fi
9141done
9142  done
9143IFS=$as_save_IFS
9144
9145  ;;
9146esac
9147fi
9148SH=$ac_cv_path_SH
9149if test -n "$SH"; then
9150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9151$as_echo "$SH" >&6; }
9152else
9153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154$as_echo "no" >&6; }
9155fi
9156
9157
9158  test -n "$SH" && break
9159done
9160
9161    else
9162      # If it succeeded, then it was overridden by the user. We will use it
9163      # for the tool.
9164
9165      # First remove it from the list of overridden variables, so we can test
9166      # for unknown variables in the end.
9167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9168
9169      # Check if the provided tool contains a complete path.
9170      tool_specified="$SH"
9171      tool_basename="${tool_specified##*/}"
9172      if test "x$tool_basename" = "x$tool_specified"; then
9173        # A command without a complete path is provided, search $PATH.
9174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9175$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9176        # Extract the first word of "$tool_basename", so it can be a program name with args.
9177set dummy $tool_basename; ac_word=$2
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179$as_echo_n "checking for $ac_word... " >&6; }
9180if ${ac_cv_path_SH+:} false; then :
9181  $as_echo_n "(cached) " >&6
9182else
9183  case $SH in
9184  [\\/]* | ?:[\\/]*)
9185  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9186  ;;
9187  *)
9188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9189for as_dir in $PATH
9190do
9191  IFS=$as_save_IFS
9192  test -z "$as_dir" && as_dir=.
9193    for ac_exec_ext in '' $ac_executable_extensions; do
9194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9195    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9197    break 2
9198  fi
9199done
9200  done
9201IFS=$as_save_IFS
9202
9203  ;;
9204esac
9205fi
9206SH=$ac_cv_path_SH
9207if test -n "$SH"; then
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9209$as_echo "$SH" >&6; }
9210else
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
9213fi
9214
9215
9216        if test "x$SH" = x; then
9217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9218        fi
9219      else
9220        # Otherwise we believe it is a complete path. Use it as it is.
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9222$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9224$as_echo_n "checking for SH... " >&6; }
9225        if test ! -x "$tool_specified"; then
9226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9227$as_echo "not found" >&6; }
9228          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9229        fi
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9231$as_echo "$tool_specified" >&6; }
9232      fi
9233    fi
9234  fi
9235
9236
9237
9238  if test "x$SH" = x; then
9239    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9240  fi
9241
9242
9243
9244
9245
9246  # Publish this variable in the help.
9247
9248
9249  if test "x$SORT" = x; then
9250    # The variable is not set by user, try to locate tool using the code snippet
9251    for ac_prog in sort
9252do
9253  # Extract the first word of "$ac_prog", so it can be a program name with args.
9254set dummy $ac_prog; ac_word=$2
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
9257if ${ac_cv_path_SORT+:} false; then :
9258  $as_echo_n "(cached) " >&6
9259else
9260  case $SORT in
9261  [\\/]* | ?:[\\/]*)
9262  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9263  ;;
9264  *)
9265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268  IFS=$as_save_IFS
9269  test -z "$as_dir" && as_dir=.
9270    for ac_exec_ext in '' $ac_executable_extensions; do
9271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9272    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9274    break 2
9275  fi
9276done
9277  done
9278IFS=$as_save_IFS
9279
9280  ;;
9281esac
9282fi
9283SORT=$ac_cv_path_SORT
9284if test -n "$SORT"; then
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9286$as_echo "$SORT" >&6; }
9287else
9288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
9290fi
9291
9292
9293  test -n "$SORT" && break
9294done
9295
9296  else
9297    # The variable is set, but is it from the command line or the environment?
9298
9299    # Try to remove the string !SORT! from our list.
9300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9302      # If it failed, the variable was not from the command line. Ignore it,
9303      # but warn the user (except for BASH, which is always set by the calling BASH).
9304      if test "xSORT" != xBASH; then
9305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9306$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9307      fi
9308      # Try to locate tool using the code snippet
9309      for ac_prog in sort
9310do
9311  # Extract the first word of "$ac_prog", so it can be a program name with args.
9312set dummy $ac_prog; ac_word=$2
9313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9314$as_echo_n "checking for $ac_word... " >&6; }
9315if ${ac_cv_path_SORT+:} false; then :
9316  $as_echo_n "(cached) " >&6
9317else
9318  case $SORT in
9319  [\\/]* | ?:[\\/]*)
9320  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9321  ;;
9322  *)
9323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9324for as_dir in $PATH
9325do
9326  IFS=$as_save_IFS
9327  test -z "$as_dir" && as_dir=.
9328    for ac_exec_ext in '' $ac_executable_extensions; do
9329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9330    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9332    break 2
9333  fi
9334done
9335  done
9336IFS=$as_save_IFS
9337
9338  ;;
9339esac
9340fi
9341SORT=$ac_cv_path_SORT
9342if test -n "$SORT"; then
9343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9344$as_echo "$SORT" >&6; }
9345else
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348fi
9349
9350
9351  test -n "$SORT" && break
9352done
9353
9354    else
9355      # If it succeeded, then it was overridden by the user. We will use it
9356      # for the tool.
9357
9358      # First remove it from the list of overridden variables, so we can test
9359      # for unknown variables in the end.
9360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9361
9362      # Check if the provided tool contains a complete path.
9363      tool_specified="$SORT"
9364      tool_basename="${tool_specified##*/}"
9365      if test "x$tool_basename" = "x$tool_specified"; then
9366        # A command without a complete path is provided, search $PATH.
9367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9369        # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_SORT+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $SORT in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399SORT=$ac_cv_path_SORT
9400if test -n "$SORT"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9402$as_echo "$SORT" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409        if test "x$SORT" = x; then
9410          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411        fi
9412      else
9413        # Otherwise we believe it is a complete path. Use it as it is.
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9417$as_echo_n "checking for SORT... " >&6; }
9418        if test ! -x "$tool_specified"; then
9419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9422        fi
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425      fi
9426    fi
9427  fi
9428
9429
9430
9431  if test "x$SORT" = x; then
9432    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9433  fi
9434
9435
9436
9437
9438
9439  # Publish this variable in the help.
9440
9441
9442  if test "x$TAIL" = x; then
9443    # The variable is not set by user, try to locate tool using the code snippet
9444    for ac_prog in tail
9445do
9446  # Extract the first word of "$ac_prog", so it can be a program name with args.
9447set dummy $ac_prog; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_TAIL+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $TAIL in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476TAIL=$ac_cv_path_TAIL
9477if test -n "$TAIL"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9479$as_echo "$TAIL" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486  test -n "$TAIL" && break
9487done
9488
9489  else
9490    # The variable is set, but is it from the command line or the environment?
9491
9492    # Try to remove the string !TAIL! from our list.
9493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9495      # If it failed, the variable was not from the command line. Ignore it,
9496      # but warn the user (except for BASH, which is always set by the calling BASH).
9497      if test "xTAIL" != xBASH; then
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9499$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9500      fi
9501      # Try to locate tool using the code snippet
9502      for ac_prog in tail
9503do
9504  # Extract the first word of "$ac_prog", so it can be a program name with args.
9505set dummy $ac_prog; ac_word=$2
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507$as_echo_n "checking for $ac_word... " >&6; }
9508if ${ac_cv_path_TAIL+:} false; then :
9509  $as_echo_n "(cached) " >&6
9510else
9511  case $TAIL in
9512  [\\/]* | ?:[\\/]*)
9513  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9514  ;;
9515  *)
9516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517for as_dir in $PATH
9518do
9519  IFS=$as_save_IFS
9520  test -z "$as_dir" && as_dir=.
9521    for ac_exec_ext in '' $ac_executable_extensions; do
9522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525    break 2
9526  fi
9527done
9528  done
9529IFS=$as_save_IFS
9530
9531  ;;
9532esac
9533fi
9534TAIL=$ac_cv_path_TAIL
9535if test -n "$TAIL"; then
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9537$as_echo "$TAIL" >&6; }
9538else
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541fi
9542
9543
9544  test -n "$TAIL" && break
9545done
9546
9547    else
9548      # If it succeeded, then it was overridden by the user. We will use it
9549      # for the tool.
9550
9551      # First remove it from the list of overridden variables, so we can test
9552      # for unknown variables in the end.
9553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9554
9555      # Check if the provided tool contains a complete path.
9556      tool_specified="$TAIL"
9557      tool_basename="${tool_specified##*/}"
9558      if test "x$tool_basename" = "x$tool_specified"; then
9559        # A command without a complete path is provided, search $PATH.
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9562        # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_TAIL+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $TAIL in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592TAIL=$ac_cv_path_TAIL
9593if test -n "$TAIL"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9595$as_echo "$TAIL" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602        if test "x$TAIL" = x; then
9603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604        fi
9605      else
9606        # Otherwise we believe it is a complete path. Use it as it is.
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9610$as_echo_n "checking for TAIL... " >&6; }
9611        if test ! -x "$tool_specified"; then
9612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9615        fi
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618      fi
9619    fi
9620  fi
9621
9622
9623
9624  if test "x$TAIL" = x; then
9625    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9626  fi
9627
9628
9629
9630
9631
9632  # Publish this variable in the help.
9633
9634
9635  if test "x$TAR" = x; then
9636    # The variable is not set by user, try to locate tool using the code snippet
9637    for ac_prog in tar
9638do
9639  # Extract the first word of "$ac_prog", so it can be a program name with args.
9640set dummy $ac_prog; ac_word=$2
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9642$as_echo_n "checking for $ac_word... " >&6; }
9643if ${ac_cv_path_TAR+:} false; then :
9644  $as_echo_n "(cached) " >&6
9645else
9646  case $TAR in
9647  [\\/]* | ?:[\\/]*)
9648  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9649  ;;
9650  *)
9651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9652for as_dir in $PATH
9653do
9654  IFS=$as_save_IFS
9655  test -z "$as_dir" && as_dir=.
9656    for ac_exec_ext in '' $ac_executable_extensions; do
9657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9658    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9660    break 2
9661  fi
9662done
9663  done
9664IFS=$as_save_IFS
9665
9666  ;;
9667esac
9668fi
9669TAR=$ac_cv_path_TAR
9670if test -n "$TAR"; then
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9672$as_echo "$TAR" >&6; }
9673else
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678
9679  test -n "$TAR" && break
9680done
9681
9682  else
9683    # The variable is set, but is it from the command line or the environment?
9684
9685    # Try to remove the string !TAR! from our list.
9686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9688      # If it failed, the variable was not from the command line. Ignore it,
9689      # but warn the user (except for BASH, which is always set by the calling BASH).
9690      if test "xTAR" != xBASH; then
9691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9692$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9693      fi
9694      # Try to locate tool using the code snippet
9695      for ac_prog in tar
9696do
9697  # Extract the first word of "$ac_prog", so it can be a program name with args.
9698set dummy $ac_prog; ac_word=$2
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9700$as_echo_n "checking for $ac_word... " >&6; }
9701if ${ac_cv_path_TAR+:} false; then :
9702  $as_echo_n "(cached) " >&6
9703else
9704  case $TAR in
9705  [\\/]* | ?:[\\/]*)
9706  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9707  ;;
9708  *)
9709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710for as_dir in $PATH
9711do
9712  IFS=$as_save_IFS
9713  test -z "$as_dir" && as_dir=.
9714    for ac_exec_ext in '' $ac_executable_extensions; do
9715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9716    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718    break 2
9719  fi
9720done
9721  done
9722IFS=$as_save_IFS
9723
9724  ;;
9725esac
9726fi
9727TAR=$ac_cv_path_TAR
9728if test -n "$TAR"; then
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9730$as_echo "$TAR" >&6; }
9731else
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734fi
9735
9736
9737  test -n "$TAR" && break
9738done
9739
9740    else
9741      # If it succeeded, then it was overridden by the user. We will use it
9742      # for the tool.
9743
9744      # First remove it from the list of overridden variables, so we can test
9745      # for unknown variables in the end.
9746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9747
9748      # Check if the provided tool contains a complete path.
9749      tool_specified="$TAR"
9750      tool_basename="${tool_specified##*/}"
9751      if test "x$tool_basename" = "x$tool_specified"; then
9752        # A command without a complete path is provided, search $PATH.
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9754$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9755        # Extract the first word of "$tool_basename", so it can be a program name with args.
9756set dummy $tool_basename; ac_word=$2
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9758$as_echo_n "checking for $ac_word... " >&6; }
9759if ${ac_cv_path_TAR+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  case $TAR in
9763  [\\/]* | ?:[\\/]*)
9764  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9765  ;;
9766  *)
9767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9768for as_dir in $PATH
9769do
9770  IFS=$as_save_IFS
9771  test -z "$as_dir" && as_dir=.
9772    for ac_exec_ext in '' $ac_executable_extensions; do
9773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9774    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9776    break 2
9777  fi
9778done
9779  done
9780IFS=$as_save_IFS
9781
9782  ;;
9783esac
9784fi
9785TAR=$ac_cv_path_TAR
9786if test -n "$TAR"; then
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9788$as_echo "$TAR" >&6; }
9789else
9790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
9792fi
9793
9794
9795        if test "x$TAR" = x; then
9796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9797        fi
9798      else
9799        # Otherwise we believe it is a complete path. Use it as it is.
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9801$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9803$as_echo_n "checking for TAR... " >&6; }
9804        if test ! -x "$tool_specified"; then
9805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9806$as_echo "not found" >&6; }
9807          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9808        fi
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9810$as_echo "$tool_specified" >&6; }
9811      fi
9812    fi
9813  fi
9814
9815
9816
9817  if test "x$TAR" = x; then
9818    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9819  fi
9820
9821
9822
9823
9824
9825  # Publish this variable in the help.
9826
9827
9828  if test "x$TEE" = x; then
9829    # The variable is not set by user, try to locate tool using the code snippet
9830    for ac_prog in tee
9831do
9832  # Extract the first word of "$ac_prog", so it can be a program name with args.
9833set dummy $ac_prog; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_TEE+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $TEE in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862TEE=$ac_cv_path_TEE
9863if test -n "$TEE"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9865$as_echo "$TEE" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872  test -n "$TEE" && break
9873done
9874
9875  else
9876    # The variable is set, but is it from the command line or the environment?
9877
9878    # Try to remove the string !TEE! from our list.
9879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9881      # If it failed, the variable was not from the command line. Ignore it,
9882      # but warn the user (except for BASH, which is always set by the calling BASH).
9883      if test "xTEE" != xBASH; then
9884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9885$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9886      fi
9887      # Try to locate tool using the code snippet
9888      for ac_prog in tee
9889do
9890  # Extract the first word of "$ac_prog", so it can be a program name with args.
9891set dummy $ac_prog; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_TEE+:} false; then :
9895  $as_echo_n "(cached) " >&6
9896else
9897  case $TEE in
9898  [\\/]* | ?:[\\/]*)
9899  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9900  ;;
9901  *)
9902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905  IFS=$as_save_IFS
9906  test -z "$as_dir" && as_dir=.
9907    for ac_exec_ext in '' $ac_executable_extensions; do
9908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911    break 2
9912  fi
9913done
9914  done
9915IFS=$as_save_IFS
9916
9917  ;;
9918esac
9919fi
9920TEE=$ac_cv_path_TEE
9921if test -n "$TEE"; then
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9923$as_echo "$TEE" >&6; }
9924else
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930  test -n "$TEE" && break
9931done
9932
9933    else
9934      # If it succeeded, then it was overridden by the user. We will use it
9935      # for the tool.
9936
9937      # First remove it from the list of overridden variables, so we can test
9938      # for unknown variables in the end.
9939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9940
9941      # Check if the provided tool contains a complete path.
9942      tool_specified="$TEE"
9943      tool_basename="${tool_specified##*/}"
9944      if test "x$tool_basename" = "x$tool_specified"; then
9945        # A command without a complete path is provided, search $PATH.
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9947$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9948        # Extract the first word of "$tool_basename", so it can be a program name with args.
9949set dummy $tool_basename; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if ${ac_cv_path_TEE+:} false; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $TEE in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978TEE=$ac_cv_path_TEE
9979if test -n "$TEE"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9981$as_echo "$TEE" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988        if test "x$TEE" = x; then
9989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9990        fi
9991      else
9992        # Otherwise we believe it is a complete path. Use it as it is.
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9994$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9996$as_echo_n "checking for TEE... " >&6; }
9997        if test ! -x "$tool_specified"; then
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9999$as_echo "not found" >&6; }
10000          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10001        fi
10002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10003$as_echo "$tool_specified" >&6; }
10004      fi
10005    fi
10006  fi
10007
10008
10009
10010  if test "x$TEE" = x; then
10011    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10012  fi
10013
10014
10015
10016
10017
10018  # Publish this variable in the help.
10019
10020
10021  if test "x$TOUCH" = x; then
10022    # The variable is not set by user, try to locate tool using the code snippet
10023    for ac_prog in touch
10024do
10025  # Extract the first word of "$ac_prog", so it can be a program name with args.
10026set dummy $ac_prog; ac_word=$2
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10028$as_echo_n "checking for $ac_word... " >&6; }
10029if ${ac_cv_path_TOUCH+:} false; then :
10030  $as_echo_n "(cached) " >&6
10031else
10032  case $TOUCH in
10033  [\\/]* | ?:[\\/]*)
10034  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10035  ;;
10036  *)
10037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10038for as_dir in $PATH
10039do
10040  IFS=$as_save_IFS
10041  test -z "$as_dir" && as_dir=.
10042    for ac_exec_ext in '' $ac_executable_extensions; do
10043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10044    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10046    break 2
10047  fi
10048done
10049  done
10050IFS=$as_save_IFS
10051
10052  ;;
10053esac
10054fi
10055TOUCH=$ac_cv_path_TOUCH
10056if test -n "$TOUCH"; then
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10058$as_echo "$TOUCH" >&6; }
10059else
10060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
10062fi
10063
10064
10065  test -n "$TOUCH" && break
10066done
10067
10068  else
10069    # The variable is set, but is it from the command line or the environment?
10070
10071    # Try to remove the string !TOUCH! from our list.
10072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10074      # If it failed, the variable was not from the command line. Ignore it,
10075      # but warn the user (except for BASH, which is always set by the calling BASH).
10076      if test "xTOUCH" != xBASH; then
10077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10078$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10079      fi
10080      # Try to locate tool using the code snippet
10081      for ac_prog in touch
10082do
10083  # Extract the first word of "$ac_prog", so it can be a program name with args.
10084set dummy $ac_prog; ac_word=$2
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086$as_echo_n "checking for $ac_word... " >&6; }
10087if ${ac_cv_path_TOUCH+:} false; then :
10088  $as_echo_n "(cached) " >&6
10089else
10090  case $TOUCH in
10091  [\\/]* | ?:[\\/]*)
10092  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10093  ;;
10094  *)
10095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096for as_dir in $PATH
10097do
10098  IFS=$as_save_IFS
10099  test -z "$as_dir" && as_dir=.
10100    for ac_exec_ext in '' $ac_executable_extensions; do
10101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104    break 2
10105  fi
10106done
10107  done
10108IFS=$as_save_IFS
10109
10110  ;;
10111esac
10112fi
10113TOUCH=$ac_cv_path_TOUCH
10114if test -n "$TOUCH"; then
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10116$as_echo "$TOUCH" >&6; }
10117else
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120fi
10121
10122
10123  test -n "$TOUCH" && break
10124done
10125
10126    else
10127      # If it succeeded, then it was overridden by the user. We will use it
10128      # for the tool.
10129
10130      # First remove it from the list of overridden variables, so we can test
10131      # for unknown variables in the end.
10132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10133
10134      # Check if the provided tool contains a complete path.
10135      tool_specified="$TOUCH"
10136      tool_basename="${tool_specified##*/}"
10137      if test "x$tool_basename" = "x$tool_specified"; then
10138        # A command without a complete path is provided, search $PATH.
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10140$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10141        # Extract the first word of "$tool_basename", so it can be a program name with args.
10142set dummy $tool_basename; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if ${ac_cv_path_TOUCH+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $TOUCH in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171TOUCH=$ac_cv_path_TOUCH
10172if test -n "$TOUCH"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10174$as_echo "$TOUCH" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181        if test "x$TOUCH" = x; then
10182          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10183        fi
10184      else
10185        # Otherwise we believe it is a complete path. Use it as it is.
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10187$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10189$as_echo_n "checking for TOUCH... " >&6; }
10190        if test ! -x "$tool_specified"; then
10191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10192$as_echo "not found" >&6; }
10193          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10194        fi
10195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10196$as_echo "$tool_specified" >&6; }
10197      fi
10198    fi
10199  fi
10200
10201
10202
10203  if test "x$TOUCH" = x; then
10204    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10205  fi
10206
10207
10208
10209
10210
10211  # Publish this variable in the help.
10212
10213
10214  if test "x$TR" = x; then
10215    # The variable is not set by user, try to locate tool using the code snippet
10216    for ac_prog in tr
10217do
10218  # Extract the first word of "$ac_prog", so it can be a program name with args.
10219set dummy $ac_prog; ac_word=$2
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10221$as_echo_n "checking for $ac_word... " >&6; }
10222if ${ac_cv_path_TR+:} false; then :
10223  $as_echo_n "(cached) " >&6
10224else
10225  case $TR in
10226  [\\/]* | ?:[\\/]*)
10227  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10228  ;;
10229  *)
10230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231for as_dir in $PATH
10232do
10233  IFS=$as_save_IFS
10234  test -z "$as_dir" && as_dir=.
10235    for ac_exec_ext in '' $ac_executable_extensions; do
10236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10237    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10239    break 2
10240  fi
10241done
10242  done
10243IFS=$as_save_IFS
10244
10245  ;;
10246esac
10247fi
10248TR=$ac_cv_path_TR
10249if test -n "$TR"; then
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10251$as_echo "$TR" >&6; }
10252else
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
10258  test -n "$TR" && break
10259done
10260
10261  else
10262    # The variable is set, but is it from the command line or the environment?
10263
10264    # Try to remove the string !TR! from our list.
10265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10267      # If it failed, the variable was not from the command line. Ignore it,
10268      # but warn the user (except for BASH, which is always set by the calling BASH).
10269      if test "xTR" != xBASH; then
10270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10271$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10272      fi
10273      # Try to locate tool using the code snippet
10274      for ac_prog in tr
10275do
10276  # Extract the first word of "$ac_prog", so it can be a program name with args.
10277set dummy $ac_prog; ac_word=$2
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279$as_echo_n "checking for $ac_word... " >&6; }
10280if ${ac_cv_path_TR+:} false; then :
10281  $as_echo_n "(cached) " >&6
10282else
10283  case $TR in
10284  [\\/]* | ?:[\\/]*)
10285  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10286  ;;
10287  *)
10288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303  ;;
10304esac
10305fi
10306TR=$ac_cv_path_TR
10307if test -n "$TR"; then
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10309$as_echo "$TR" >&6; }
10310else
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313fi
10314
10315
10316  test -n "$TR" && break
10317done
10318
10319    else
10320      # If it succeeded, then it was overridden by the user. We will use it
10321      # for the tool.
10322
10323      # First remove it from the list of overridden variables, so we can test
10324      # for unknown variables in the end.
10325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10326
10327      # Check if the provided tool contains a complete path.
10328      tool_specified="$TR"
10329      tool_basename="${tool_specified##*/}"
10330      if test "x$tool_basename" = "x$tool_specified"; then
10331        # A command without a complete path is provided, search $PATH.
10332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10333$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10334        # Extract the first word of "$tool_basename", so it can be a program name with args.
10335set dummy $tool_basename; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_TR+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $TR in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364TR=$ac_cv_path_TR
10365if test -n "$TR"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10367$as_echo "$TR" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374        if test "x$TR" = x; then
10375          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10376        fi
10377      else
10378        # Otherwise we believe it is a complete path. Use it as it is.
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10380$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10382$as_echo_n "checking for TR... " >&6; }
10383        if test ! -x "$tool_specified"; then
10384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10385$as_echo "not found" >&6; }
10386          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10387        fi
10388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10389$as_echo "$tool_specified" >&6; }
10390      fi
10391    fi
10392  fi
10393
10394
10395
10396  if test "x$TR" = x; then
10397    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10398  fi
10399
10400
10401
10402
10403
10404  # Publish this variable in the help.
10405
10406
10407  if test "x$UNAME" = x; then
10408    # The variable is not set by user, try to locate tool using the code snippet
10409    for ac_prog in uname
10410do
10411  # Extract the first word of "$ac_prog", so it can be a program name with args.
10412set dummy $ac_prog; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if ${ac_cv_path_UNAME+:} false; then :
10416  $as_echo_n "(cached) " >&6
10417else
10418  case $UNAME in
10419  [\\/]* | ?:[\\/]*)
10420  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10421  ;;
10422  *)
10423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426  IFS=$as_save_IFS
10427  test -z "$as_dir" && as_dir=.
10428    for ac_exec_ext in '' $ac_executable_extensions; do
10429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432    break 2
10433  fi
10434done
10435  done
10436IFS=$as_save_IFS
10437
10438  ;;
10439esac
10440fi
10441UNAME=$ac_cv_path_UNAME
10442if test -n "$UNAME"; then
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10444$as_echo "$UNAME" >&6; }
10445else
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448fi
10449
10450
10451  test -n "$UNAME" && break
10452done
10453
10454  else
10455    # The variable is set, but is it from the command line or the environment?
10456
10457    # Try to remove the string !UNAME! from our list.
10458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10460      # If it failed, the variable was not from the command line. Ignore it,
10461      # but warn the user (except for BASH, which is always set by the calling BASH).
10462      if test "xUNAME" != xBASH; then
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10464$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10465      fi
10466      # Try to locate tool using the code snippet
10467      for ac_prog in uname
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_UNAME+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $UNAME in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499UNAME=$ac_cv_path_UNAME
10500if test -n "$UNAME"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10502$as_echo "$UNAME" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$UNAME" && break
10510done
10511
10512    else
10513      # If it succeeded, then it was overridden by the user. We will use it
10514      # for the tool.
10515
10516      # First remove it from the list of overridden variables, so we can test
10517      # for unknown variables in the end.
10518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10519
10520      # Check if the provided tool contains a complete path.
10521      tool_specified="$UNAME"
10522      tool_basename="${tool_specified##*/}"
10523      if test "x$tool_basename" = "x$tool_specified"; then
10524        # A command without a complete path is provided, search $PATH.
10525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10526$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10527        # Extract the first word of "$tool_basename", so it can be a program name with args.
10528set dummy $tool_basename; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_UNAME+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $UNAME in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557UNAME=$ac_cv_path_UNAME
10558if test -n "$UNAME"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10560$as_echo "$UNAME" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567        if test "x$UNAME" = x; then
10568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10569        fi
10570      else
10571        # Otherwise we believe it is a complete path. Use it as it is.
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10573$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10575$as_echo_n "checking for UNAME... " >&6; }
10576        if test ! -x "$tool_specified"; then
10577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10578$as_echo "not found" >&6; }
10579          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10580        fi
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10582$as_echo "$tool_specified" >&6; }
10583      fi
10584    fi
10585  fi
10586
10587
10588
10589  if test "x$UNAME" = x; then
10590    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10591  fi
10592
10593
10594
10595
10596
10597  # Publish this variable in the help.
10598
10599
10600  if test "x$UNIQ" = x; then
10601    # The variable is not set by user, try to locate tool using the code snippet
10602    for ac_prog in uniq
10603do
10604  # Extract the first word of "$ac_prog", so it can be a program name with args.
10605set dummy $ac_prog; ac_word=$2
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10607$as_echo_n "checking for $ac_word... " >&6; }
10608if ${ac_cv_path_UNIQ+:} false; then :
10609  $as_echo_n "(cached) " >&6
10610else
10611  case $UNIQ in
10612  [\\/]* | ?:[\\/]*)
10613  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10614  ;;
10615  *)
10616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10617for as_dir in $PATH
10618do
10619  IFS=$as_save_IFS
10620  test -z "$as_dir" && as_dir=.
10621    for ac_exec_ext in '' $ac_executable_extensions; do
10622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10623    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10625    break 2
10626  fi
10627done
10628  done
10629IFS=$as_save_IFS
10630
10631  ;;
10632esac
10633fi
10634UNIQ=$ac_cv_path_UNIQ
10635if test -n "$UNIQ"; then
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10637$as_echo "$UNIQ" >&6; }
10638else
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
10641fi
10642
10643
10644  test -n "$UNIQ" && break
10645done
10646
10647  else
10648    # The variable is set, but is it from the command line or the environment?
10649
10650    # Try to remove the string !UNIQ! from our list.
10651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10653      # If it failed, the variable was not from the command line. Ignore it,
10654      # but warn the user (except for BASH, which is always set by the calling BASH).
10655      if test "xUNIQ" != xBASH; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10657$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10658      fi
10659      # Try to locate tool using the code snippet
10660      for ac_prog in uniq
10661do
10662  # Extract the first word of "$ac_prog", so it can be a program name with args.
10663set dummy $ac_prog; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_UNIQ+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $UNIQ in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692UNIQ=$ac_cv_path_UNIQ
10693if test -n "$UNIQ"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10695$as_echo "$UNIQ" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702  test -n "$UNIQ" && break
10703done
10704
10705    else
10706      # If it succeeded, then it was overridden by the user. We will use it
10707      # for the tool.
10708
10709      # First remove it from the list of overridden variables, so we can test
10710      # for unknown variables in the end.
10711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10712
10713      # Check if the provided tool contains a complete path.
10714      tool_specified="$UNIQ"
10715      tool_basename="${tool_specified##*/}"
10716      if test "x$tool_basename" = "x$tool_specified"; then
10717        # A command without a complete path is provided, search $PATH.
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10719$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10720        # Extract the first word of "$tool_basename", so it can be a program name with args.
10721set dummy $tool_basename; ac_word=$2
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10723$as_echo_n "checking for $ac_word... " >&6; }
10724if ${ac_cv_path_UNIQ+:} false; then :
10725  $as_echo_n "(cached) " >&6
10726else
10727  case $UNIQ in
10728  [\\/]* | ?:[\\/]*)
10729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10730  ;;
10731  *)
10732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10733for as_dir in $PATH
10734do
10735  IFS=$as_save_IFS
10736  test -z "$as_dir" && as_dir=.
10737    for ac_exec_ext in '' $ac_executable_extensions; do
10738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10741    break 2
10742  fi
10743done
10744  done
10745IFS=$as_save_IFS
10746
10747  ;;
10748esac
10749fi
10750UNIQ=$ac_cv_path_UNIQ
10751if test -n "$UNIQ"; then
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10753$as_echo "$UNIQ" >&6; }
10754else
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757fi
10758
10759
10760        if test "x$UNIQ" = x; then
10761          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10762        fi
10763      else
10764        # Otherwise we believe it is a complete path. Use it as it is.
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10766$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10768$as_echo_n "checking for UNIQ... " >&6; }
10769        if test ! -x "$tool_specified"; then
10770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10771$as_echo "not found" >&6; }
10772          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10773        fi
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10775$as_echo "$tool_specified" >&6; }
10776      fi
10777    fi
10778  fi
10779
10780
10781
10782  if test "x$UNIQ" = x; then
10783    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10784  fi
10785
10786
10787
10788
10789
10790  # Publish this variable in the help.
10791
10792
10793  if test "x$WC" = x; then
10794    # The variable is not set by user, try to locate tool using the code snippet
10795    for ac_prog in wc
10796do
10797  # Extract the first word of "$ac_prog", so it can be a program name with args.
10798set dummy $ac_prog; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_WC+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $WC in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827WC=$ac_cv_path_WC
10828if test -n "$WC"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10830$as_echo "$WC" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837  test -n "$WC" && break
10838done
10839
10840  else
10841    # The variable is set, but is it from the command line or the environment?
10842
10843    # Try to remove the string !WC! from our list.
10844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10846      # If it failed, the variable was not from the command line. Ignore it,
10847      # but warn the user (except for BASH, which is always set by the calling BASH).
10848      if test "xWC" != xBASH; then
10849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10850$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10851      fi
10852      # Try to locate tool using the code snippet
10853      for ac_prog in wc
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_WC+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $WC in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885WC=$ac_cv_path_WC
10886if test -n "$WC"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10888$as_echo "$WC" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895  test -n "$WC" && break
10896done
10897
10898    else
10899      # If it succeeded, then it was overridden by the user. We will use it
10900      # for the tool.
10901
10902      # First remove it from the list of overridden variables, so we can test
10903      # for unknown variables in the end.
10904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10905
10906      # Check if the provided tool contains a complete path.
10907      tool_specified="$WC"
10908      tool_basename="${tool_specified##*/}"
10909      if test "x$tool_basename" = "x$tool_specified"; then
10910        # A command without a complete path is provided, search $PATH.
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10912$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10913        # Extract the first word of "$tool_basename", so it can be a program name with args.
10914set dummy $tool_basename; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_WC+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  case $WC in
10921  [\\/]* | ?:[\\/]*)
10922  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10923  ;;
10924  *)
10925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928  IFS=$as_save_IFS
10929  test -z "$as_dir" && as_dir=.
10930    for ac_exec_ext in '' $ac_executable_extensions; do
10931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934    break 2
10935  fi
10936done
10937  done
10938IFS=$as_save_IFS
10939
10940  ;;
10941esac
10942fi
10943WC=$ac_cv_path_WC
10944if test -n "$WC"; then
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10946$as_echo "$WC" >&6; }
10947else
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
10950fi
10951
10952
10953        if test "x$WC" = x; then
10954          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10955        fi
10956      else
10957        # Otherwise we believe it is a complete path. Use it as it is.
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10959$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10961$as_echo_n "checking for WC... " >&6; }
10962        if test ! -x "$tool_specified"; then
10963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10964$as_echo "not found" >&6; }
10965          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10966        fi
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10968$as_echo "$tool_specified" >&6; }
10969      fi
10970    fi
10971  fi
10972
10973
10974
10975  if test "x$WC" = x; then
10976    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10977  fi
10978
10979
10980
10981
10982
10983  # Publish this variable in the help.
10984
10985
10986  if test "x$WHICH" = x; then
10987    # The variable is not set by user, try to locate tool using the code snippet
10988    for ac_prog in which
10989do
10990  # Extract the first word of "$ac_prog", so it can be a program name with args.
10991set dummy $ac_prog; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_WHICH+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $WHICH in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020WHICH=$ac_cv_path_WHICH
11021if test -n "$WHICH"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11023$as_echo "$WHICH" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030  test -n "$WHICH" && break
11031done
11032
11033  else
11034    # The variable is set, but is it from the command line or the environment?
11035
11036    # Try to remove the string !WHICH! from our list.
11037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11039      # If it failed, the variable was not from the command line. Ignore it,
11040      # but warn the user (except for BASH, which is always set by the calling BASH).
11041      if test "xWHICH" != xBASH; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11043$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11044      fi
11045      # Try to locate tool using the code snippet
11046      for ac_prog in which
11047do
11048  # Extract the first word of "$ac_prog", so it can be a program name with args.
11049set dummy $ac_prog; ac_word=$2
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11051$as_echo_n "checking for $ac_word... " >&6; }
11052if ${ac_cv_path_WHICH+:} false; then :
11053  $as_echo_n "(cached) " >&6
11054else
11055  case $WHICH in
11056  [\\/]* | ?:[\\/]*)
11057  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11058  ;;
11059  *)
11060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11061for as_dir in $PATH
11062do
11063  IFS=$as_save_IFS
11064  test -z "$as_dir" && as_dir=.
11065    for ac_exec_ext in '' $ac_executable_extensions; do
11066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11067    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11069    break 2
11070  fi
11071done
11072  done
11073IFS=$as_save_IFS
11074
11075  ;;
11076esac
11077fi
11078WHICH=$ac_cv_path_WHICH
11079if test -n "$WHICH"; then
11080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11081$as_echo "$WHICH" >&6; }
11082else
11083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088  test -n "$WHICH" && break
11089done
11090
11091    else
11092      # If it succeeded, then it was overridden by the user. We will use it
11093      # for the tool.
11094
11095      # First remove it from the list of overridden variables, so we can test
11096      # for unknown variables in the end.
11097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11098
11099      # Check if the provided tool contains a complete path.
11100      tool_specified="$WHICH"
11101      tool_basename="${tool_specified##*/}"
11102      if test "x$tool_basename" = "x$tool_specified"; then
11103        # A command without a complete path is provided, search $PATH.
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11105$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11106        # Extract the first word of "$tool_basename", so it can be a program name with args.
11107set dummy $tool_basename; ac_word=$2
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11109$as_echo_n "checking for $ac_word... " >&6; }
11110if ${ac_cv_path_WHICH+:} false; then :
11111  $as_echo_n "(cached) " >&6
11112else
11113  case $WHICH in
11114  [\\/]* | ?:[\\/]*)
11115  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11116  ;;
11117  *)
11118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11119for as_dir in $PATH
11120do
11121  IFS=$as_save_IFS
11122  test -z "$as_dir" && as_dir=.
11123    for ac_exec_ext in '' $ac_executable_extensions; do
11124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11125    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11127    break 2
11128  fi
11129done
11130  done
11131IFS=$as_save_IFS
11132
11133  ;;
11134esac
11135fi
11136WHICH=$ac_cv_path_WHICH
11137if test -n "$WHICH"; then
11138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11139$as_echo "$WHICH" >&6; }
11140else
11141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11142$as_echo "no" >&6; }
11143fi
11144
11145
11146        if test "x$WHICH" = x; then
11147          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11148        fi
11149      else
11150        # Otherwise we believe it is a complete path. Use it as it is.
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11152$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11154$as_echo_n "checking for WHICH... " >&6; }
11155        if test ! -x "$tool_specified"; then
11156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11157$as_echo "not found" >&6; }
11158          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11159        fi
11160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11161$as_echo "$tool_specified" >&6; }
11162      fi
11163    fi
11164  fi
11165
11166
11167
11168  if test "x$WHICH" = x; then
11169    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11170  fi
11171
11172
11173
11174
11175
11176  # Publish this variable in the help.
11177
11178
11179  if test "x$XARGS" = x; then
11180    # The variable is not set by user, try to locate tool using the code snippet
11181    for ac_prog in xargs
11182do
11183  # Extract the first word of "$ac_prog", so it can be a program name with args.
11184set dummy $ac_prog; ac_word=$2
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11186$as_echo_n "checking for $ac_word... " >&6; }
11187if ${ac_cv_path_XARGS+:} false; then :
11188  $as_echo_n "(cached) " >&6
11189else
11190  case $XARGS in
11191  [\\/]* | ?:[\\/]*)
11192  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11193  ;;
11194  *)
11195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198  IFS=$as_save_IFS
11199  test -z "$as_dir" && as_dir=.
11200    for ac_exec_ext in '' $ac_executable_extensions; do
11201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11202    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11204    break 2
11205  fi
11206done
11207  done
11208IFS=$as_save_IFS
11209
11210  ;;
11211esac
11212fi
11213XARGS=$ac_cv_path_XARGS
11214if test -n "$XARGS"; then
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11216$as_echo "$XARGS" >&6; }
11217else
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220fi
11221
11222
11223  test -n "$XARGS" && break
11224done
11225
11226  else
11227    # The variable is set, but is it from the command line or the environment?
11228
11229    # Try to remove the string !XARGS! from our list.
11230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11232      # If it failed, the variable was not from the command line. Ignore it,
11233      # but warn the user (except for BASH, which is always set by the calling BASH).
11234      if test "xXARGS" != xBASH; then
11235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11236$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11237      fi
11238      # Try to locate tool using the code snippet
11239      for ac_prog in xargs
11240do
11241  # Extract the first word of "$ac_prog", so it can be a program name with args.
11242set dummy $ac_prog; ac_word=$2
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11244$as_echo_n "checking for $ac_word... " >&6; }
11245if ${ac_cv_path_XARGS+:} false; then :
11246  $as_echo_n "(cached) " >&6
11247else
11248  case $XARGS in
11249  [\\/]* | ?:[\\/]*)
11250  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11251  ;;
11252  *)
11253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11254for as_dir in $PATH
11255do
11256  IFS=$as_save_IFS
11257  test -z "$as_dir" && as_dir=.
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11260    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11262    break 2
11263  fi
11264done
11265  done
11266IFS=$as_save_IFS
11267
11268  ;;
11269esac
11270fi
11271XARGS=$ac_cv_path_XARGS
11272if test -n "$XARGS"; then
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11274$as_echo "$XARGS" >&6; }
11275else
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278fi
11279
11280
11281  test -n "$XARGS" && break
11282done
11283
11284    else
11285      # If it succeeded, then it was overridden by the user. We will use it
11286      # for the tool.
11287
11288      # First remove it from the list of overridden variables, so we can test
11289      # for unknown variables in the end.
11290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11291
11292      # Check if the provided tool contains a complete path.
11293      tool_specified="$XARGS"
11294      tool_basename="${tool_specified##*/}"
11295      if test "x$tool_basename" = "x$tool_specified"; then
11296        # A command without a complete path is provided, search $PATH.
11297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11298$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11299        # Extract the first word of "$tool_basename", so it can be a program name with args.
11300set dummy $tool_basename; ac_word=$2
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302$as_echo_n "checking for $ac_word... " >&6; }
11303if ${ac_cv_path_XARGS+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  case $XARGS in
11307  [\\/]* | ?:[\\/]*)
11308  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11309  ;;
11310  *)
11311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  test -z "$as_dir" && as_dir=.
11316    for ac_exec_ext in '' $ac_executable_extensions; do
11317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320    break 2
11321  fi
11322done
11323  done
11324IFS=$as_save_IFS
11325
11326  ;;
11327esac
11328fi
11329XARGS=$ac_cv_path_XARGS
11330if test -n "$XARGS"; then
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11332$as_echo "$XARGS" >&6; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336fi
11337
11338
11339        if test "x$XARGS" = x; then
11340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11341        fi
11342      else
11343        # Otherwise we believe it is a complete path. Use it as it is.
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11345$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11347$as_echo_n "checking for XARGS... " >&6; }
11348        if test ! -x "$tool_specified"; then
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11350$as_echo "not found" >&6; }
11351          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11352        fi
11353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11354$as_echo "$tool_specified" >&6; }
11355      fi
11356    fi
11357  fi
11358
11359
11360
11361  if test "x$XARGS" = x; then
11362    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11363  fi
11364
11365
11366
11367  # Then required tools that require some special treatment.
11368
11369
11370  # Publish this variable in the help.
11371
11372
11373  if test "x$AWK" = x; then
11374    # The variable is not set by user, try to locate tool using the code snippet
11375    for ac_prog in gawk mawk nawk awk
11376do
11377  # Extract the first word of "$ac_prog", so it can be a program name with args.
11378set dummy $ac_prog; ac_word=$2
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380$as_echo_n "checking for $ac_word... " >&6; }
11381if ${ac_cv_prog_AWK+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  if test -n "$AWK"; then
11385  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11386else
11387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_prog_AWK="$ac_prog"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402fi
11403fi
11404AWK=$ac_cv_prog_AWK
11405if test -n "$AWK"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11407$as_echo "$AWK" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$AWK" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !AWK! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xAWK" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gawk mawk nawk awk
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_prog_AWK+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  if test -n "$AWK"; then
11440  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11441else
11442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11443for as_dir in $PATH
11444do
11445  IFS=$as_save_IFS
11446  test -z "$as_dir" && as_dir=.
11447    for ac_exec_ext in '' $ac_executable_extensions; do
11448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11449    ac_cv_prog_AWK="$ac_prog"
11450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11451    break 2
11452  fi
11453done
11454  done
11455IFS=$as_save_IFS
11456
11457fi
11458fi
11459AWK=$ac_cv_prog_AWK
11460if test -n "$AWK"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11462$as_echo "$AWK" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$AWK" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if the provided tool contains a complete path.
11481      tool_specified="$AWK"
11482      tool_basename="${tool_specified##*/}"
11483      if test "x$tool_basename" = "x$tool_specified"; then
11484        # A command without a complete path is provided, search $PATH.
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11486$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11487        # Extract the first word of "$tool_basename", so it can be a program name with args.
11488set dummy $tool_basename; ac_word=$2
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11490$as_echo_n "checking for $ac_word... " >&6; }
11491if ${ac_cv_path_AWK+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $AWK in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11497  ;;
11498  *)
11499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514  ;;
11515esac
11516fi
11517AWK=$ac_cv_path_AWK
11518if test -n "$AWK"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11520$as_echo "$AWK" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527        if test "x$AWK" = x; then
11528          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11529        fi
11530      else
11531        # Otherwise we believe it is a complete path. Use it as it is.
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11533$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11535$as_echo_n "checking for AWK... " >&6; }
11536        if test ! -x "$tool_specified"; then
11537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11538$as_echo "not found" >&6; }
11539          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11540        fi
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11542$as_echo "$tool_specified" >&6; }
11543      fi
11544    fi
11545  fi
11546
11547
11548  if test "x$AWK" = x; then
11549    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11550  fi
11551
11552
11553
11554
11555  # Publish this variable in the help.
11556
11557
11558  if test "x$GREP" = x; then
11559    # The variable is not set by user, try to locate tool using the code snippet
11560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11561$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11562if ${ac_cv_path_GREP+:} false; then :
11563  $as_echo_n "(cached) " >&6
11564else
11565  if test -z "$GREP"; then
11566  ac_path_GREP_found=false
11567  # Loop through the user's path and test for each of PROGNAME-LIST
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_prog in grep ggrep; do
11574    for ac_exec_ext in '' $ac_executable_extensions; do
11575      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11576      as_fn_executable_p "$ac_path_GREP" || continue
11577# Check for GNU ac_path_GREP and select it if it is found.
11578  # Check for GNU $ac_path_GREP
11579case `"$ac_path_GREP" --version 2>&1` in
11580*GNU*)
11581  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11582*)
11583  ac_count=0
11584  $as_echo_n 0123456789 >"conftest.in"
11585  while :
11586  do
11587    cat "conftest.in" "conftest.in" >"conftest.tmp"
11588    mv "conftest.tmp" "conftest.in"
11589    cp "conftest.in" "conftest.nl"
11590    $as_echo 'GREP' >> "conftest.nl"
11591    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11592    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11593    as_fn_arith $ac_count + 1 && ac_count=$as_val
11594    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11595      # Best one so far, save it but keep looking for a better one
11596      ac_cv_path_GREP="$ac_path_GREP"
11597      ac_path_GREP_max=$ac_count
11598    fi
11599    # 10*(2^10) chars as input seems more than enough
11600    test $ac_count -gt 10 && break
11601  done
11602  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11603esac
11604
11605      $ac_path_GREP_found && break 3
11606    done
11607  done
11608  done
11609IFS=$as_save_IFS
11610  if test -z "$ac_cv_path_GREP"; then
11611    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11612  fi
11613else
11614  ac_cv_path_GREP=$GREP
11615fi
11616
11617fi
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11619$as_echo "$ac_cv_path_GREP" >&6; }
11620 GREP="$ac_cv_path_GREP"
11621
11622
11623  else
11624    # The variable is set, but is it from the command line or the environment?
11625
11626    # Try to remove the string !GREP! from our list.
11627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11629      # If it failed, the variable was not from the command line. Ignore it,
11630      # but warn the user (except for BASH, which is always set by the calling BASH).
11631      if test "xGREP" != xBASH; then
11632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11633$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11634      fi
11635      # Try to locate tool using the code snippet
11636      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11637$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11638if ${ac_cv_path_GREP+:} false; then :
11639  $as_echo_n "(cached) " >&6
11640else
11641  if test -z "$GREP"; then
11642  ac_path_GREP_found=false
11643  # Loop through the user's path and test for each of PROGNAME-LIST
11644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11646do
11647  IFS=$as_save_IFS
11648  test -z "$as_dir" && as_dir=.
11649    for ac_prog in grep ggrep; do
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11652      as_fn_executable_p "$ac_path_GREP" || continue
11653# Check for GNU ac_path_GREP and select it if it is found.
11654  # Check for GNU $ac_path_GREP
11655case `"$ac_path_GREP" --version 2>&1` in
11656*GNU*)
11657  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11658*)
11659  ac_count=0
11660  $as_echo_n 0123456789 >"conftest.in"
11661  while :
11662  do
11663    cat "conftest.in" "conftest.in" >"conftest.tmp"
11664    mv "conftest.tmp" "conftest.in"
11665    cp "conftest.in" "conftest.nl"
11666    $as_echo 'GREP' >> "conftest.nl"
11667    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11669    as_fn_arith $ac_count + 1 && ac_count=$as_val
11670    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11671      # Best one so far, save it but keep looking for a better one
11672      ac_cv_path_GREP="$ac_path_GREP"
11673      ac_path_GREP_max=$ac_count
11674    fi
11675    # 10*(2^10) chars as input seems more than enough
11676    test $ac_count -gt 10 && break
11677  done
11678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11679esac
11680
11681      $ac_path_GREP_found && break 3
11682    done
11683  done
11684  done
11685IFS=$as_save_IFS
11686  if test -z "$ac_cv_path_GREP"; then
11687    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11688  fi
11689else
11690  ac_cv_path_GREP=$GREP
11691fi
11692
11693fi
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11695$as_echo "$ac_cv_path_GREP" >&6; }
11696 GREP="$ac_cv_path_GREP"
11697
11698
11699    else
11700      # If it succeeded, then it was overridden by the user. We will use it
11701      # for the tool.
11702
11703      # First remove it from the list of overridden variables, so we can test
11704      # for unknown variables in the end.
11705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11706
11707      # Check if the provided tool contains a complete path.
11708      tool_specified="$GREP"
11709      tool_basename="${tool_specified##*/}"
11710      if test "x$tool_basename" = "x$tool_specified"; then
11711        # A command without a complete path is provided, search $PATH.
11712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11713$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11714        # Extract the first word of "$tool_basename", so it can be a program name with args.
11715set dummy $tool_basename; ac_word=$2
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11717$as_echo_n "checking for $ac_word... " >&6; }
11718if ${ac_cv_path_GREP+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  case $GREP in
11722  [\\/]* | ?:[\\/]*)
11723  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11724  ;;
11725  *)
11726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727for as_dir in $PATH
11728do
11729  IFS=$as_save_IFS
11730  test -z "$as_dir" && as_dir=.
11731    for ac_exec_ext in '' $ac_executable_extensions; do
11732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11733    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11735    break 2
11736  fi
11737done
11738  done
11739IFS=$as_save_IFS
11740
11741  ;;
11742esac
11743fi
11744GREP=$ac_cv_path_GREP
11745if test -n "$GREP"; then
11746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11747$as_echo "$GREP" >&6; }
11748else
11749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751fi
11752
11753
11754        if test "x$GREP" = x; then
11755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11756        fi
11757      else
11758        # Otherwise we believe it is a complete path. Use it as it is.
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11760$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11762$as_echo_n "checking for GREP... " >&6; }
11763        if test ! -x "$tool_specified"; then
11764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11765$as_echo "not found" >&6; }
11766          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11767        fi
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11769$as_echo "$tool_specified" >&6; }
11770      fi
11771    fi
11772  fi
11773
11774
11775  if test "x$GREP" = x; then
11776    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11777  fi
11778
11779
11780
11781
11782  # Publish this variable in the help.
11783
11784
11785  if test "x$EGREP" = x; then
11786    # The variable is not set by user, try to locate tool using the code snippet
11787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11788$as_echo_n "checking for egrep... " >&6; }
11789if ${ac_cv_path_EGREP+:} false; then :
11790  $as_echo_n "(cached) " >&6
11791else
11792  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11793   then ac_cv_path_EGREP="$GREP -E"
11794   else
11795     if test -z "$EGREP"; then
11796  ac_path_EGREP_found=false
11797  # Loop through the user's path and test for each of PROGNAME-LIST
11798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11800do
11801  IFS=$as_save_IFS
11802  test -z "$as_dir" && as_dir=.
11803    for ac_prog in egrep; do
11804    for ac_exec_ext in '' $ac_executable_extensions; do
11805      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11806      as_fn_executable_p "$ac_path_EGREP" || continue
11807# Check for GNU ac_path_EGREP and select it if it is found.
11808  # Check for GNU $ac_path_EGREP
11809case `"$ac_path_EGREP" --version 2>&1` in
11810*GNU*)
11811  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11812*)
11813  ac_count=0
11814  $as_echo_n 0123456789 >"conftest.in"
11815  while :
11816  do
11817    cat "conftest.in" "conftest.in" >"conftest.tmp"
11818    mv "conftest.tmp" "conftest.in"
11819    cp "conftest.in" "conftest.nl"
11820    $as_echo 'EGREP' >> "conftest.nl"
11821    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11822    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11823    as_fn_arith $ac_count + 1 && ac_count=$as_val
11824    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11825      # Best one so far, save it but keep looking for a better one
11826      ac_cv_path_EGREP="$ac_path_EGREP"
11827      ac_path_EGREP_max=$ac_count
11828    fi
11829    # 10*(2^10) chars as input seems more than enough
11830    test $ac_count -gt 10 && break
11831  done
11832  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11833esac
11834
11835      $ac_path_EGREP_found && break 3
11836    done
11837  done
11838  done
11839IFS=$as_save_IFS
11840  if test -z "$ac_cv_path_EGREP"; then
11841    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11842  fi
11843else
11844  ac_cv_path_EGREP=$EGREP
11845fi
11846
11847   fi
11848fi
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11850$as_echo "$ac_cv_path_EGREP" >&6; }
11851 EGREP="$ac_cv_path_EGREP"
11852
11853
11854  else
11855    # The variable is set, but is it from the command line or the environment?
11856
11857    # Try to remove the string !EGREP! from our list.
11858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11860      # If it failed, the variable was not from the command line. Ignore it,
11861      # but warn the user (except for BASH, which is always set by the calling BASH).
11862      if test "xEGREP" != xBASH; then
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11864$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11865      fi
11866      # Try to locate tool using the code snippet
11867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11868$as_echo_n "checking for egrep... " >&6; }
11869if ${ac_cv_path_EGREP+:} false; then :
11870  $as_echo_n "(cached) " >&6
11871else
11872  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11873   then ac_cv_path_EGREP="$GREP -E"
11874   else
11875     if test -z "$EGREP"; then
11876  ac_path_EGREP_found=false
11877  # Loop through the user's path and test for each of PROGNAME-LIST
11878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11880do
11881  IFS=$as_save_IFS
11882  test -z "$as_dir" && as_dir=.
11883    for ac_prog in egrep; do
11884    for ac_exec_ext in '' $ac_executable_extensions; do
11885      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11886      as_fn_executable_p "$ac_path_EGREP" || continue
11887# Check for GNU ac_path_EGREP and select it if it is found.
11888  # Check for GNU $ac_path_EGREP
11889case `"$ac_path_EGREP" --version 2>&1` in
11890*GNU*)
11891  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11892*)
11893  ac_count=0
11894  $as_echo_n 0123456789 >"conftest.in"
11895  while :
11896  do
11897    cat "conftest.in" "conftest.in" >"conftest.tmp"
11898    mv "conftest.tmp" "conftest.in"
11899    cp "conftest.in" "conftest.nl"
11900    $as_echo 'EGREP' >> "conftest.nl"
11901    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11903    as_fn_arith $ac_count + 1 && ac_count=$as_val
11904    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11905      # Best one so far, save it but keep looking for a better one
11906      ac_cv_path_EGREP="$ac_path_EGREP"
11907      ac_path_EGREP_max=$ac_count
11908    fi
11909    # 10*(2^10) chars as input seems more than enough
11910    test $ac_count -gt 10 && break
11911  done
11912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11913esac
11914
11915      $ac_path_EGREP_found && break 3
11916    done
11917  done
11918  done
11919IFS=$as_save_IFS
11920  if test -z "$ac_cv_path_EGREP"; then
11921    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11922  fi
11923else
11924  ac_cv_path_EGREP=$EGREP
11925fi
11926
11927   fi
11928fi
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11930$as_echo "$ac_cv_path_EGREP" >&6; }
11931 EGREP="$ac_cv_path_EGREP"
11932
11933
11934    else
11935      # If it succeeded, then it was overridden by the user. We will use it
11936      # for the tool.
11937
11938      # First remove it from the list of overridden variables, so we can test
11939      # for unknown variables in the end.
11940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11941
11942      # Check if the provided tool contains a complete path.
11943      tool_specified="$EGREP"
11944      tool_basename="${tool_specified##*/}"
11945      if test "x$tool_basename" = "x$tool_specified"; then
11946        # A command without a complete path is provided, search $PATH.
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11948$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11949        # Extract the first word of "$tool_basename", so it can be a program name with args.
11950set dummy $tool_basename; ac_word=$2
11951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11952$as_echo_n "checking for $ac_word... " >&6; }
11953if ${ac_cv_path_EGREP+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  case $EGREP in
11957  [\\/]* | ?:[\\/]*)
11958  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11959  ;;
11960  *)
11961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11962for as_dir in $PATH
11963do
11964  IFS=$as_save_IFS
11965  test -z "$as_dir" && as_dir=.
11966    for ac_exec_ext in '' $ac_executable_extensions; do
11967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11968    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11970    break 2
11971  fi
11972done
11973  done
11974IFS=$as_save_IFS
11975
11976  ;;
11977esac
11978fi
11979EGREP=$ac_cv_path_EGREP
11980if test -n "$EGREP"; then
11981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11982$as_echo "$EGREP" >&6; }
11983else
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986fi
11987
11988
11989        if test "x$EGREP" = x; then
11990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11991        fi
11992      else
11993        # Otherwise we believe it is a complete path. Use it as it is.
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11995$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11997$as_echo_n "checking for EGREP... " >&6; }
11998        if test ! -x "$tool_specified"; then
11999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12000$as_echo "not found" >&6; }
12001          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12002        fi
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12004$as_echo "$tool_specified" >&6; }
12005      fi
12006    fi
12007  fi
12008
12009
12010  if test "x$EGREP" = x; then
12011    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12012  fi
12013
12014
12015
12016
12017  # Publish this variable in the help.
12018
12019
12020  if test "x$FGREP" = x; then
12021    # The variable is not set by user, try to locate tool using the code snippet
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12023$as_echo_n "checking for fgrep... " >&6; }
12024if ${ac_cv_path_FGREP+:} false; then :
12025  $as_echo_n "(cached) " >&6
12026else
12027  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12028   then ac_cv_path_FGREP="$GREP -F"
12029   else
12030     if test -z "$FGREP"; then
12031  ac_path_FGREP_found=false
12032  # Loop through the user's path and test for each of PROGNAME-LIST
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_prog in fgrep; do
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12041      as_fn_executable_p "$ac_path_FGREP" || continue
12042# Check for GNU ac_path_FGREP and select it if it is found.
12043  # Check for GNU $ac_path_FGREP
12044case `"$ac_path_FGREP" --version 2>&1` in
12045*GNU*)
12046  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12047*)
12048  ac_count=0
12049  $as_echo_n 0123456789 >"conftest.in"
12050  while :
12051  do
12052    cat "conftest.in" "conftest.in" >"conftest.tmp"
12053    mv "conftest.tmp" "conftest.in"
12054    cp "conftest.in" "conftest.nl"
12055    $as_echo 'FGREP' >> "conftest.nl"
12056    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12057    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12058    as_fn_arith $ac_count + 1 && ac_count=$as_val
12059    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12060      # Best one so far, save it but keep looking for a better one
12061      ac_cv_path_FGREP="$ac_path_FGREP"
12062      ac_path_FGREP_max=$ac_count
12063    fi
12064    # 10*(2^10) chars as input seems more than enough
12065    test $ac_count -gt 10 && break
12066  done
12067  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12068esac
12069
12070      $ac_path_FGREP_found && break 3
12071    done
12072  done
12073  done
12074IFS=$as_save_IFS
12075  if test -z "$ac_cv_path_FGREP"; then
12076    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12077  fi
12078else
12079  ac_cv_path_FGREP=$FGREP
12080fi
12081
12082   fi
12083fi
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12085$as_echo "$ac_cv_path_FGREP" >&6; }
12086 FGREP="$ac_cv_path_FGREP"
12087
12088
12089  else
12090    # The variable is set, but is it from the command line or the environment?
12091
12092    # Try to remove the string !FGREP! from our list.
12093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12095      # If it failed, the variable was not from the command line. Ignore it,
12096      # but warn the user (except for BASH, which is always set by the calling BASH).
12097      if test "xFGREP" != xBASH; then
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12099$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12100      fi
12101      # Try to locate tool using the code snippet
12102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12103$as_echo_n "checking for fgrep... " >&6; }
12104if ${ac_cv_path_FGREP+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12108   then ac_cv_path_FGREP="$GREP -F"
12109   else
12110     if test -z "$FGREP"; then
12111  ac_path_FGREP_found=false
12112  # Loop through the user's path and test for each of PROGNAME-LIST
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_prog in fgrep; do
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12121      as_fn_executable_p "$ac_path_FGREP" || continue
12122# Check for GNU ac_path_FGREP and select it if it is found.
12123  # Check for GNU $ac_path_FGREP
12124case `"$ac_path_FGREP" --version 2>&1` in
12125*GNU*)
12126  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12127*)
12128  ac_count=0
12129  $as_echo_n 0123456789 >"conftest.in"
12130  while :
12131  do
12132    cat "conftest.in" "conftest.in" >"conftest.tmp"
12133    mv "conftest.tmp" "conftest.in"
12134    cp "conftest.in" "conftest.nl"
12135    $as_echo 'FGREP' >> "conftest.nl"
12136    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12138    as_fn_arith $ac_count + 1 && ac_count=$as_val
12139    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12140      # Best one so far, save it but keep looking for a better one
12141      ac_cv_path_FGREP="$ac_path_FGREP"
12142      ac_path_FGREP_max=$ac_count
12143    fi
12144    # 10*(2^10) chars as input seems more than enough
12145    test $ac_count -gt 10 && break
12146  done
12147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12148esac
12149
12150      $ac_path_FGREP_found && break 3
12151    done
12152  done
12153  done
12154IFS=$as_save_IFS
12155  if test -z "$ac_cv_path_FGREP"; then
12156    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12157  fi
12158else
12159  ac_cv_path_FGREP=$FGREP
12160fi
12161
12162   fi
12163fi
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12165$as_echo "$ac_cv_path_FGREP" >&6; }
12166 FGREP="$ac_cv_path_FGREP"
12167
12168
12169    else
12170      # If it succeeded, then it was overridden by the user. We will use it
12171      # for the tool.
12172
12173      # First remove it from the list of overridden variables, so we can test
12174      # for unknown variables in the end.
12175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12176
12177      # Check if the provided tool contains a complete path.
12178      tool_specified="$FGREP"
12179      tool_basename="${tool_specified##*/}"
12180      if test "x$tool_basename" = "x$tool_specified"; then
12181        # A command without a complete path is provided, search $PATH.
12182        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12183$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12184        # Extract the first word of "$tool_basename", so it can be a program name with args.
12185set dummy $tool_basename; ac_word=$2
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187$as_echo_n "checking for $ac_word... " >&6; }
12188if ${ac_cv_path_FGREP+:} false; then :
12189  $as_echo_n "(cached) " >&6
12190else
12191  case $FGREP in
12192  [\\/]* | ?:[\\/]*)
12193  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12194  ;;
12195  *)
12196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12197for as_dir in $PATH
12198do
12199  IFS=$as_save_IFS
12200  test -z "$as_dir" && as_dir=.
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12203    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12205    break 2
12206  fi
12207done
12208  done
12209IFS=$as_save_IFS
12210
12211  ;;
12212esac
12213fi
12214FGREP=$ac_cv_path_FGREP
12215if test -n "$FGREP"; then
12216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12217$as_echo "$FGREP" >&6; }
12218else
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12220$as_echo "no" >&6; }
12221fi
12222
12223
12224        if test "x$FGREP" = x; then
12225          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12226        fi
12227      else
12228        # Otherwise we believe it is a complete path. Use it as it is.
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12230$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12232$as_echo_n "checking for FGREP... " >&6; }
12233        if test ! -x "$tool_specified"; then
12234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12235$as_echo "not found" >&6; }
12236          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12237        fi
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12239$as_echo "$tool_specified" >&6; }
12240      fi
12241    fi
12242  fi
12243
12244
12245  if test "x$FGREP" = x; then
12246    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12247  fi
12248
12249
12250
12251
12252  # Publish this variable in the help.
12253
12254
12255  if test "x$SED" = x; then
12256    # The variable is not set by user, try to locate tool using the code snippet
12257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12258$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12259if ${ac_cv_path_SED+:} false; then :
12260  $as_echo_n "(cached) " >&6
12261else
12262            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12263     for ac_i in 1 2 3 4 5 6 7; do
12264       ac_script="$ac_script$as_nl$ac_script"
12265     done
12266     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12267     { ac_script=; unset ac_script;}
12268     if test -z "$SED"; then
12269  ac_path_SED_found=false
12270  # Loop through the user's path and test for each of PROGNAME-LIST
12271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12272for as_dir in $PATH
12273do
12274  IFS=$as_save_IFS
12275  test -z "$as_dir" && as_dir=.
12276    for ac_prog in sed gsed; do
12277    for ac_exec_ext in '' $ac_executable_extensions; do
12278      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12279      as_fn_executable_p "$ac_path_SED" || continue
12280# Check for GNU ac_path_SED and select it if it is found.
12281  # Check for GNU $ac_path_SED
12282case `"$ac_path_SED" --version 2>&1` in
12283*GNU*)
12284  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12285*)
12286  ac_count=0
12287  $as_echo_n 0123456789 >"conftest.in"
12288  while :
12289  do
12290    cat "conftest.in" "conftest.in" >"conftest.tmp"
12291    mv "conftest.tmp" "conftest.in"
12292    cp "conftest.in" "conftest.nl"
12293    $as_echo '' >> "conftest.nl"
12294    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12295    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12296    as_fn_arith $ac_count + 1 && ac_count=$as_val
12297    if test $ac_count -gt ${ac_path_SED_max-0}; then
12298      # Best one so far, save it but keep looking for a better one
12299      ac_cv_path_SED="$ac_path_SED"
12300      ac_path_SED_max=$ac_count
12301    fi
12302    # 10*(2^10) chars as input seems more than enough
12303    test $ac_count -gt 10 && break
12304  done
12305  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12306esac
12307
12308      $ac_path_SED_found && break 3
12309    done
12310  done
12311  done
12312IFS=$as_save_IFS
12313  if test -z "$ac_cv_path_SED"; then
12314    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12315  fi
12316else
12317  ac_cv_path_SED=$SED
12318fi
12319
12320fi
12321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12322$as_echo "$ac_cv_path_SED" >&6; }
12323 SED="$ac_cv_path_SED"
12324  rm -f conftest.sed
12325
12326  else
12327    # The variable is set, but is it from the command line or the environment?
12328
12329    # Try to remove the string !SED! from our list.
12330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12332      # If it failed, the variable was not from the command line. Ignore it,
12333      # but warn the user (except for BASH, which is always set by the calling BASH).
12334      if test "xSED" != xBASH; then
12335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12336$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12337      fi
12338      # Try to locate tool using the code snippet
12339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12340$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12341if ${ac_cv_path_SED+:} false; then :
12342  $as_echo_n "(cached) " >&6
12343else
12344            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12345     for ac_i in 1 2 3 4 5 6 7; do
12346       ac_script="$ac_script$as_nl$ac_script"
12347     done
12348     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12349     { ac_script=; unset ac_script;}
12350     if test -z "$SED"; then
12351  ac_path_SED_found=false
12352  # Loop through the user's path and test for each of PROGNAME-LIST
12353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356  IFS=$as_save_IFS
12357  test -z "$as_dir" && as_dir=.
12358    for ac_prog in sed gsed; do
12359    for ac_exec_ext in '' $ac_executable_extensions; do
12360      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12361      as_fn_executable_p "$ac_path_SED" || continue
12362# Check for GNU ac_path_SED and select it if it is found.
12363  # Check for GNU $ac_path_SED
12364case `"$ac_path_SED" --version 2>&1` in
12365*GNU*)
12366  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12367*)
12368  ac_count=0
12369  $as_echo_n 0123456789 >"conftest.in"
12370  while :
12371  do
12372    cat "conftest.in" "conftest.in" >"conftest.tmp"
12373    mv "conftest.tmp" "conftest.in"
12374    cp "conftest.in" "conftest.nl"
12375    $as_echo '' >> "conftest.nl"
12376    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12377    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12378    as_fn_arith $ac_count + 1 && ac_count=$as_val
12379    if test $ac_count -gt ${ac_path_SED_max-0}; then
12380      # Best one so far, save it but keep looking for a better one
12381      ac_cv_path_SED="$ac_path_SED"
12382      ac_path_SED_max=$ac_count
12383    fi
12384    # 10*(2^10) chars as input seems more than enough
12385    test $ac_count -gt 10 && break
12386  done
12387  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12388esac
12389
12390      $ac_path_SED_found && break 3
12391    done
12392  done
12393  done
12394IFS=$as_save_IFS
12395  if test -z "$ac_cv_path_SED"; then
12396    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12397  fi
12398else
12399  ac_cv_path_SED=$SED
12400fi
12401
12402fi
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12404$as_echo "$ac_cv_path_SED" >&6; }
12405 SED="$ac_cv_path_SED"
12406  rm -f conftest.sed
12407
12408    else
12409      # If it succeeded, then it was overridden by the user. We will use it
12410      # for the tool.
12411
12412      # First remove it from the list of overridden variables, so we can test
12413      # for unknown variables in the end.
12414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12415
12416      # Check if the provided tool contains a complete path.
12417      tool_specified="$SED"
12418      tool_basename="${tool_specified##*/}"
12419      if test "x$tool_basename" = "x$tool_specified"; then
12420        # A command without a complete path is provided, search $PATH.
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12422$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12423        # Extract the first word of "$tool_basename", so it can be a program name with args.
12424set dummy $tool_basename; ac_word=$2
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12426$as_echo_n "checking for $ac_word... " >&6; }
12427if ${ac_cv_path_SED+:} false; then :
12428  $as_echo_n "(cached) " >&6
12429else
12430  case $SED in
12431  [\\/]* | ?:[\\/]*)
12432  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12433  ;;
12434  *)
12435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12436for as_dir in $PATH
12437do
12438  IFS=$as_save_IFS
12439  test -z "$as_dir" && as_dir=.
12440    for ac_exec_ext in '' $ac_executable_extensions; do
12441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12442    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12444    break 2
12445  fi
12446done
12447  done
12448IFS=$as_save_IFS
12449
12450  ;;
12451esac
12452fi
12453SED=$ac_cv_path_SED
12454if test -n "$SED"; then
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12456$as_echo "$SED" >&6; }
12457else
12458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
12460fi
12461
12462
12463        if test "x$SED" = x; then
12464          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12465        fi
12466      else
12467        # Otherwise we believe it is a complete path. Use it as it is.
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12469$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12471$as_echo_n "checking for SED... " >&6; }
12472        if test ! -x "$tool_specified"; then
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12474$as_echo "not found" >&6; }
12475          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12476        fi
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12478$as_echo "$tool_specified" >&6; }
12479      fi
12480    fi
12481  fi
12482
12483
12484  if test "x$SED" = x; then
12485    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12486  fi
12487
12488
12489
12490  # Always force rm.
12491  RM="$RM -f"
12492
12493  # pwd behaves differently on various platforms and some don't support the -L flag.
12494  # Always use the bash builtin pwd to get uniform behavior.
12495  THEPWDCMD=pwd
12496
12497  # These are not required on all platforms
12498
12499
12500  # Publish this variable in the help.
12501
12502
12503  if test "x$CYGPATH" = x; then
12504    # The variable is not set by user, try to locate tool using the code snippet
12505    for ac_prog in cygpath
12506do
12507  # Extract the first word of "$ac_prog", so it can be a program name with args.
12508set dummy $ac_prog; ac_word=$2
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12510$as_echo_n "checking for $ac_word... " >&6; }
12511if ${ac_cv_path_CYGPATH+:} false; then :
12512  $as_echo_n "(cached) " >&6
12513else
12514  case $CYGPATH in
12515  [\\/]* | ?:[\\/]*)
12516  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12517  ;;
12518  *)
12519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12520for as_dir in $PATH
12521do
12522  IFS=$as_save_IFS
12523  test -z "$as_dir" && as_dir=.
12524    for ac_exec_ext in '' $ac_executable_extensions; do
12525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12526    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12528    break 2
12529  fi
12530done
12531  done
12532IFS=$as_save_IFS
12533
12534  ;;
12535esac
12536fi
12537CYGPATH=$ac_cv_path_CYGPATH
12538if test -n "$CYGPATH"; then
12539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12540$as_echo "$CYGPATH" >&6; }
12541else
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544fi
12545
12546
12547  test -n "$CYGPATH" && break
12548done
12549
12550  else
12551    # The variable is set, but is it from the command line or the environment?
12552
12553    # Try to remove the string !CYGPATH! from our list.
12554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12556      # If it failed, the variable was not from the command line. Ignore it,
12557      # but warn the user (except for BASH, which is always set by the calling BASH).
12558      if test "xCYGPATH" != xBASH; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12560$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12561      fi
12562      # Try to locate tool using the code snippet
12563      for ac_prog in cygpath
12564do
12565  # Extract the first word of "$ac_prog", so it can be a program name with args.
12566set dummy $ac_prog; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_CYGPATH+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $CYGPATH in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595CYGPATH=$ac_cv_path_CYGPATH
12596if test -n "$CYGPATH"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12598$as_echo "$CYGPATH" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605  test -n "$CYGPATH" && break
12606done
12607
12608    else
12609      # If it succeeded, then it was overridden by the user. We will use it
12610      # for the tool.
12611
12612      # First remove it from the list of overridden variables, so we can test
12613      # for unknown variables in the end.
12614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12615
12616      # Check if the provided tool contains a complete path.
12617      tool_specified="$CYGPATH"
12618      tool_basename="${tool_specified##*/}"
12619      if test "x$tool_basename" = "x$tool_specified"; then
12620        # A command without a complete path is provided, search $PATH.
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12622$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12623        # Extract the first word of "$tool_basename", so it can be a program name with args.
12624set dummy $tool_basename; ac_word=$2
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12626$as_echo_n "checking for $ac_word... " >&6; }
12627if ${ac_cv_path_CYGPATH+:} false; then :
12628  $as_echo_n "(cached) " >&6
12629else
12630  case $CYGPATH in
12631  [\\/]* | ?:[\\/]*)
12632  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12633  ;;
12634  *)
12635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12636for as_dir in $PATH
12637do
12638  IFS=$as_save_IFS
12639  test -z "$as_dir" && as_dir=.
12640    for ac_exec_ext in '' $ac_executable_extensions; do
12641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12642    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12644    break 2
12645  fi
12646done
12647  done
12648IFS=$as_save_IFS
12649
12650  ;;
12651esac
12652fi
12653CYGPATH=$ac_cv_path_CYGPATH
12654if test -n "$CYGPATH"; then
12655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12656$as_echo "$CYGPATH" >&6; }
12657else
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660fi
12661
12662
12663        if test "x$CYGPATH" = x; then
12664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12665        fi
12666      else
12667        # Otherwise we believe it is a complete path. Use it as it is.
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12669$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12671$as_echo_n "checking for CYGPATH... " >&6; }
12672        if test ! -x "$tool_specified"; then
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12674$as_echo "not found" >&6; }
12675          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12676        fi
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12678$as_echo "$tool_specified" >&6; }
12679      fi
12680    fi
12681  fi
12682
12683
12684
12685
12686  # Publish this variable in the help.
12687
12688
12689  if test "x$READLINK" = x; then
12690    # The variable is not set by user, try to locate tool using the code snippet
12691    for ac_prog in greadlink readlink
12692do
12693  # Extract the first word of "$ac_prog", so it can be a program name with args.
12694set dummy $ac_prog; ac_word=$2
12695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12696$as_echo_n "checking for $ac_word... " >&6; }
12697if ${ac_cv_path_READLINK+:} false; then :
12698  $as_echo_n "(cached) " >&6
12699else
12700  case $READLINK in
12701  [\\/]* | ?:[\\/]*)
12702  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12703  ;;
12704  *)
12705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12706for as_dir in $PATH
12707do
12708  IFS=$as_save_IFS
12709  test -z "$as_dir" && as_dir=.
12710    for ac_exec_ext in '' $ac_executable_extensions; do
12711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12712    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12714    break 2
12715  fi
12716done
12717  done
12718IFS=$as_save_IFS
12719
12720  ;;
12721esac
12722fi
12723READLINK=$ac_cv_path_READLINK
12724if test -n "$READLINK"; then
12725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12726$as_echo "$READLINK" >&6; }
12727else
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729$as_echo "no" >&6; }
12730fi
12731
12732
12733  test -n "$READLINK" && break
12734done
12735
12736  else
12737    # The variable is set, but is it from the command line or the environment?
12738
12739    # Try to remove the string !READLINK! from our list.
12740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12742      # If it failed, the variable was not from the command line. Ignore it,
12743      # but warn the user (except for BASH, which is always set by the calling BASH).
12744      if test "xREADLINK" != xBASH; then
12745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12746$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12747      fi
12748      # Try to locate tool using the code snippet
12749      for ac_prog in greadlink readlink
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_path_READLINK+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  case $READLINK in
12759  [\\/]* | ?:[\\/]*)
12760  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12761  ;;
12762  *)
12763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764for as_dir in $PATH
12765do
12766  IFS=$as_save_IFS
12767  test -z "$as_dir" && as_dir=.
12768    for ac_exec_ext in '' $ac_executable_extensions; do
12769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12770    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12772    break 2
12773  fi
12774done
12775  done
12776IFS=$as_save_IFS
12777
12778  ;;
12779esac
12780fi
12781READLINK=$ac_cv_path_READLINK
12782if test -n "$READLINK"; then
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12784$as_echo "$READLINK" >&6; }
12785else
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
12788fi
12789
12790
12791  test -n "$READLINK" && break
12792done
12793
12794    else
12795      # If it succeeded, then it was overridden by the user. We will use it
12796      # for the tool.
12797
12798      # First remove it from the list of overridden variables, so we can test
12799      # for unknown variables in the end.
12800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12801
12802      # Check if the provided tool contains a complete path.
12803      tool_specified="$READLINK"
12804      tool_basename="${tool_specified##*/}"
12805      if test "x$tool_basename" = "x$tool_specified"; then
12806        # A command without a complete path is provided, search $PATH.
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12808$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12809        # Extract the first word of "$tool_basename", so it can be a program name with args.
12810set dummy $tool_basename; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_READLINK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $READLINK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839READLINK=$ac_cv_path_READLINK
12840if test -n "$READLINK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12842$as_echo "$READLINK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849        if test "x$READLINK" = x; then
12850          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12851        fi
12852      else
12853        # Otherwise we believe it is a complete path. Use it as it is.
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12855$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12857$as_echo_n "checking for READLINK... " >&6; }
12858        if test ! -x "$tool_specified"; then
12859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12860$as_echo "not found" >&6; }
12861          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12862        fi
12863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12864$as_echo "$tool_specified" >&6; }
12865      fi
12866    fi
12867  fi
12868
12869
12870
12871
12872  # Publish this variable in the help.
12873
12874
12875  if test "x$DF" = x; then
12876    # The variable is not set by user, try to locate tool using the code snippet
12877    for ac_prog in df
12878do
12879  # Extract the first word of "$ac_prog", so it can be a program name with args.
12880set dummy $ac_prog; ac_word=$2
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12882$as_echo_n "checking for $ac_word... " >&6; }
12883if ${ac_cv_path_DF+:} false; then :
12884  $as_echo_n "(cached) " >&6
12885else
12886  case $DF in
12887  [\\/]* | ?:[\\/]*)
12888  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12889  ;;
12890  *)
12891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12892for as_dir in $PATH
12893do
12894  IFS=$as_save_IFS
12895  test -z "$as_dir" && as_dir=.
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12898    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12900    break 2
12901  fi
12902done
12903  done
12904IFS=$as_save_IFS
12905
12906  ;;
12907esac
12908fi
12909DF=$ac_cv_path_DF
12910if test -n "$DF"; then
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12912$as_echo "$DF" >&6; }
12913else
12914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12915$as_echo "no" >&6; }
12916fi
12917
12918
12919  test -n "$DF" && break
12920done
12921
12922  else
12923    # The variable is set, but is it from the command line or the environment?
12924
12925    # Try to remove the string !DF! from our list.
12926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12928      # If it failed, the variable was not from the command line. Ignore it,
12929      # but warn the user (except for BASH, which is always set by the calling BASH).
12930      if test "xDF" != xBASH; then
12931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12932$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12933      fi
12934      # Try to locate tool using the code snippet
12935      for ac_prog in df
12936do
12937  # Extract the first word of "$ac_prog", so it can be a program name with args.
12938set dummy $ac_prog; ac_word=$2
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12940$as_echo_n "checking for $ac_word... " >&6; }
12941if ${ac_cv_path_DF+:} false; then :
12942  $as_echo_n "(cached) " >&6
12943else
12944  case $DF in
12945  [\\/]* | ?:[\\/]*)
12946  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12947  ;;
12948  *)
12949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12950for as_dir in $PATH
12951do
12952  IFS=$as_save_IFS
12953  test -z "$as_dir" && as_dir=.
12954    for ac_exec_ext in '' $ac_executable_extensions; do
12955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12956    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12958    break 2
12959  fi
12960done
12961  done
12962IFS=$as_save_IFS
12963
12964  ;;
12965esac
12966fi
12967DF=$ac_cv_path_DF
12968if test -n "$DF"; then
12969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12970$as_echo "$DF" >&6; }
12971else
12972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12973$as_echo "no" >&6; }
12974fi
12975
12976
12977  test -n "$DF" && break
12978done
12979
12980    else
12981      # If it succeeded, then it was overridden by the user. We will use it
12982      # for the tool.
12983
12984      # First remove it from the list of overridden variables, so we can test
12985      # for unknown variables in the end.
12986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12987
12988      # Check if the provided tool contains a complete path.
12989      tool_specified="$DF"
12990      tool_basename="${tool_specified##*/}"
12991      if test "x$tool_basename" = "x$tool_specified"; then
12992        # A command without a complete path is provided, search $PATH.
12993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12994$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12995        # Extract the first word of "$tool_basename", so it can be a program name with args.
12996set dummy $tool_basename; ac_word=$2
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12998$as_echo_n "checking for $ac_word... " >&6; }
12999if ${ac_cv_path_DF+:} false; then :
13000  $as_echo_n "(cached) " >&6
13001else
13002  case $DF in
13003  [\\/]* | ?:[\\/]*)
13004  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13005  ;;
13006  *)
13007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13008for as_dir in $PATH
13009do
13010  IFS=$as_save_IFS
13011  test -z "$as_dir" && as_dir=.
13012    for ac_exec_ext in '' $ac_executable_extensions; do
13013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13014    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13016    break 2
13017  fi
13018done
13019  done
13020IFS=$as_save_IFS
13021
13022  ;;
13023esac
13024fi
13025DF=$ac_cv_path_DF
13026if test -n "$DF"; then
13027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13028$as_echo "$DF" >&6; }
13029else
13030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031$as_echo "no" >&6; }
13032fi
13033
13034
13035        if test "x$DF" = x; then
13036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13037        fi
13038      else
13039        # Otherwise we believe it is a complete path. Use it as it is.
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13041$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13043$as_echo_n "checking for DF... " >&6; }
13044        if test ! -x "$tool_specified"; then
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13046$as_echo "not found" >&6; }
13047          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13048        fi
13049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13050$as_echo "$tool_specified" >&6; }
13051      fi
13052    fi
13053  fi
13054
13055
13056
13057
13058  # Publish this variable in the help.
13059
13060
13061  if test "x$SETFILE" = x; then
13062    # The variable is not set by user, try to locate tool using the code snippet
13063    for ac_prog in SetFile
13064do
13065  # Extract the first word of "$ac_prog", so it can be a program name with args.
13066set dummy $ac_prog; ac_word=$2
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068$as_echo_n "checking for $ac_word... " >&6; }
13069if ${ac_cv_path_SETFILE+:} false; then :
13070  $as_echo_n "(cached) " >&6
13071else
13072  case $SETFILE in
13073  [\\/]* | ?:[\\/]*)
13074  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13075  ;;
13076  *)
13077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078for as_dir in $PATH
13079do
13080  IFS=$as_save_IFS
13081  test -z "$as_dir" && as_dir=.
13082    for ac_exec_ext in '' $ac_executable_extensions; do
13083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086    break 2
13087  fi
13088done
13089  done
13090IFS=$as_save_IFS
13091
13092  ;;
13093esac
13094fi
13095SETFILE=$ac_cv_path_SETFILE
13096if test -n "$SETFILE"; then
13097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13098$as_echo "$SETFILE" >&6; }
13099else
13100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
13102fi
13103
13104
13105  test -n "$SETFILE" && break
13106done
13107
13108  else
13109    # The variable is set, but is it from the command line or the environment?
13110
13111    # Try to remove the string !SETFILE! from our list.
13112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13114      # If it failed, the variable was not from the command line. Ignore it,
13115      # but warn the user (except for BASH, which is always set by the calling BASH).
13116      if test "xSETFILE" != xBASH; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13118$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13119      fi
13120      # Try to locate tool using the code snippet
13121      for ac_prog in SetFile
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_path_SETFILE+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  case $SETFILE in
13131  [\\/]* | ?:[\\/]*)
13132  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13133  ;;
13134  *)
13135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13136for as_dir in $PATH
13137do
13138  IFS=$as_save_IFS
13139  test -z "$as_dir" && as_dir=.
13140    for ac_exec_ext in '' $ac_executable_extensions; do
13141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13142    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13144    break 2
13145  fi
13146done
13147  done
13148IFS=$as_save_IFS
13149
13150  ;;
13151esac
13152fi
13153SETFILE=$ac_cv_path_SETFILE
13154if test -n "$SETFILE"; then
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13156$as_echo "$SETFILE" >&6; }
13157else
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
13160fi
13161
13162
13163  test -n "$SETFILE" && break
13164done
13165
13166    else
13167      # If it succeeded, then it was overridden by the user. We will use it
13168      # for the tool.
13169
13170      # First remove it from the list of overridden variables, so we can test
13171      # for unknown variables in the end.
13172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13173
13174      # Check if the provided tool contains a complete path.
13175      tool_specified="$SETFILE"
13176      tool_basename="${tool_specified##*/}"
13177      if test "x$tool_basename" = "x$tool_specified"; then
13178        # A command without a complete path is provided, search $PATH.
13179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13180$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13181        # Extract the first word of "$tool_basename", so it can be a program name with args.
13182set dummy $tool_basename; ac_word=$2
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13184$as_echo_n "checking for $ac_word... " >&6; }
13185if ${ac_cv_path_SETFILE+:} false; then :
13186  $as_echo_n "(cached) " >&6
13187else
13188  case $SETFILE in
13189  [\\/]* | ?:[\\/]*)
13190  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13191  ;;
13192  *)
13193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_exec_ext in '' $ac_executable_extensions; do
13199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13200    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13202    break 2
13203  fi
13204done
13205  done
13206IFS=$as_save_IFS
13207
13208  ;;
13209esac
13210fi
13211SETFILE=$ac_cv_path_SETFILE
13212if test -n "$SETFILE"; then
13213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13214$as_echo "$SETFILE" >&6; }
13215else
13216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13217$as_echo "no" >&6; }
13218fi
13219
13220
13221        if test "x$SETFILE" = x; then
13222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13223        fi
13224      else
13225        # Otherwise we believe it is a complete path. Use it as it is.
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13227$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13229$as_echo_n "checking for SETFILE... " >&6; }
13230        if test ! -x "$tool_specified"; then
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13232$as_echo "not found" >&6; }
13233          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13234        fi
13235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13236$as_echo "$tool_specified" >&6; }
13237      fi
13238    fi
13239  fi
13240
13241
13242
13243
13244  # Publish this variable in the help.
13245
13246
13247  if test "x$CPIO" = x; then
13248    # The variable is not set by user, try to locate tool using the code snippet
13249    for ac_prog in cpio bsdcpio
13250do
13251  # Extract the first word of "$ac_prog", so it can be a program name with args.
13252set dummy $ac_prog; ac_word=$2
13253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13254$as_echo_n "checking for $ac_word... " >&6; }
13255if ${ac_cv_path_CPIO+:} false; then :
13256  $as_echo_n "(cached) " >&6
13257else
13258  case $CPIO in
13259  [\\/]* | ?:[\\/]*)
13260  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13261  ;;
13262  *)
13263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264for as_dir in $PATH
13265do
13266  IFS=$as_save_IFS
13267  test -z "$as_dir" && as_dir=.
13268    for ac_exec_ext in '' $ac_executable_extensions; do
13269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13270    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13272    break 2
13273  fi
13274done
13275  done
13276IFS=$as_save_IFS
13277
13278  ;;
13279esac
13280fi
13281CPIO=$ac_cv_path_CPIO
13282if test -n "$CPIO"; then
13283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13284$as_echo "$CPIO" >&6; }
13285else
13286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13287$as_echo "no" >&6; }
13288fi
13289
13290
13291  test -n "$CPIO" && break
13292done
13293
13294  else
13295    # The variable is set, but is it from the command line or the environment?
13296
13297    # Try to remove the string !CPIO! from our list.
13298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13300      # If it failed, the variable was not from the command line. Ignore it,
13301      # but warn the user (except for BASH, which is always set by the calling BASH).
13302      if test "xCPIO" != xBASH; then
13303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13304$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13305      fi
13306      # Try to locate tool using the code snippet
13307      for ac_prog in cpio bsdcpio
13308do
13309  # Extract the first word of "$ac_prog", so it can be a program name with args.
13310set dummy $ac_prog; ac_word=$2
13311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13312$as_echo_n "checking for $ac_word... " >&6; }
13313if ${ac_cv_path_CPIO+:} false; then :
13314  $as_echo_n "(cached) " >&6
13315else
13316  case $CPIO in
13317  [\\/]* | ?:[\\/]*)
13318  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13319  ;;
13320  *)
13321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13322for as_dir in $PATH
13323do
13324  IFS=$as_save_IFS
13325  test -z "$as_dir" && as_dir=.
13326    for ac_exec_ext in '' $ac_executable_extensions; do
13327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13328    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13330    break 2
13331  fi
13332done
13333  done
13334IFS=$as_save_IFS
13335
13336  ;;
13337esac
13338fi
13339CPIO=$ac_cv_path_CPIO
13340if test -n "$CPIO"; then
13341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13342$as_echo "$CPIO" >&6; }
13343else
13344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13345$as_echo "no" >&6; }
13346fi
13347
13348
13349  test -n "$CPIO" && break
13350done
13351
13352    else
13353      # If it succeeded, then it was overridden by the user. We will use it
13354      # for the tool.
13355
13356      # First remove it from the list of overridden variables, so we can test
13357      # for unknown variables in the end.
13358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13359
13360      # Check if the provided tool contains a complete path.
13361      tool_specified="$CPIO"
13362      tool_basename="${tool_specified##*/}"
13363      if test "x$tool_basename" = "x$tool_specified"; then
13364        # A command without a complete path is provided, search $PATH.
13365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13366$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13367        # Extract the first word of "$tool_basename", so it can be a program name with args.
13368set dummy $tool_basename; ac_word=$2
13369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13370$as_echo_n "checking for $ac_word... " >&6; }
13371if ${ac_cv_path_CPIO+:} false; then :
13372  $as_echo_n "(cached) " >&6
13373else
13374  case $CPIO in
13375  [\\/]* | ?:[\\/]*)
13376  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13377  ;;
13378  *)
13379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13380for as_dir in $PATH
13381do
13382  IFS=$as_save_IFS
13383  test -z "$as_dir" && as_dir=.
13384    for ac_exec_ext in '' $ac_executable_extensions; do
13385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13386    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13388    break 2
13389  fi
13390done
13391  done
13392IFS=$as_save_IFS
13393
13394  ;;
13395esac
13396fi
13397CPIO=$ac_cv_path_CPIO
13398if test -n "$CPIO"; then
13399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13400$as_echo "$CPIO" >&6; }
13401else
13402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13403$as_echo "no" >&6; }
13404fi
13405
13406
13407        if test "x$CPIO" = x; then
13408          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13409        fi
13410      else
13411        # Otherwise we believe it is a complete path. Use it as it is.
13412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13413$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13415$as_echo_n "checking for CPIO... " >&6; }
13416        if test ! -x "$tool_specified"; then
13417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13418$as_echo "not found" >&6; }
13419          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13420        fi
13421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13422$as_echo "$tool_specified" >&6; }
13423      fi
13424    fi
13425  fi
13426
13427
13428
13429
13430# Now we can determine OpenJDK build and target platforms. This is required to
13431# have early on.
13432# Make sure we can run config.sub.
13433$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13434  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13435
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13437$as_echo_n "checking build system type... " >&6; }
13438if ${ac_cv_build+:} false; then :
13439  $as_echo_n "(cached) " >&6
13440else
13441  ac_build_alias=$build_alias
13442test "x$ac_build_alias" = x &&
13443  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13444test "x$ac_build_alias" = x &&
13445  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13446ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13447  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13451$as_echo "$ac_cv_build" >&6; }
13452case $ac_cv_build in
13453*-*-*) ;;
13454*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13455esac
13456build=$ac_cv_build
13457ac_save_IFS=$IFS; IFS='-'
13458set x $ac_cv_build
13459shift
13460build_cpu=$1
13461build_vendor=$2
13462shift; shift
13463# Remember, the first character of IFS is used to create $*,
13464# except with old shells:
13465build_os=$*
13466IFS=$ac_save_IFS
13467case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13468
13469
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13471$as_echo_n "checking host system type... " >&6; }
13472if ${ac_cv_host+:} false; then :
13473  $as_echo_n "(cached) " >&6
13474else
13475  if test "x$host_alias" = x; then
13476  ac_cv_host=$ac_cv_build
13477else
13478  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13479    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13480fi
13481
13482fi
13483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13484$as_echo "$ac_cv_host" >&6; }
13485case $ac_cv_host in
13486*-*-*) ;;
13487*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13488esac
13489host=$ac_cv_host
13490ac_save_IFS=$IFS; IFS='-'
13491set x $ac_cv_host
13492shift
13493host_cpu=$1
13494host_vendor=$2
13495shift; shift
13496# Remember, the first character of IFS is used to create $*,
13497# except with old shells:
13498host_os=$*
13499IFS=$ac_save_IFS
13500case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13501
13502
13503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13504$as_echo_n "checking target system type... " >&6; }
13505if ${ac_cv_target+:} false; then :
13506  $as_echo_n "(cached) " >&6
13507else
13508  if test "x$target_alias" = x; then
13509  ac_cv_target=$ac_cv_host
13510else
13511  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13512    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13513fi
13514
13515fi
13516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13517$as_echo "$ac_cv_target" >&6; }
13518case $ac_cv_target in
13519*-*-*) ;;
13520*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13521esac
13522target=$ac_cv_target
13523ac_save_IFS=$IFS; IFS='-'
13524set x $ac_cv_target
13525shift
13526target_cpu=$1
13527target_vendor=$2
13528shift; shift
13529# Remember, the first character of IFS is used to create $*,
13530# except with old shells:
13531target_os=$*
13532IFS=$ac_save_IFS
13533case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13534
13535
13536# The aliases save the names the user supplied, while $host etc.
13537# will get canonicalized.
13538test -n "$target_alias" &&
13539  test "$program_prefix$program_suffix$program_transform_name" = \
13540    NONENONEs,x,x, &&
13541  program_prefix=${target_alias}-
13542
13543  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13544  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13545  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13546  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13547  # to use the configure naming style.
13548
13549
13550
13551
13552
13553  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13554  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13555  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13556  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13557  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13558  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13559
13560
13561
13562  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13563
13564  case "$build_os" in
13565    *linux*)
13566      VAR_OS=linux
13567      VAR_OS_TYPE=unix
13568      ;;
13569    *solaris*)
13570      VAR_OS=solaris
13571      VAR_OS_TYPE=unix
13572      ;;
13573    *darwin*)
13574      VAR_OS=macosx
13575      VAR_OS_TYPE=unix
13576      ;;
13577    *bsd*)
13578      VAR_OS=bsd
13579      VAR_OS_TYPE=unix
13580      ;;
13581    *cygwin*)
13582      VAR_OS=windows
13583      VAR_OS_ENV=windows.cygwin
13584      ;;
13585    *mingw*)
13586      VAR_OS=windows
13587      VAR_OS_ENV=windows.msys
13588      ;;
13589    *aix*)
13590      VAR_OS=aix
13591      VAR_OS_TYPE=unix
13592      ;;
13593    *)
13594      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13595      ;;
13596  esac
13597
13598
13599  # First argument is the cpu name from the trip/quad
13600  case "$build_cpu" in
13601    x86_64)
13602      VAR_CPU=x86_64
13603      VAR_CPU_ARCH=x86
13604      VAR_CPU_BITS=64
13605      VAR_CPU_ENDIAN=little
13606      ;;
13607    i?86)
13608      VAR_CPU=x86
13609      VAR_CPU_ARCH=x86
13610      VAR_CPU_BITS=32
13611      VAR_CPU_ENDIAN=little
13612      ;;
13613    arm*)
13614      VAR_CPU=arm
13615      VAR_CPU_ARCH=arm
13616      VAR_CPU_BITS=32
13617      VAR_CPU_ENDIAN=little
13618      ;;
13619    aarch64)
13620      VAR_CPU=aarch64
13621      VAR_CPU_ARCH=aarch64
13622      VAR_CPU_BITS=64
13623      VAR_CPU_ENDIAN=little
13624      ;;
13625    powerpc)
13626      VAR_CPU=ppc
13627      VAR_CPU_ARCH=ppc
13628      VAR_CPU_BITS=32
13629      VAR_CPU_ENDIAN=big
13630      ;;
13631    powerpc64)
13632      VAR_CPU=ppc64
13633      VAR_CPU_ARCH=ppc
13634      VAR_CPU_BITS=64
13635      VAR_CPU_ENDIAN=big
13636      ;;
13637    powerpc64le)
13638      VAR_CPU=ppc64
13639      VAR_CPU_ARCH=ppc
13640      VAR_CPU_BITS=64
13641      VAR_CPU_ENDIAN=little
13642      ;;
13643    s390)
13644      VAR_CPU=s390
13645      VAR_CPU_ARCH=s390
13646      VAR_CPU_BITS=32
13647      VAR_CPU_ENDIAN=big
13648      ;;
13649    s390x)
13650      VAR_CPU=s390x
13651      VAR_CPU_ARCH=s390
13652      VAR_CPU_BITS=64
13653      VAR_CPU_ENDIAN=big
13654      ;;
13655    sparc)
13656      VAR_CPU=sparc
13657      VAR_CPU_ARCH=sparc
13658      VAR_CPU_BITS=32
13659      VAR_CPU_ENDIAN=big
13660      ;;
13661    sparcv9|sparc64)
13662      VAR_CPU=sparcv9
13663      VAR_CPU_ARCH=sparc
13664      VAR_CPU_BITS=64
13665      VAR_CPU_ENDIAN=big
13666      ;;
13667    *)
13668      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13669      ;;
13670  esac
13671
13672  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13673  OPENJDK_BUILD_OS="$VAR_OS"
13674  if test "x$VAR_OS_TYPE" != x; then
13675    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13676  else
13677    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13678  fi
13679  if test "x$VAR_OS_ENV" != x; then
13680    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13681  else
13682    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13683  fi
13684  OPENJDK_BUILD_CPU="$VAR_CPU"
13685  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13686  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13687  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13688
13689
13690
13691
13692
13693
13694
13695
13696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13697$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13699$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13700
13701  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13702
13703  case "$host_os" in
13704    *linux*)
13705      VAR_OS=linux
13706      VAR_OS_TYPE=unix
13707      ;;
13708    *solaris*)
13709      VAR_OS=solaris
13710      VAR_OS_TYPE=unix
13711      ;;
13712    *darwin*)
13713      VAR_OS=macosx
13714      VAR_OS_TYPE=unix
13715      ;;
13716    *bsd*)
13717      VAR_OS=bsd
13718      VAR_OS_TYPE=unix
13719      ;;
13720    *cygwin*)
13721      VAR_OS=windows
13722      VAR_OS_ENV=windows.cygwin
13723      ;;
13724    *mingw*)
13725      VAR_OS=windows
13726      VAR_OS_ENV=windows.msys
13727      ;;
13728    *aix*)
13729      VAR_OS=aix
13730      VAR_OS_TYPE=unix
13731      ;;
13732    *)
13733      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13734      ;;
13735  esac
13736
13737
13738  # First argument is the cpu name from the trip/quad
13739  case "$host_cpu" in
13740    x86_64)
13741      VAR_CPU=x86_64
13742      VAR_CPU_ARCH=x86
13743      VAR_CPU_BITS=64
13744      VAR_CPU_ENDIAN=little
13745      ;;
13746    i?86)
13747      VAR_CPU=x86
13748      VAR_CPU_ARCH=x86
13749      VAR_CPU_BITS=32
13750      VAR_CPU_ENDIAN=little
13751      ;;
13752    arm*)
13753      VAR_CPU=arm
13754      VAR_CPU_ARCH=arm
13755      VAR_CPU_BITS=32
13756      VAR_CPU_ENDIAN=little
13757      ;;
13758    aarch64)
13759      VAR_CPU=aarch64
13760      VAR_CPU_ARCH=aarch64
13761      VAR_CPU_BITS=64
13762      VAR_CPU_ENDIAN=little
13763      ;;
13764    powerpc)
13765      VAR_CPU=ppc
13766      VAR_CPU_ARCH=ppc
13767      VAR_CPU_BITS=32
13768      VAR_CPU_ENDIAN=big
13769      ;;
13770    powerpc64)
13771      VAR_CPU=ppc64
13772      VAR_CPU_ARCH=ppc
13773      VAR_CPU_BITS=64
13774      VAR_CPU_ENDIAN=big
13775      ;;
13776    powerpc64le)
13777      VAR_CPU=ppc64
13778      VAR_CPU_ARCH=ppc
13779      VAR_CPU_BITS=64
13780      VAR_CPU_ENDIAN=little
13781      ;;
13782    s390)
13783      VAR_CPU=s390
13784      VAR_CPU_ARCH=s390
13785      VAR_CPU_BITS=32
13786      VAR_CPU_ENDIAN=big
13787      ;;
13788    s390x)
13789      VAR_CPU=s390x
13790      VAR_CPU_ARCH=s390
13791      VAR_CPU_BITS=64
13792      VAR_CPU_ENDIAN=big
13793      ;;
13794    sparc)
13795      VAR_CPU=sparc
13796      VAR_CPU_ARCH=sparc
13797      VAR_CPU_BITS=32
13798      VAR_CPU_ENDIAN=big
13799      ;;
13800    sparcv9|sparc64)
13801      VAR_CPU=sparcv9
13802      VAR_CPU_ARCH=sparc
13803      VAR_CPU_BITS=64
13804      VAR_CPU_ENDIAN=big
13805      ;;
13806    *)
13807      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13808      ;;
13809  esac
13810
13811  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13812  OPENJDK_TARGET_OS="$VAR_OS"
13813  if test "x$VAR_OS_TYPE" != x; then
13814    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13815  else
13816    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13817  fi
13818  if test "x$VAR_OS_ENV" != x; then
13819    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13820  else
13821    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13822  fi
13823  OPENJDK_TARGET_CPU="$VAR_CPU"
13824  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13825  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13826  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13827
13828
13829
13830
13831
13832
13833
13834
13835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13836$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13838$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13839
13840
13841
13842# Check whether --with-target-bits was given.
13843if test "${with_target_bits+set}" = set; then :
13844  withval=$with_target_bits;
13845fi
13846
13847
13848  # We have three types of compiles:
13849  # native  == normal compilation, target system == build system
13850  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13851  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13852  #
13853  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13854    # We're doing a proper cross-compilation
13855    COMPILE_TYPE="cross"
13856  else
13857    COMPILE_TYPE="native"
13858  fi
13859
13860  if test "x$with_target_bits" != x; then
13861    if test "x$COMPILE_TYPE" = "xcross"; then
13862      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13863    fi
13864
13865    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13866      # A reduced build is requested
13867      COMPILE_TYPE="reduced"
13868      OPENJDK_TARGET_CPU_BITS=32
13869      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13870        OPENJDK_TARGET_CPU=x86
13871      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13872        OPENJDK_TARGET_CPU=sparc
13873      else
13874        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13875      fi
13876    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13877      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
13878    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13879      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13880$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13881    else
13882      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13883    fi
13884  fi
13885
13886
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13888$as_echo_n "checking compilation type... " >&6; }
13889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13890$as_echo "$COMPILE_TYPE" >&6; }
13891
13892
13893  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13894    REQUIRED_OS_NAME=SunOS
13895    REQUIRED_OS_VERSION=5.10
13896  fi
13897  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13898    REQUIRED_OS_NAME=Linux
13899    REQUIRED_OS_VERSION=2.6
13900  fi
13901  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13902    REQUIRED_OS_NAME=Windows
13903    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13904      REQUIRED_OS_VERSION=5.2
13905    else
13906      REQUIRED_OS_VERSION=5.1
13907    fi
13908  fi
13909  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13910    REQUIRED_OS_NAME=Darwin
13911    REQUIRED_OS_VERSION=11.2
13912  fi
13913
13914
13915
13916
13917
13918  # Also store the legacy naming of the cpu.
13919  # Ie i586 and amd64 instead of x86 and x86_64
13920  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13921  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13922    OPENJDK_TARGET_CPU_LEGACY="i586"
13923  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13924    # On all platforms except MacOSX replace x86_64 with amd64.
13925    OPENJDK_TARGET_CPU_LEGACY="amd64"
13926  fi
13927
13928
13929  # And the second legacy naming of the cpu.
13930  # Ie i386 and amd64 instead of x86 and x86_64.
13931  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13932  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13933    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13934  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13935    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13936  fi
13937
13938
13939  # This is the name of the cpu (but using i386 and amd64 instead of
13940  # x86 and x86_64, respectively), preceeded by a /, to be used when
13941  # locating libraries. On macosx, it's empty, though.
13942  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13943  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13944    OPENJDK_TARGET_CPU_LIBDIR=""
13945  fi
13946
13947
13948  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13949  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13950  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13951  OPENJDK_TARGET_CPU_ISADIR=""
13952  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13953    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13954      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13955    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13956      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13957    fi
13958  fi
13959
13960
13961  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13962  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13963  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13964    # On linux only, we replace x86 with i386.
13965    OPENJDK_TARGET_CPU_OSARCH="i386"
13966  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13967    # On all platforms except macosx, we replace x86_64 with amd64.
13968    OPENJDK_TARGET_CPU_OSARCH="amd64"
13969  fi
13970
13971
13972  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13973  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13974    OPENJDK_TARGET_CPU_JLI="i386"
13975  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13976    # On all platforms except macosx, we replace x86_64 with amd64.
13977    OPENJDK_TARGET_CPU_JLI="amd64"
13978  fi
13979  # Now setup the -D flags for building libjli.
13980  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13981  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13982    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13983      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13984    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13985      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13986    fi
13987  fi
13988
13989
13990  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13991      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13992  else
13993      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13994  fi
13995
13996
13997  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13998    A_LP64="LP64:="
13999    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14000    # unpack200.exe
14001    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14002      ADD_LP64="-D_LP64=1"
14003    fi
14004  fi
14005  LP64=$A_LP64
14006
14007
14008  if test "x$COMPILE_TYPE" = "xcross"; then
14009    # FIXME: ... or should this include reduced builds..?
14010    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14011  else
14012    DEFINE_CROSS_COMPILE_ARCH=""
14013  fi
14014
14015
14016  # ZERO_ARCHDEF is used to enable architecture-specific code
14017  case "${OPENJDK_TARGET_CPU}" in
14018    ppc)     ZERO_ARCHDEF=PPC32 ;;
14019    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14020    s390*)   ZERO_ARCHDEF=S390  ;;
14021    sparc*)  ZERO_ARCHDEF=SPARC ;;
14022    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14023    x86)     ZERO_ARCHDEF=IA32  ;;
14024    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14025  esac
14026
14027
14028
14029
14030# Continue setting up basic stuff. Most remaining code require fundamental tools.
14031
14032  # Save the current directory this script was started from
14033  CURDIR="$PWD"
14034
14035  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14036    PATH_SEP=";"
14037
14038  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14039  if test $SRC_ROOT_LENGTH -gt 100; then
14040    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14041  fi
14042
14043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14045$as_echo_n "checking cygwin release... " >&6; }
14046    CYGWIN_VERSION=`$UNAME -r`
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14048$as_echo "$CYGWIN_VERSION" >&6; }
14049    WINDOWS_ENV_VENDOR='cygwin'
14050    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14051
14052    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14053    if test "x$CYGWIN_VERSION_OLD" != x; then
14054      { $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
14055$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;}
14056      as_fn_error $? "Cannot continue" "$LINENO" 5
14057    fi
14058    if test "x$CYGPATH" = x; then
14059      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14060    fi
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14062$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14063    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14064    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14065    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14066    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14068$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14069    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14070    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14071    if test "x$test_cygdrive_prefix" = x; then
14072      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14073    fi
14074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14076$as_echo_n "checking msys release... " >&6; }
14077    MSYS_VERSION=`$UNAME -r`
14078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14079$as_echo "$MSYS_VERSION" >&6; }
14080
14081    WINDOWS_ENV_VENDOR='msys'
14082    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14083
14084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14085$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14086    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14087    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14088
14089  windows_path="$MSYS_ROOT_PATH"
14090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14091    unix_path=`$CYGPATH -u "$windows_path"`
14092    MSYS_ROOT_PATH="$unix_path"
14093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14095    MSYS_ROOT_PATH="$unix_path"
14096  fi
14097
14098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14099$as_echo "$MSYS_ROOT_PATH" >&6; }
14100    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14101  else
14102    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14103  fi
14104
14105  # Test if windows or unix (cygwin/msys) find is first in path.
14106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14107$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14108  FIND_BINARY_OUTPUT=`find --version 2>&1`
14109  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14111$as_echo "unix style" >&6; }
14112  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14114$as_echo "Windows" >&6; }
14115    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14116$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14117    { $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
14118$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14119    as_fn_error $? "Cannot continue" "$LINENO" 5
14120  else
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14122$as_echo "unknown" >&6; }
14123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14124$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14125  fi
14126
14127  else
14128    PATH_SEP=":"
14129  fi
14130
14131
14132  # We get the top-level directory from the supporting wrappers.
14133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14134$as_echo_n "checking for top-level directory... " >&6; }
14135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14136$as_echo "$TOPDIR" >&6; }
14137
14138
14139  # Save the original version of TOPDIR for string comparisons
14140  ORIGINAL_TOPDIR="$TOPDIR"
14141
14142
14143  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14144
14145  # Only process if variable expands to non-empty
14146
14147  if test "x$CURDIR" != x; then
14148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14149
14150  # Input might be given as Windows format, start by converting to
14151  # unix format.
14152  path="$CURDIR"
14153  new_path=`$CYGPATH -u "$path"`
14154
14155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14158  # "foo.exe" is OK but "foo" is an error.
14159  #
14160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14161  # It is also a way to make sure we got the proper file name for the real test later on.
14162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14163  if test "x$test_shortpath" = x; then
14164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14165$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14166    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14167  fi
14168
14169  # Call helper function which possibly converts this using DOS-style short mode.
14170  # If so, the updated path is stored in $new_path.
14171
14172  input_path="$new_path"
14173  # Check if we need to convert this using DOS-style short mode. If the path
14174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14175  # take no chances and rewrite it.
14176  # Note: m4 eats our [], so we need to use [ and ] instead.
14177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14178  if test "x$has_forbidden_chars" != x; then
14179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14183      # Going to short mode and back again did indeed matter. Since short mode is
14184      # case insensitive, let's make it lowercase to improve readability.
14185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14186      # Now convert it back to Unix-style (cygpath)
14187      input_path=`$CYGPATH -u "$shortmode_path"`
14188      new_path="$input_path"
14189    fi
14190  fi
14191
14192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14193  if test "x$test_cygdrive_prefix" = x; then
14194    # As a simple fix, exclude /usr/bin since it's not a real path.
14195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14197      # a path prefixed by /cygdrive for fixpath to work.
14198      new_path="$CYGWIN_ROOT_PATH$input_path"
14199    fi
14200  fi
14201
14202
14203  if test "x$path" != "x$new_path"; then
14204    CURDIR="$new_path"
14205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14206$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14207  fi
14208
14209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14210
14211  path="$CURDIR"
14212  has_colon=`$ECHO $path | $GREP ^.:`
14213  new_path="$path"
14214  if test "x$has_colon" = x; then
14215    # Not in mixed or Windows style, start by that.
14216    new_path=`cmd //c echo $path`
14217  fi
14218
14219
14220  input_path="$new_path"
14221  # Check if we need to convert this using DOS-style short mode. If the path
14222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14223  # take no chances and rewrite it.
14224  # Note: m4 eats our [], so we need to use [ and ] instead.
14225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14226  if test "x$has_forbidden_chars" != x; then
14227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14229  fi
14230
14231
14232  windows_path="$new_path"
14233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14234    unix_path=`$CYGPATH -u "$windows_path"`
14235    new_path="$unix_path"
14236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14238    new_path="$unix_path"
14239  fi
14240
14241  if test "x$path" != "x$new_path"; then
14242    CURDIR="$new_path"
14243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14244$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14245  fi
14246
14247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14249
14250    else
14251      # We're on a unix platform. Hooray! :)
14252      path="$CURDIR"
14253      has_space=`$ECHO "$path" | $GREP " "`
14254      if test "x$has_space" != x; then
14255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14256$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14258      fi
14259
14260      # Use eval to expand a potential ~
14261      eval path="$path"
14262      if test ! -f "$path" && test ! -d "$path"; then
14263        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14264      fi
14265
14266      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14267    fi
14268  fi
14269
14270
14271  # Only process if variable expands to non-empty
14272
14273  if test "x$TOPDIR" != x; then
14274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14275
14276  # Input might be given as Windows format, start by converting to
14277  # unix format.
14278  path="$TOPDIR"
14279  new_path=`$CYGPATH -u "$path"`
14280
14281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14284  # "foo.exe" is OK but "foo" is an error.
14285  #
14286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14287  # It is also a way to make sure we got the proper file name for the real test later on.
14288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14289  if test "x$test_shortpath" = x; then
14290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14291$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14292    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14293  fi
14294
14295  # Call helper function which possibly converts this using DOS-style short mode.
14296  # If so, the updated path is stored in $new_path.
14297
14298  input_path="$new_path"
14299  # Check if we need to convert this using DOS-style short mode. If the path
14300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14301  # take no chances and rewrite it.
14302  # Note: m4 eats our [], so we need to use [ and ] instead.
14303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14304  if test "x$has_forbidden_chars" != x; then
14305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14309      # Going to short mode and back again did indeed matter. Since short mode is
14310      # case insensitive, let's make it lowercase to improve readability.
14311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14312      # Now convert it back to Unix-style (cygpath)
14313      input_path=`$CYGPATH -u "$shortmode_path"`
14314      new_path="$input_path"
14315    fi
14316  fi
14317
14318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14319  if test "x$test_cygdrive_prefix" = x; then
14320    # As a simple fix, exclude /usr/bin since it's not a real path.
14321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14323      # a path prefixed by /cygdrive for fixpath to work.
14324      new_path="$CYGWIN_ROOT_PATH$input_path"
14325    fi
14326  fi
14327
14328
14329  if test "x$path" != "x$new_path"; then
14330    TOPDIR="$new_path"
14331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14332$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14333  fi
14334
14335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14336
14337  path="$TOPDIR"
14338  has_colon=`$ECHO $path | $GREP ^.:`
14339  new_path="$path"
14340  if test "x$has_colon" = x; then
14341    # Not in mixed or Windows style, start by that.
14342    new_path=`cmd //c echo $path`
14343  fi
14344
14345
14346  input_path="$new_path"
14347  # Check if we need to convert this using DOS-style short mode. If the path
14348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14349  # take no chances and rewrite it.
14350  # Note: m4 eats our [], so we need to use [ and ] instead.
14351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14352  if test "x$has_forbidden_chars" != x; then
14353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14355  fi
14356
14357
14358  windows_path="$new_path"
14359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14360    unix_path=`$CYGPATH -u "$windows_path"`
14361    new_path="$unix_path"
14362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14364    new_path="$unix_path"
14365  fi
14366
14367  if test "x$path" != "x$new_path"; then
14368    TOPDIR="$new_path"
14369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14370$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14371  fi
14372
14373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14375
14376    else
14377      # We're on a unix platform. Hooray! :)
14378      path="$TOPDIR"
14379      has_space=`$ECHO "$path" | $GREP " "`
14380      if test "x$has_space" != x; then
14381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14382$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14384      fi
14385
14386      # Use eval to expand a potential ~
14387      eval path="$path"
14388      if test ! -f "$path" && test ! -d "$path"; then
14389        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14390      fi
14391
14392      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14393    fi
14394  fi
14395
14396  # SRC_ROOT is a traditional alias for TOPDIR.
14397  SRC_ROOT=$TOPDIR
14398
14399  # Calculate a canonical version of TOPDIR for string comparisons
14400  CANONICAL_TOPDIR=$TOPDIR
14401
14402  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14403    # Follow a chain of symbolic links. Use readlink
14404    # where it exists, else fall back to horribly
14405    # complicated shell code.
14406    if test "x$READLINK_TESTED" != yes; then
14407      # On MacOSX there is a readlink tool with a different
14408      # purpose than the GNU readlink tool. Check the found readlink.
14409      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14410      if test "x$ISGNU" = x; then
14411        # A readlink that we do not know how to use.
14412        # Are there other non-GNU readlinks out there?
14413        READLINK_TESTED=yes
14414        READLINK=
14415      fi
14416    fi
14417
14418    if test "x$READLINK" != x; then
14419      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14420    else
14421      # Save the current directory for restoring afterwards
14422      STARTDIR=$PWD
14423      COUNTER=0
14424      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14425      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14426      cd $sym_link_dir
14427      # Use -P flag to resolve symlinks in directories.
14428      cd `$THEPWDCMD -P`
14429      sym_link_dir=`$THEPWDCMD -P`
14430      # Resolve file symlinks
14431      while test $COUNTER -lt 20; do
14432        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14433        if test "x$ISLINK" == x; then
14434          # This is not a symbolic link! We are done!
14435          break
14436        fi
14437        # Again resolve directory symlinks since the target of the just found
14438        # link could be in a different directory
14439        cd `$DIRNAME $ISLINK`
14440        sym_link_dir=`$THEPWDCMD -P`
14441        sym_link_file=`$BASENAME $ISLINK`
14442        let COUNTER=COUNTER+1
14443      done
14444      cd $STARTDIR
14445      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14446    fi
14447  fi
14448
14449
14450
14451  # Locate the directory of this script.
14452  AUTOCONF_DIR=$TOPDIR/common/autoconf
14453
14454
14455# Check if it's a pure open build or if custom sources are to be used.
14456
14457  # Check whether --enable-openjdk-only was given.
14458if test "${enable_openjdk_only+set}" = set; then :
14459  enableval=$enable_openjdk_only;
14460else
14461  enable_openjdk_only="no"
14462fi
14463
14464
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14466$as_echo_n "checking for presence of closed sources... " >&6; }
14467  if test -d "$SRC_ROOT/jdk/src/closed"; then
14468    CLOSED_SOURCE_PRESENT=yes
14469  else
14470    CLOSED_SOURCE_PRESENT=no
14471  fi
14472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14473$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14474
14475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14476$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14477  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14479$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14480
14481  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14482    OPENJDK=true
14483    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14484      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14485$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14486    fi
14487  else
14488    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14489      OPENJDK=true
14490    else
14491      OPENJDK=false
14492    fi
14493  fi
14494
14495  if test "x$OPENJDK" = "xtrue"; then
14496    SET_OPENJDK="OPENJDK=true"
14497  fi
14498
14499
14500
14501  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14502  # the IncludeCustomExtension macro.
14503
14504
14505# Check whether --with-custom-make-dir was given.
14506if test "${with_custom_make_dir+set}" = set; then :
14507  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
14508$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14509fi
14510
14511
14512
14513
14514# These are needed to be able to create a configuration name (and thus the output directory)
14515
14516  ###############################################################################
14517  #
14518  # Check which variant of the JDK that we want to build.
14519  # Currently we have:
14520  #    normal:   standard edition
14521  # but the custom make system may add other variants
14522  #
14523  # Effectively the JDK variant gives a name to a specific set of
14524  # modules to compile into the JDK. In the future, these modules
14525  # might even be Jigsaw modules.
14526  #
14527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14528$as_echo_n "checking which variant of the JDK to build... " >&6; }
14529
14530# Check whether --with-jdk-variant was given.
14531if test "${with_jdk_variant+set}" = set; then :
14532  withval=$with_jdk_variant;
14533fi
14534
14535
14536  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14537    JDK_VARIANT="normal"
14538  else
14539    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14540  fi
14541
14542
14543
14544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14545$as_echo "$JDK_VARIANT" >&6; }
14546
14547
14548###############################################################################
14549#
14550# Check which interpreter of the JVM we want to build.
14551# Currently we have:
14552#    template: Template interpreter (the default)
14553#    cpp     : C++ interpreter
14554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14555$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14556
14557# Check whether --with-jvm-interpreter was given.
14558if test "${with_jvm_interpreter+set}" = set; then :
14559  withval=$with_jvm_interpreter;
14560fi
14561
14562
14563if test "x$with_jvm_interpreter" = x; then
14564     with_jvm_interpreter="template"
14565fi
14566
14567JVM_INTERPRETER="$with_jvm_interpreter"
14568
14569if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14570   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14571fi
14572
14573
14574
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14576$as_echo "$with_jvm_interpreter" >&6; }
14577
14578
14579
14580  ###############################################################################
14581  #
14582  # Check which variants of the JVM that we want to build.
14583  # Currently we have:
14584  #    server: normal interpreter and a tiered C1/C2 compiler
14585  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14586  #    minimal1: reduced form of client with optional VM services and features stripped out
14587  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14588  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14589  #    zero: no machine code interpreter, no compiler
14590  #    zeroshark: zero interpreter and shark/llvm compiler backend
14591#    core: interpreter only, no compiler (only works on some platforms)
14592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14593$as_echo_n "checking which variants of the JVM to build... " >&6; }
14594
14595# Check whether --with-jvm-variants was given.
14596if test "${with_jvm_variants+set}" = set; then :
14597  withval=$with_jvm_variants;
14598fi
14599
14600
14601  if test "x$with_jvm_variants" = x; then
14602    with_jvm_variants="server"
14603  fi
14604
14605  JVM_VARIANTS=",$with_jvm_variants,"
14606  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14607
14608  if test "x$TEST_VARIANTS" != "x,"; then
14609     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14610  fi
14611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14612$as_echo "$with_jvm_variants" >&6; }
14613
14614  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14615  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14616  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14617  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14618  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14619  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14620  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14621
14622  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14624      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14625    fi
14626  fi
14627  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14628    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14629      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14630    fi
14631  fi
14632  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14633    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14634      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14635    fi
14636  fi
14637
14638  # Replace the commas with AND for use in the build directory name.
14639  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14640  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14641  if test "x$COUNT_VARIANTS" != "x,1"; then
14642    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14643  else
14644    BUILDING_MULTIPLE_JVM_VARIANTS=no
14645  fi
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656  INCLUDE_SA=true
14657  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14658    INCLUDE_SA=false
14659  fi
14660  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14661    INCLUDE_SA=false
14662  fi
14663  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14664    INCLUDE_SA=false
14665  fi
14666  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14667    INCLUDE_SA=false
14668  fi
14669
14670
14671  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14672    MACOSX_UNIVERSAL="true"
14673  fi
14674
14675
14676
14677
14678  ###############################################################################
14679  #
14680  # Set the debug level
14681  #    release: no debug information, all optimizations, no asserts.
14682  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14683  #    fastdebug: debug information (-g), all optimizations, all asserts
14684  #    slowdebug: debug information (-g), no optimizations, all asserts
14685  #
14686  DEBUG_LEVEL="release"
14687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14688$as_echo_n "checking which debug level to use... " >&6; }
14689  # Check whether --enable-debug was given.
14690if test "${enable_debug+set}" = set; then :
14691  enableval=$enable_debug;
14692        ENABLE_DEBUG="${enableval}"
14693        DEBUG_LEVEL="fastdebug"
14694
14695else
14696  ENABLE_DEBUG="no"
14697fi
14698
14699
14700
14701# Check whether --with-debug-level was given.
14702if test "${with_debug_level+set}" = set; then :
14703  withval=$with_debug_level;
14704        DEBUG_LEVEL="${withval}"
14705        if test "x$ENABLE_DEBUG" = xyes; then
14706          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14707        fi
14708
14709fi
14710
14711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14712$as_echo "$DEBUG_LEVEL" >&6; }
14713
14714  if test "x$DEBUG_LEVEL" != xrelease && \
14715      test "x$DEBUG_LEVEL" != xoptimized && \
14716      test "x$DEBUG_LEVEL" != xfastdebug && \
14717      test "x$DEBUG_LEVEL" != xslowdebug; then
14718    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14719  fi
14720
14721
14722  ###############################################################################
14723  #
14724  # Setup legacy vars/targets and new vars to deal with different debug levels.
14725  #
14726
14727  case $DEBUG_LEVEL in
14728    release )
14729      VARIANT="OPT"
14730      FASTDEBUG="false"
14731      DEBUG_CLASSFILES="false"
14732      BUILD_VARIANT_RELEASE=""
14733      HOTSPOT_DEBUG_LEVEL="product"
14734      HOTSPOT_EXPORT="product"
14735      ;;
14736    fastdebug )
14737      VARIANT="DBG"
14738      FASTDEBUG="true"
14739      DEBUG_CLASSFILES="true"
14740      BUILD_VARIANT_RELEASE="-fastdebug"
14741      HOTSPOT_DEBUG_LEVEL="fastdebug"
14742      HOTSPOT_EXPORT="fastdebug"
14743      ;;
14744    slowdebug )
14745      VARIANT="DBG"
14746      FASTDEBUG="false"
14747      DEBUG_CLASSFILES="true"
14748      BUILD_VARIANT_RELEASE="-debug"
14749      HOTSPOT_DEBUG_LEVEL="debug"
14750      HOTSPOT_EXPORT="debug"
14751      ;;
14752    optimized )
14753      VARIANT="OPT"
14754      FASTDEBUG="false"
14755      DEBUG_CLASSFILES="false"
14756      BUILD_VARIANT_RELEASE="-optimized"
14757      HOTSPOT_DEBUG_LEVEL="optimized"
14758      HOTSPOT_EXPORT="optimized"
14759      ;;
14760  esac
14761
14762  # The debug level 'optimized' is a little special because it is currently only
14763  # applicable to the HotSpot build where it means to build a completely
14764  # optimized version of the VM without any debugging code (like for the
14765  # 'release' debug level which is called 'product' in the HotSpot build) but
14766  # with the exception that it can contain additional code which is otherwise
14767  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14768  # test new and/or experimental features which are not intended for customer
14769  # shipment. Because these new features need to be tested and benchmarked in
14770  # real world scenarios, we want to build the containing JDK at the 'release'
14771  # debug level.
14772  if test "x$DEBUG_LEVEL" = xoptimized; then
14773    DEBUG_LEVEL="release"
14774  fi
14775
14776  #####
14777  # Generate the legacy makefile targets for hotspot.
14778  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14779  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14780  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14781  # But until then ...
14782  HOTSPOT_TARGET=""
14783
14784  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14785    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14786  fi
14787
14788  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14789    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14790  fi
14791
14792  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14793    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14794  fi
14795
14796  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14797    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14798  fi
14799
14800  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14801    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14802  fi
14803
14804  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14805    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14806  fi
14807
14808  if test "x$JVM_VARIANT_CORE" = xtrue; then
14809    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14810  fi
14811
14812  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14813
14814  # On Macosx universal binaries are produced, but they only contain
14815  # 64 bit intel. This invalidates control of which jvms are built
14816  # from configure, but only server is valid anyway. Fix this
14817  # when hotspot makefiles are rewritten.
14818  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14819    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14820  fi
14821
14822  #####
14823
14824
14825
14826
14827
14828
14829
14830
14831# With basic setup done, call the custom early hook.
14832
14833
14834# Check if we have devkits, extra paths or sysroot set.
14835
14836
14837# Check whether --with-devkit was given.
14838if test "${with_devkit+set}" = set; then :
14839  withval=$with_devkit;
14840
14841  # Only process if variable expands to non-empty
14842
14843  if test "x$with_devkit" != x; then
14844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14845
14846  # Input might be given as Windows format, start by converting to
14847  # unix format.
14848  path="$with_devkit"
14849  new_path=`$CYGPATH -u "$path"`
14850
14851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14854  # "foo.exe" is OK but "foo" is an error.
14855  #
14856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14857  # It is also a way to make sure we got the proper file name for the real test later on.
14858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14859  if test "x$test_shortpath" = x; then
14860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14861$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14862    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14863  fi
14864
14865  # Call helper function which possibly converts this using DOS-style short mode.
14866  # If so, the updated path is stored in $new_path.
14867
14868  input_path="$new_path"
14869  # Check if we need to convert this using DOS-style short mode. If the path
14870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14871  # take no chances and rewrite it.
14872  # Note: m4 eats our [], so we need to use [ and ] instead.
14873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14874  if test "x$has_forbidden_chars" != x; then
14875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14879      # Going to short mode and back again did indeed matter. Since short mode is
14880      # case insensitive, let's make it lowercase to improve readability.
14881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14882      # Now convert it back to Unix-style (cygpath)
14883      input_path=`$CYGPATH -u "$shortmode_path"`
14884      new_path="$input_path"
14885    fi
14886  fi
14887
14888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14889  if test "x$test_cygdrive_prefix" = x; then
14890    # As a simple fix, exclude /usr/bin since it's not a real path.
14891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14893      # a path prefixed by /cygdrive for fixpath to work.
14894      new_path="$CYGWIN_ROOT_PATH$input_path"
14895    fi
14896  fi
14897
14898
14899  if test "x$path" != "x$new_path"; then
14900    with_devkit="$new_path"
14901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14902$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14903  fi
14904
14905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14906
14907  path="$with_devkit"
14908  has_colon=`$ECHO $path | $GREP ^.:`
14909  new_path="$path"
14910  if test "x$has_colon" = x; then
14911    # Not in mixed or Windows style, start by that.
14912    new_path=`cmd //c echo $path`
14913  fi
14914
14915
14916  input_path="$new_path"
14917  # Check if we need to convert this using DOS-style short mode. If the path
14918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14919  # take no chances and rewrite it.
14920  # Note: m4 eats our [], so we need to use [ and ] instead.
14921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14922  if test "x$has_forbidden_chars" != x; then
14923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14925  fi
14926
14927
14928  windows_path="$new_path"
14929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14930    unix_path=`$CYGPATH -u "$windows_path"`
14931    new_path="$unix_path"
14932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14934    new_path="$unix_path"
14935  fi
14936
14937  if test "x$path" != "x$new_path"; then
14938    with_devkit="$new_path"
14939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14940$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14941  fi
14942
14943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14945
14946    else
14947      # We're on a unix platform. Hooray! :)
14948      path="$with_devkit"
14949      has_space=`$ECHO "$path" | $GREP " "`
14950      if test "x$has_space" != x; then
14951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14952$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14954      fi
14955
14956      # Use eval to expand a potential ~
14957      eval path="$path"
14958      if test ! -f "$path" && test ! -d "$path"; then
14959        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14960      fi
14961
14962      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14963    fi
14964  fi
14965
14966        DEVKIT_ROOT="$with_devkit"
14967        # Check for a meta data info file in the root of the devkit
14968        if test -f "$DEVKIT_ROOT/devkit.info"; then
14969          . $DEVKIT_ROOT/devkit.info
14970          # This potentially sets the following:
14971          # A descriptive name of the devkit
14972
14973  if test "x$DEVKIT_NAME" = x; then
14974    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14975  fi
14976
14977          # Corresponds to --with-extra-path
14978
14979  if test "x$DEVKIT_EXTRA_PATH" = x; then
14980    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14981  fi
14982
14983          # Corresponds to --with-toolchain-path
14984
14985  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14986    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14987  fi
14988
14989          # Corresponds to --with-sysroot
14990
14991  if test "x$DEVKIT_SYSROOT" = x; then
14992    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14993  fi
14994
14995
14996          # Identifies the Visual Studio version in the devkit
14997
14998  if test "x$DEVKIT_VS_VERSION" = x; then
14999    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15000  fi
15001
15002          # The Visual Studio include environment variable
15003
15004  if test "x$DEVKIT_VS_INCLUDE" = x; then
15005    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15006  fi
15007
15008          # The Visual Studio lib environment variable
15009
15010  if test "x$DEVKIT_VS_LIB" = x; then
15011    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15012  fi
15013
15014          # Corresponds to --with-msvcr-dll
15015
15016  if test "x$DEVKIT_MSVCR_DLL" = x; then
15017    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15018  fi
15019
15020          # Corresponds to --with-msvcp-dll
15021
15022  if test "x$DEVKIT_MSVCP_DLL" = x; then
15023    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15024  fi
15025
15026        fi
15027
15028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15029$as_echo_n "checking for devkit... " >&6; }
15030        if test "x$DEVKIT_NAME" != x; then
15031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15032$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15033        else
15034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15035$as_echo "$DEVKIT_ROOT" >&6; }
15036        fi
15037
15038
15039  if test "x$DEVKIT_EXTRA_PATH" != x; then
15040    if test "x$EXTRA_PATH" = x; then
15041      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15042    else
15043      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15044    fi
15045  fi
15046
15047
15048        # Fallback default of just /bin if DEVKIT_PATH is not defined
15049        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15050          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15051        fi
15052
15053  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15054    if test "x$TOOLCHAIN_PATH" = x; then
15055      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15056    else
15057      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15058    fi
15059  fi
15060
15061
15062        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15063        # places for backwards compatiblity.
15064        if test "x$DEVKIT_SYSROOT" != x; then
15065          SYSROOT="$DEVKIT_SYSROOT"
15066        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15067          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15068        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15069          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15070        fi
15071
15072
15073fi
15074
15075
15076  # You can force the sysroot if the sysroot encoded into the compiler tools
15077  # is not correct.
15078
15079# Check whether --with-sys-root was given.
15080if test "${with_sys_root+set}" = set; then :
15081  withval=$with_sys_root; SYSROOT=$with_sys_root
15082
15083fi
15084
15085
15086
15087# Check whether --with-sysroot was given.
15088if test "${with_sysroot+set}" = set; then :
15089  withval=$with_sysroot; SYSROOT=$with_sysroot
15090
15091fi
15092
15093
15094
15095# Check whether --with-tools-dir was given.
15096if test "${with_tools_dir+set}" = set; then :
15097  withval=$with_tools_dir;
15098  if test "x$with_tools_dir" != x; then
15099    if test "x$TOOLCHAIN_PATH" = x; then
15100      TOOLCHAIN_PATH="$with_tools_dir"
15101    else
15102      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15103    fi
15104  fi
15105
15106
15107fi
15108
15109
15110
15111# Check whether --with-toolchain-path was given.
15112if test "${with_toolchain_path+set}" = set; then :
15113  withval=$with_toolchain_path;
15114  if test "x$with_toolchain_path" != x; then
15115    if test "x$TOOLCHAIN_PATH" = x; then
15116      TOOLCHAIN_PATH="$with_toolchain_path"
15117    else
15118      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15119    fi
15120  fi
15121
15122
15123fi
15124
15125
15126
15127# Check whether --with-extra-path was given.
15128if test "${with_extra_path+set}" = set; then :
15129  withval=$with_extra_path;
15130  if test "x$with_extra_path" != x; then
15131    if test "x$EXTRA_PATH" = x; then
15132      EXTRA_PATH="$with_extra_path"
15133    else
15134      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15135    fi
15136  fi
15137
15138
15139fi
15140
15141
15142  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15143    # detect if Xcode is installed by running xcodebuild -version
15144    # if no Xcode installed, xcodebuild exits with 1
15145    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15146    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15147      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15148      # fall back on the stub binary in /usr/bin/xcodebuild
15149      # Extract the first word of "xcodebuild", so it can be a program name with args.
15150set dummy xcodebuild; ac_word=$2
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15152$as_echo_n "checking for $ac_word... " >&6; }
15153if ${ac_cv_path_XCODEBUILD+:} false; then :
15154  $as_echo_n "(cached) " >&6
15155else
15156  case $XCODEBUILD in
15157  [\\/]* | ?:[\\/]*)
15158  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15159  ;;
15160  *)
15161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15162for as_dir in $TOOLCHAIN_PATH
15163do
15164  IFS=$as_save_IFS
15165  test -z "$as_dir" && as_dir=.
15166    for ac_exec_ext in '' $ac_executable_extensions; do
15167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15168    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15170    break 2
15171  fi
15172done
15173  done
15174IFS=$as_save_IFS
15175
15176  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15177  ;;
15178esac
15179fi
15180XCODEBUILD=$ac_cv_path_XCODEBUILD
15181if test -n "$XCODEBUILD"; then
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15183$as_echo "$XCODEBUILD" >&6; }
15184else
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15186$as_echo "no" >&6; }
15187fi
15188
15189
15190    else
15191      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15192      # when only the command line tools are installed there are no SDKs, so headers
15193      # are copied into the system frameworks
15194      XCODEBUILD=
15195
15196    fi
15197
15198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15199$as_echo_n "checking for sdk name... " >&6; }
15200
15201# Check whether --with-sdk-name was given.
15202if test "${with_sdk_name+set}" = set; then :
15203  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15204
15205fi
15206
15207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15208$as_echo "$SDKNAME" >&6; }
15209
15210    # if toolchain path is specified then don't rely on system headers, they may not compile
15211    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15212    test -z "$TOOLCHAIN_PATH" && \
15213      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15214
15215    if test -z "$SYSROOT"; then
15216      if test -n "$XCODEBUILD"; then
15217        # if we don't have system headers, use default SDK name (last resort)
15218        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15219          SDKNAME=${SDKNAME:-macosx}
15220        fi
15221
15222        if test -n "$SDKNAME"; then
15223          # Call xcodebuild to determine SYSROOT
15224          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15225        fi
15226      else
15227        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15228          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
15229        fi
15230      fi
15231    else
15232      # warn user if --with-sdk-name was also set
15233      if test -n "$with_sdk_name"; then
15234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15235$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15236      fi
15237    fi
15238
15239    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15240      # If no system framework headers, then SYSROOT must be set, or we won't build
15241      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
15242    fi
15243
15244    # Perform a basic sanity test
15245    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15246      if test -z "$SYSROOT"; then
15247        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
15248      else
15249        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15250      fi
15251    fi
15252
15253    # set SDKROOT too, Xcode tools will pick it up
15254    SDKROOT=$SYSROOT
15255
15256  fi
15257
15258  # Prepend the extra path to the global path
15259
15260  if test "x$EXTRA_PATH" != x; then
15261    if test "x$PATH" = x; then
15262      PATH="$EXTRA_PATH"
15263    else
15264      PATH="$EXTRA_PATH:$PATH"
15265    fi
15266  fi
15267
15268
15269  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15270    # Add extra search paths on solaris for utilities like ar and as etc...
15271    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15272  fi
15273
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15275$as_echo_n "checking for sysroot... " >&6; }
15276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15277$as_echo "$SYSROOT" >&6; }
15278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15279$as_echo_n "checking for toolchain path... " >&6; }
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15281$as_echo "$TOOLCHAIN_PATH" >&6; }
15282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15283$as_echo_n "checking for extra path... " >&6; }
15284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15285$as_echo "$EXTRA_PATH" >&6; }
15286
15287
15288# To properly create a configuration name, we need to have the OpenJDK target
15289# and options (variants and debug level) parsed.
15290
15291
15292
15293# Check whether --with-conf-name was given.
15294if test "${with_conf_name+set}" = set; then :
15295  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15296fi
15297
15298
15299  # Test from where we are running configure, in or outside of src root.
15300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15301$as_echo_n "checking where to store configuration... " >&6; }
15302  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15303      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15304      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15305    # We are running configure from the src root.
15306    # Create a default ./build/target-variant-debuglevel output root.
15307    if test "x${CONF_NAME}" = x; then
15308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15309$as_echo "in default location" >&6; }
15310      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15311    else
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15313$as_echo "in build directory with custom name" >&6; }
15314    fi
15315    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15316    $MKDIR -p "$OUTPUT_ROOT"
15317    if test ! -d "$OUTPUT_ROOT"; then
15318      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15319    fi
15320  else
15321    # We are running configure from outside of the src dir.
15322    # Then use the current directory as output dir!
15323    # If configuration is situated in normal build directory, just use the build
15324    # directory name as configuration name, otherwise use the complete path.
15325    if test "x${CONF_NAME}" = x; then
15326      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15327    fi
15328    OUTPUT_ROOT="$CURDIR"
15329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15330$as_echo "in current directory" >&6; }
15331
15332    # WARNING: This might be a bad thing to do. You need to be sure you want to
15333    # have a configuration in this directory. Do some sanity checks!
15334
15335    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15336      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15337      # other files
15338      files_present=`$LS $OUTPUT_ROOT`
15339      # Configure has already touched config.log and confdefs.h in the current dir when this check
15340      # is performed.
15341      filtered_files=`$ECHO "$files_present" \
15342          | $SED -e 's/config.log//g' \
15343              -e 's/configure.log//g' \
15344              -e 's/confdefs.h//g' \
15345              -e 's/ //g' \
15346          | $TR -d '\n'`
15347      if test "x$filtered_files" != x; then
15348        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15349$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15350        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15351$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15352        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15353$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15354        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15355$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15356        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15357$as_echo "$as_me: seriously mess up just about everything." >&6;}
15358        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15359$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15360        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15361$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15362        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15363      fi
15364    fi
15365  fi
15366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15367$as_echo_n "checking what configuration name to use... " >&6; }
15368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15369$as_echo "$CONF_NAME" >&6; }
15370
15371
15372  # Only process if variable expands to non-empty
15373
15374  if test "x$OUTPUT_ROOT" != x; then
15375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15376
15377  # Input might be given as Windows format, start by converting to
15378  # unix format.
15379  path="$OUTPUT_ROOT"
15380  new_path=`$CYGPATH -u "$path"`
15381
15382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15385  # "foo.exe" is OK but "foo" is an error.
15386  #
15387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15388  # It is also a way to make sure we got the proper file name for the real test later on.
15389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15390  if test "x$test_shortpath" = x; then
15391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15392$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15393    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15394  fi
15395
15396  # Call helper function which possibly converts this using DOS-style short mode.
15397  # If so, the updated path is stored in $new_path.
15398
15399  input_path="$new_path"
15400  # Check if we need to convert this using DOS-style short mode. If the path
15401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15402  # take no chances and rewrite it.
15403  # Note: m4 eats our [], so we need to use [ and ] instead.
15404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15405  if test "x$has_forbidden_chars" != x; then
15406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15410      # Going to short mode and back again did indeed matter. Since short mode is
15411      # case insensitive, let's make it lowercase to improve readability.
15412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15413      # Now convert it back to Unix-style (cygpath)
15414      input_path=`$CYGPATH -u "$shortmode_path"`
15415      new_path="$input_path"
15416    fi
15417  fi
15418
15419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15420  if test "x$test_cygdrive_prefix" = x; then
15421    # As a simple fix, exclude /usr/bin since it's not a real path.
15422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15424      # a path prefixed by /cygdrive for fixpath to work.
15425      new_path="$CYGWIN_ROOT_PATH$input_path"
15426    fi
15427  fi
15428
15429
15430  if test "x$path" != "x$new_path"; then
15431    OUTPUT_ROOT="$new_path"
15432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15433$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15434  fi
15435
15436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15437
15438  path="$OUTPUT_ROOT"
15439  has_colon=`$ECHO $path | $GREP ^.:`
15440  new_path="$path"
15441  if test "x$has_colon" = x; then
15442    # Not in mixed or Windows style, start by that.
15443    new_path=`cmd //c echo $path`
15444  fi
15445
15446
15447  input_path="$new_path"
15448  # Check if we need to convert this using DOS-style short mode. If the path
15449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15450  # take no chances and rewrite it.
15451  # Note: m4 eats our [], so we need to use [ and ] instead.
15452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15453  if test "x$has_forbidden_chars" != x; then
15454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15456  fi
15457
15458
15459  windows_path="$new_path"
15460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15461    unix_path=`$CYGPATH -u "$windows_path"`
15462    new_path="$unix_path"
15463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15465    new_path="$unix_path"
15466  fi
15467
15468  if test "x$path" != "x$new_path"; then
15469    OUTPUT_ROOT="$new_path"
15470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15471$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15472  fi
15473
15474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15476
15477    else
15478      # We're on a unix platform. Hooray! :)
15479      path="$OUTPUT_ROOT"
15480      has_space=`$ECHO "$path" | $GREP " "`
15481      if test "x$has_space" != x; then
15482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15483$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15485      fi
15486
15487      # Use eval to expand a potential ~
15488      eval path="$path"
15489      if test ! -f "$path" && test ! -d "$path"; then
15490        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15491      fi
15492
15493      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15494    fi
15495  fi
15496
15497
15498  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15499  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15500
15501  SPEC=$OUTPUT_ROOT/spec.gmk
15502
15503  CONF_NAME=$CONF_NAME
15504
15505  OUTPUT_ROOT=$OUTPUT_ROOT
15506
15507
15508
15509  # The spec.gmk file contains all variables for the make system.
15510  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15511
15512  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15513  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15514
15515  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15516  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15517
15518  # The compare.sh is used to compare the build output to other builds.
15519  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15520
15521  # The generated Makefile knows where the spec.gmk is and where the source is.
15522  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15523  # which will look for generated configurations
15524  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15525
15526
15527
15528# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15529
15530  for ac_prog in apt-get yum port pkgutil pkgadd
15531do
15532  # Extract the first word of "$ac_prog", so it can be a program name with args.
15533set dummy $ac_prog; ac_word=$2
15534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15535$as_echo_n "checking for $ac_word... " >&6; }
15536if ${ac_cv_prog_PKGHANDLER+:} false; then :
15537  $as_echo_n "(cached) " >&6
15538else
15539  if test -n "$PKGHANDLER"; then
15540  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15541else
15542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15543for as_dir in $PATH
15544do
15545  IFS=$as_save_IFS
15546  test -z "$as_dir" && as_dir=.
15547    for ac_exec_ext in '' $ac_executable_extensions; do
15548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15549    ac_cv_prog_PKGHANDLER="$ac_prog"
15550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15551    break 2
15552  fi
15553done
15554  done
15555IFS=$as_save_IFS
15556
15557fi
15558fi
15559PKGHANDLER=$ac_cv_prog_PKGHANDLER
15560if test -n "$PKGHANDLER"; then
15561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15562$as_echo "$PKGHANDLER" >&6; }
15563else
15564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15565$as_echo "no" >&6; }
15566fi
15567
15568
15569  test -n "$PKGHANDLER" && break
15570done
15571
15572
15573
15574# Setup tools that requires more complex handling, or that is not needed by the configure script.
15575
15576
15577  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15578  if test "x$MAKE" != x; then
15579    # User has supplied a make, test it.
15580    if test ! -f "$MAKE"; then
15581      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15582    fi
15583
15584  MAKE_CANDIDATE=""$MAKE""
15585  DESCRIPTION="user supplied MAKE=$MAKE"
15586
15587  # On Cygwin, we require a newer version of make than on other platforms
15588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15589    MAKE_VERSION_EXPR="-e 4\."
15590    MAKE_REQUIRED_VERSION="4.0"
15591   else
15592    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15593    MAKE_REQUIRED_VERSION="3.81"
15594  fi
15595
15596  if test "x$MAKE_CANDIDATE" != x; then
15597    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15598$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15599    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15600    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15601    if test "x$IS_GNU_MAKE" = x; then
15602      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15603$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15604    else
15605      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15606      if test "x$IS_MODERN_MAKE" = x; then
15607        { $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
15608$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;}
15609      else
15610        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15611          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15612            MAKE_EXPECTED_ENV='cygwin'
15613          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15614            MAKE_EXPECTED_ENV='msys'
15615          else
15616            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15617          fi
15618          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15619          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15620        else
15621          # Not relevant for non-Windows
15622          IS_MAKE_CORRECT_ENV=true
15623        fi
15624        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15625          { $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
15626$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;}
15627        else
15628          FOUND_MAKE=$MAKE_CANDIDATE
15629
15630  # Only process if variable expands to non-empty
15631
15632  if test "x$FOUND_MAKE" != x; then
15633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15634
15635  # First separate the path from the arguments. This will split at the first
15636  # space.
15637  complete="$FOUND_MAKE"
15638  path="${complete%% *}"
15639  tmp="$complete EOL"
15640  arguments="${tmp#* }"
15641
15642  # Input might be given as Windows format, start by converting to
15643  # unix format.
15644  new_path=`$CYGPATH -u "$path"`
15645
15646  # Now try to locate executable using which
15647  new_path=`$WHICH "$new_path" 2> /dev/null`
15648  # bat and cmd files are not always considered executable in cygwin causing which
15649  # to not find them
15650  if test "x$new_path" = x \
15651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15653    new_path=`$CYGPATH -u "$path"`
15654  fi
15655  if test "x$new_path" = x; then
15656    # Oops. Which didn't find the executable.
15657    # The splitting of arguments from the executable at a space might have been incorrect,
15658    # since paths with space are more likely in Windows. Give it another try with the whole
15659    # argument.
15660    path="$complete"
15661    arguments="EOL"
15662    new_path=`$CYGPATH -u "$path"`
15663    new_path=`$WHICH "$new_path" 2> /dev/null`
15664    # bat and cmd files are not always considered executable in cygwin causing which
15665    # to not find them
15666    if test "x$new_path" = x \
15667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15669      new_path=`$CYGPATH -u "$path"`
15670    fi
15671    if test "x$new_path" = x; then
15672      # It's still not found. Now this is an unrecoverable error.
15673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15675      has_space=`$ECHO "$complete" | $GREP " "`
15676      if test "x$has_space" != x; then
15677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15679      fi
15680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15681    fi
15682  fi
15683
15684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15687  # "foo.exe" is OK but "foo" is an error.
15688  #
15689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15690  # It is also a way to make sure we got the proper file name for the real test later on.
15691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15692  if test "x$test_shortpath" = x; then
15693    # Short path failed, file does not exist as specified.
15694    # Try adding .exe or .cmd
15695    if test -f "${new_path}.exe"; then
15696      input_to_shortpath="${new_path}.exe"
15697    elif test -f "${new_path}.cmd"; then
15698      input_to_shortpath="${new_path}.cmd"
15699    else
15700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15705    fi
15706  else
15707    input_to_shortpath="$new_path"
15708  fi
15709
15710  # Call helper function which possibly converts this using DOS-style short mode.
15711  # If so, the updated path is stored in $new_path.
15712  new_path="$input_to_shortpath"
15713
15714  input_path="$input_to_shortpath"
15715  # Check if we need to convert this using DOS-style short mode. If the path
15716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15717  # take no chances and rewrite it.
15718  # Note: m4 eats our [], so we need to use [ and ] instead.
15719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15720  if test "x$has_forbidden_chars" != x; then
15721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15725      # Going to short mode and back again did indeed matter. Since short mode is
15726      # case insensitive, let's make it lowercase to improve readability.
15727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15728      # Now convert it back to Unix-style (cygpath)
15729      input_path=`$CYGPATH -u "$shortmode_path"`
15730      new_path="$input_path"
15731    fi
15732  fi
15733
15734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15735  if test "x$test_cygdrive_prefix" = x; then
15736    # As a simple fix, exclude /usr/bin since it's not a real path.
15737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15739      # a path prefixed by /cygdrive for fixpath to work.
15740      new_path="$CYGWIN_ROOT_PATH$input_path"
15741    fi
15742  fi
15743
15744  # remove trailing .exe if any
15745  new_path="${new_path/%.exe/}"
15746
15747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15748
15749  # First separate the path from the arguments. This will split at the first
15750  # space.
15751  complete="$FOUND_MAKE"
15752  path="${complete%% *}"
15753  tmp="$complete EOL"
15754  arguments="${tmp#* }"
15755
15756  # Input might be given as Windows format, start by converting to
15757  # unix format.
15758  new_path="$path"
15759
15760  windows_path="$new_path"
15761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15762    unix_path=`$CYGPATH -u "$windows_path"`
15763    new_path="$unix_path"
15764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15766    new_path="$unix_path"
15767  fi
15768
15769
15770  # Now try to locate executable using which
15771  new_path=`$WHICH "$new_path" 2> /dev/null`
15772
15773  if test "x$new_path" = x; then
15774    # Oops. Which didn't find the executable.
15775    # The splitting of arguments from the executable at a space might have been incorrect,
15776    # since paths with space are more likely in Windows. Give it another try with the whole
15777    # argument.
15778    path="$complete"
15779    arguments="EOL"
15780    new_path="$path"
15781
15782  windows_path="$new_path"
15783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15784    unix_path=`$CYGPATH -u "$windows_path"`
15785    new_path="$unix_path"
15786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15788    new_path="$unix_path"
15789  fi
15790
15791
15792    new_path=`$WHICH "$new_path" 2> /dev/null`
15793    # bat and cmd files are not always considered executable in MSYS causing which
15794    # to not find them
15795    if test "x$new_path" = x \
15796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15798      new_path="$path"
15799
15800  windows_path="$new_path"
15801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15802    unix_path=`$CYGPATH -u "$windows_path"`
15803    new_path="$unix_path"
15804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15806    new_path="$unix_path"
15807  fi
15808
15809    fi
15810
15811    if test "x$new_path" = x; then
15812      # It's still not found. Now this is an unrecoverable error.
15813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15815      has_space=`$ECHO "$complete" | $GREP " "`
15816      if test "x$has_space" != x; then
15817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15819      fi
15820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15821    fi
15822  fi
15823
15824  # Now new_path has a complete unix path to the binary
15825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15826    # Keep paths in /bin as-is, but remove trailing .exe if any
15827    new_path="${new_path/%.exe/}"
15828    # Do not save /bin paths to all_fixpath_prefixes!
15829  else
15830    # Not in mixed or Windows style, start by that.
15831    new_path=`cmd //c echo $new_path`
15832
15833  input_path="$new_path"
15834  # Check if we need to convert this using DOS-style short mode. If the path
15835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15836  # take no chances and rewrite it.
15837  # Note: m4 eats our [], so we need to use [ and ] instead.
15838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15839  if test "x$has_forbidden_chars" != x; then
15840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15842  fi
15843
15844    # Output is in $new_path
15845
15846  windows_path="$new_path"
15847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15848    unix_path=`$CYGPATH -u "$windows_path"`
15849    new_path="$unix_path"
15850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15852    new_path="$unix_path"
15853  fi
15854
15855    # remove trailing .exe if any
15856    new_path="${new_path/%.exe/}"
15857
15858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15860  fi
15861
15862    else
15863      # We're on a unix platform. Hooray! :)
15864      # First separate the path from the arguments. This will split at the first
15865      # space.
15866      complete="$FOUND_MAKE"
15867      path="${complete%% *}"
15868      tmp="$complete EOL"
15869      arguments="${tmp#* }"
15870
15871      # Cannot rely on the command "which" here since it doesn't always work.
15872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15873      if test -z "$is_absolute_path"; then
15874        # Path to executable is not absolute. Find it.
15875        IFS_save="$IFS"
15876        IFS=:
15877        for p in $PATH; do
15878          if test -f "$p/$path" && test -x "$p/$path"; then
15879            new_path="$p/$path"
15880            break
15881          fi
15882        done
15883        IFS="$IFS_save"
15884      else
15885        # This is an absolute path, we can use it without further modifications.
15886        new_path="$path"
15887      fi
15888
15889      if test "x$new_path" = x; then
15890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15892        has_space=`$ECHO "$complete" | $GREP " "`
15893        if test "x$has_space" != x; then
15894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15896        fi
15897        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15898      fi
15899    fi
15900
15901    # Now join together the path and the arguments once again
15902    if test "x$arguments" != xEOL; then
15903      new_complete="$new_path ${arguments% *}"
15904    else
15905      new_complete="$new_path"
15906    fi
15907
15908    if test "x$complete" != "x$new_complete"; then
15909      FOUND_MAKE="$new_complete"
15910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15911$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15912    fi
15913  fi
15914
15915        fi
15916      fi
15917    fi
15918  fi
15919
15920    if test "x$FOUND_MAKE" = x; then
15921      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15922    fi
15923  else
15924    # Try our hardest to locate a correct version of GNU make
15925    for ac_prog in gmake
15926do
15927  # Extract the first word of "$ac_prog", so it can be a program name with args.
15928set dummy $ac_prog; ac_word=$2
15929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15930$as_echo_n "checking for $ac_word... " >&6; }
15931if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15932  $as_echo_n "(cached) " >&6
15933else
15934  case $CHECK_GMAKE in
15935  [\\/]* | ?:[\\/]*)
15936  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15937  ;;
15938  *)
15939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15940for as_dir in $PATH
15941do
15942  IFS=$as_save_IFS
15943  test -z "$as_dir" && as_dir=.
15944    for ac_exec_ext in '' $ac_executable_extensions; do
15945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15946    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15948    break 2
15949  fi
15950done
15951  done
15952IFS=$as_save_IFS
15953
15954  ;;
15955esac
15956fi
15957CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15958if test -n "$CHECK_GMAKE"; then
15959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15960$as_echo "$CHECK_GMAKE" >&6; }
15961else
15962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
15964fi
15965
15966
15967  test -n "$CHECK_GMAKE" && break
15968done
15969
15970
15971  MAKE_CANDIDATE=""$CHECK_GMAKE""
15972  DESCRIPTION="gmake in PATH"
15973
15974  # On Cygwin, we require a newer version of make than on other platforms
15975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15976    MAKE_VERSION_EXPR="-e 4\."
15977    MAKE_REQUIRED_VERSION="4.0"
15978   else
15979    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15980    MAKE_REQUIRED_VERSION="3.81"
15981  fi
15982
15983  if test "x$MAKE_CANDIDATE" != x; then
15984    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15985$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15986    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15987    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15988    if test "x$IS_GNU_MAKE" = x; then
15989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15990$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15991    else
15992      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15993      if test "x$IS_MODERN_MAKE" = x; then
15994        { $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
15995$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;}
15996      else
15997        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15998          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999            MAKE_EXPECTED_ENV='cygwin'
16000          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001            MAKE_EXPECTED_ENV='msys'
16002          else
16003            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16004          fi
16005          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16006          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16007        else
16008          # Not relevant for non-Windows
16009          IS_MAKE_CORRECT_ENV=true
16010        fi
16011        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16012          { $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
16013$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;}
16014        else
16015          FOUND_MAKE=$MAKE_CANDIDATE
16016
16017  # Only process if variable expands to non-empty
16018
16019  if test "x$FOUND_MAKE" != x; then
16020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16021
16022  # First separate the path from the arguments. This will split at the first
16023  # space.
16024  complete="$FOUND_MAKE"
16025  path="${complete%% *}"
16026  tmp="$complete EOL"
16027  arguments="${tmp#* }"
16028
16029  # Input might be given as Windows format, start by converting to
16030  # unix format.
16031  new_path=`$CYGPATH -u "$path"`
16032
16033  # Now try to locate executable using which
16034  new_path=`$WHICH "$new_path" 2> /dev/null`
16035  # bat and cmd files are not always considered executable in cygwin causing which
16036  # to not find them
16037  if test "x$new_path" = x \
16038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16040    new_path=`$CYGPATH -u "$path"`
16041  fi
16042  if test "x$new_path" = x; then
16043    # Oops. Which didn't find the executable.
16044    # The splitting of arguments from the executable at a space might have been incorrect,
16045    # since paths with space are more likely in Windows. Give it another try with the whole
16046    # argument.
16047    path="$complete"
16048    arguments="EOL"
16049    new_path=`$CYGPATH -u "$path"`
16050    new_path=`$WHICH "$new_path" 2> /dev/null`
16051    # bat and cmd files are not always considered executable in cygwin causing which
16052    # to not find them
16053    if test "x$new_path" = x \
16054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16056      new_path=`$CYGPATH -u "$path"`
16057    fi
16058    if test "x$new_path" = x; then
16059      # It's still not found. Now this is an unrecoverable error.
16060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16062      has_space=`$ECHO "$complete" | $GREP " "`
16063      if test "x$has_space" != x; then
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16066      fi
16067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16068    fi
16069  fi
16070
16071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16074  # "foo.exe" is OK but "foo" is an error.
16075  #
16076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16077  # It is also a way to make sure we got the proper file name for the real test later on.
16078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16079  if test "x$test_shortpath" = x; then
16080    # Short path failed, file does not exist as specified.
16081    # Try adding .exe or .cmd
16082    if test -f "${new_path}.exe"; then
16083      input_to_shortpath="${new_path}.exe"
16084    elif test -f "${new_path}.cmd"; then
16085      input_to_shortpath="${new_path}.cmd"
16086    else
16087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16092    fi
16093  else
16094    input_to_shortpath="$new_path"
16095  fi
16096
16097  # Call helper function which possibly converts this using DOS-style short mode.
16098  # If so, the updated path is stored in $new_path.
16099  new_path="$input_to_shortpath"
16100
16101  input_path="$input_to_shortpath"
16102  # Check if we need to convert this using DOS-style short mode. If the path
16103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16104  # take no chances and rewrite it.
16105  # Note: m4 eats our [], so we need to use [ and ] instead.
16106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16107  if test "x$has_forbidden_chars" != x; then
16108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16112      # Going to short mode and back again did indeed matter. Since short mode is
16113      # case insensitive, let's make it lowercase to improve readability.
16114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16115      # Now convert it back to Unix-style (cygpath)
16116      input_path=`$CYGPATH -u "$shortmode_path"`
16117      new_path="$input_path"
16118    fi
16119  fi
16120
16121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16122  if test "x$test_cygdrive_prefix" = x; then
16123    # As a simple fix, exclude /usr/bin since it's not a real path.
16124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16126      # a path prefixed by /cygdrive for fixpath to work.
16127      new_path="$CYGWIN_ROOT_PATH$input_path"
16128    fi
16129  fi
16130
16131  # remove trailing .exe if any
16132  new_path="${new_path/%.exe/}"
16133
16134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16135
16136  # First separate the path from the arguments. This will split at the first
16137  # space.
16138  complete="$FOUND_MAKE"
16139  path="${complete%% *}"
16140  tmp="$complete EOL"
16141  arguments="${tmp#* }"
16142
16143  # Input might be given as Windows format, start by converting to
16144  # unix format.
16145  new_path="$path"
16146
16147  windows_path="$new_path"
16148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16149    unix_path=`$CYGPATH -u "$windows_path"`
16150    new_path="$unix_path"
16151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16153    new_path="$unix_path"
16154  fi
16155
16156
16157  # Now try to locate executable using which
16158  new_path=`$WHICH "$new_path" 2> /dev/null`
16159
16160  if test "x$new_path" = x; then
16161    # Oops. Which didn't find the executable.
16162    # The splitting of arguments from the executable at a space might have been incorrect,
16163    # since paths with space are more likely in Windows. Give it another try with the whole
16164    # argument.
16165    path="$complete"
16166    arguments="EOL"
16167    new_path="$path"
16168
16169  windows_path="$new_path"
16170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16171    unix_path=`$CYGPATH -u "$windows_path"`
16172    new_path="$unix_path"
16173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16175    new_path="$unix_path"
16176  fi
16177
16178
16179    new_path=`$WHICH "$new_path" 2> /dev/null`
16180    # bat and cmd files are not always considered executable in MSYS causing which
16181    # to not find them
16182    if test "x$new_path" = x \
16183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16185      new_path="$path"
16186
16187  windows_path="$new_path"
16188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16189    unix_path=`$CYGPATH -u "$windows_path"`
16190    new_path="$unix_path"
16191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16193    new_path="$unix_path"
16194  fi
16195
16196    fi
16197
16198    if test "x$new_path" = x; then
16199      # It's still not found. Now this is an unrecoverable error.
16200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16202      has_space=`$ECHO "$complete" | $GREP " "`
16203      if test "x$has_space" != x; then
16204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16206      fi
16207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16208    fi
16209  fi
16210
16211  # Now new_path has a complete unix path to the binary
16212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16213    # Keep paths in /bin as-is, but remove trailing .exe if any
16214    new_path="${new_path/%.exe/}"
16215    # Do not save /bin paths to all_fixpath_prefixes!
16216  else
16217    # Not in mixed or Windows style, start by that.
16218    new_path=`cmd //c echo $new_path`
16219
16220  input_path="$new_path"
16221  # Check if we need to convert this using DOS-style short mode. If the path
16222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16223  # take no chances and rewrite it.
16224  # Note: m4 eats our [], so we need to use [ and ] instead.
16225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16226  if test "x$has_forbidden_chars" != x; then
16227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16229  fi
16230
16231    # Output is in $new_path
16232
16233  windows_path="$new_path"
16234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16235    unix_path=`$CYGPATH -u "$windows_path"`
16236    new_path="$unix_path"
16237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16239    new_path="$unix_path"
16240  fi
16241
16242    # remove trailing .exe if any
16243    new_path="${new_path/%.exe/}"
16244
16245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16247  fi
16248
16249    else
16250      # We're on a unix platform. Hooray! :)
16251      # First separate the path from the arguments. This will split at the first
16252      # space.
16253      complete="$FOUND_MAKE"
16254      path="${complete%% *}"
16255      tmp="$complete EOL"
16256      arguments="${tmp#* }"
16257
16258      # Cannot rely on the command "which" here since it doesn't always work.
16259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16260      if test -z "$is_absolute_path"; then
16261        # Path to executable is not absolute. Find it.
16262        IFS_save="$IFS"
16263        IFS=:
16264        for p in $PATH; do
16265          if test -f "$p/$path" && test -x "$p/$path"; then
16266            new_path="$p/$path"
16267            break
16268          fi
16269        done
16270        IFS="$IFS_save"
16271      else
16272        # This is an absolute path, we can use it without further modifications.
16273        new_path="$path"
16274      fi
16275
16276      if test "x$new_path" = x; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16279        has_space=`$ECHO "$complete" | $GREP " "`
16280        if test "x$has_space" != x; then
16281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16283        fi
16284        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16285      fi
16286    fi
16287
16288    # Now join together the path and the arguments once again
16289    if test "x$arguments" != xEOL; then
16290      new_complete="$new_path ${arguments% *}"
16291    else
16292      new_complete="$new_path"
16293    fi
16294
16295    if test "x$complete" != "x$new_complete"; then
16296      FOUND_MAKE="$new_complete"
16297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16298$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16299    fi
16300  fi
16301
16302        fi
16303      fi
16304    fi
16305  fi
16306
16307
16308    if test "x$FOUND_MAKE" = x; then
16309      for ac_prog in make
16310do
16311  # Extract the first word of "$ac_prog", so it can be a program name with args.
16312set dummy $ac_prog; ac_word=$2
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16314$as_echo_n "checking for $ac_word... " >&6; }
16315if ${ac_cv_path_CHECK_MAKE+:} false; then :
16316  $as_echo_n "(cached) " >&6
16317else
16318  case $CHECK_MAKE in
16319  [\\/]* | ?:[\\/]*)
16320  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16321  ;;
16322  *)
16323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16324for as_dir in $PATH
16325do
16326  IFS=$as_save_IFS
16327  test -z "$as_dir" && as_dir=.
16328    for ac_exec_ext in '' $ac_executable_extensions; do
16329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16330    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16332    break 2
16333  fi
16334done
16335  done
16336IFS=$as_save_IFS
16337
16338  ;;
16339esac
16340fi
16341CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16342if test -n "$CHECK_MAKE"; then
16343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16344$as_echo "$CHECK_MAKE" >&6; }
16345else
16346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16347$as_echo "no" >&6; }
16348fi
16349
16350
16351  test -n "$CHECK_MAKE" && break
16352done
16353
16354
16355  MAKE_CANDIDATE=""$CHECK_MAKE""
16356  DESCRIPTION="make in PATH"
16357
16358  # On Cygwin, we require a newer version of make than on other platforms
16359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16360    MAKE_VERSION_EXPR="-e 4\."
16361    MAKE_REQUIRED_VERSION="4.0"
16362   else
16363    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16364    MAKE_REQUIRED_VERSION="3.81"
16365  fi
16366
16367  if test "x$MAKE_CANDIDATE" != x; then
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16369$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16370    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16371    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16372    if test "x$IS_GNU_MAKE" = x; then
16373      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16374$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16375    else
16376      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16377      if test "x$IS_MODERN_MAKE" = x; then
16378        { $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
16379$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;}
16380      else
16381        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16382          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16383            MAKE_EXPECTED_ENV='cygwin'
16384          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16385            MAKE_EXPECTED_ENV='msys'
16386          else
16387            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16388          fi
16389          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16390          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16391        else
16392          # Not relevant for non-Windows
16393          IS_MAKE_CORRECT_ENV=true
16394        fi
16395        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16396          { $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
16397$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;}
16398        else
16399          FOUND_MAKE=$MAKE_CANDIDATE
16400
16401  # Only process if variable expands to non-empty
16402
16403  if test "x$FOUND_MAKE" != x; then
16404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405
16406  # First separate the path from the arguments. This will split at the first
16407  # space.
16408  complete="$FOUND_MAKE"
16409  path="${complete%% *}"
16410  tmp="$complete EOL"
16411  arguments="${tmp#* }"
16412
16413  # Input might be given as Windows format, start by converting to
16414  # unix format.
16415  new_path=`$CYGPATH -u "$path"`
16416
16417  # Now try to locate executable using which
16418  new_path=`$WHICH "$new_path" 2> /dev/null`
16419  # bat and cmd files are not always considered executable in cygwin causing which
16420  # to not find them
16421  if test "x$new_path" = x \
16422      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16423      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16424    new_path=`$CYGPATH -u "$path"`
16425  fi
16426  if test "x$new_path" = x; then
16427    # Oops. Which didn't find the executable.
16428    # The splitting of arguments from the executable at a space might have been incorrect,
16429    # since paths with space are more likely in Windows. Give it another try with the whole
16430    # argument.
16431    path="$complete"
16432    arguments="EOL"
16433    new_path=`$CYGPATH -u "$path"`
16434    new_path=`$WHICH "$new_path" 2> /dev/null`
16435    # bat and cmd files are not always considered executable in cygwin causing which
16436    # to not find them
16437    if test "x$new_path" = x \
16438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16440      new_path=`$CYGPATH -u "$path"`
16441    fi
16442    if test "x$new_path" = x; then
16443      # It's still not found. Now this is an unrecoverable error.
16444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16445$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16446      has_space=`$ECHO "$complete" | $GREP " "`
16447      if test "x$has_space" != x; then
16448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16450      fi
16451      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16452    fi
16453  fi
16454
16455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16458  # "foo.exe" is OK but "foo" is an error.
16459  #
16460  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16461  # It is also a way to make sure we got the proper file name for the real test later on.
16462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16463  if test "x$test_shortpath" = x; then
16464    # Short path failed, file does not exist as specified.
16465    # Try adding .exe or .cmd
16466    if test -f "${new_path}.exe"; then
16467      input_to_shortpath="${new_path}.exe"
16468    elif test -f "${new_path}.cmd"; then
16469      input_to_shortpath="${new_path}.cmd"
16470    else
16471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16472$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16474$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16475      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16476    fi
16477  else
16478    input_to_shortpath="$new_path"
16479  fi
16480
16481  # Call helper function which possibly converts this using DOS-style short mode.
16482  # If so, the updated path is stored in $new_path.
16483  new_path="$input_to_shortpath"
16484
16485  input_path="$input_to_shortpath"
16486  # Check if we need to convert this using DOS-style short mode. If the path
16487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16488  # take no chances and rewrite it.
16489  # Note: m4 eats our [], so we need to use [ and ] instead.
16490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16491  if test "x$has_forbidden_chars" != x; then
16492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16496      # Going to short mode and back again did indeed matter. Since short mode is
16497      # case insensitive, let's make it lowercase to improve readability.
16498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16499      # Now convert it back to Unix-style (cygpath)
16500      input_path=`$CYGPATH -u "$shortmode_path"`
16501      new_path="$input_path"
16502    fi
16503  fi
16504
16505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16506  if test "x$test_cygdrive_prefix" = x; then
16507    # As a simple fix, exclude /usr/bin since it's not a real path.
16508    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16510      # a path prefixed by /cygdrive for fixpath to work.
16511      new_path="$CYGWIN_ROOT_PATH$input_path"
16512    fi
16513  fi
16514
16515  # remove trailing .exe if any
16516  new_path="${new_path/%.exe/}"
16517
16518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16519
16520  # First separate the path from the arguments. This will split at the first
16521  # space.
16522  complete="$FOUND_MAKE"
16523  path="${complete%% *}"
16524  tmp="$complete EOL"
16525  arguments="${tmp#* }"
16526
16527  # Input might be given as Windows format, start by converting to
16528  # unix format.
16529  new_path="$path"
16530
16531  windows_path="$new_path"
16532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16533    unix_path=`$CYGPATH -u "$windows_path"`
16534    new_path="$unix_path"
16535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16537    new_path="$unix_path"
16538  fi
16539
16540
16541  # Now try to locate executable using which
16542  new_path=`$WHICH "$new_path" 2> /dev/null`
16543
16544  if test "x$new_path" = x; then
16545    # Oops. Which didn't find the executable.
16546    # The splitting of arguments from the executable at a space might have been incorrect,
16547    # since paths with space are more likely in Windows. Give it another try with the whole
16548    # argument.
16549    path="$complete"
16550    arguments="EOL"
16551    new_path="$path"
16552
16553  windows_path="$new_path"
16554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16555    unix_path=`$CYGPATH -u "$windows_path"`
16556    new_path="$unix_path"
16557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16559    new_path="$unix_path"
16560  fi
16561
16562
16563    new_path=`$WHICH "$new_path" 2> /dev/null`
16564    # bat and cmd files are not always considered executable in MSYS causing which
16565    # to not find them
16566    if test "x$new_path" = x \
16567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16569      new_path="$path"
16570
16571  windows_path="$new_path"
16572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16573    unix_path=`$CYGPATH -u "$windows_path"`
16574    new_path="$unix_path"
16575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16577    new_path="$unix_path"
16578  fi
16579
16580    fi
16581
16582    if test "x$new_path" = x; then
16583      # It's still not found. Now this is an unrecoverable error.
16584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16585$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16586      has_space=`$ECHO "$complete" | $GREP " "`
16587      if test "x$has_space" != x; then
16588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16590      fi
16591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16592    fi
16593  fi
16594
16595  # Now new_path has a complete unix path to the binary
16596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16597    # Keep paths in /bin as-is, but remove trailing .exe if any
16598    new_path="${new_path/%.exe/}"
16599    # Do not save /bin paths to all_fixpath_prefixes!
16600  else
16601    # Not in mixed or Windows style, start by that.
16602    new_path=`cmd //c echo $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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16613  fi
16614
16615    # Output is in $new_path
16616
16617  windows_path="$new_path"
16618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16619    unix_path=`$CYGPATH -u "$windows_path"`
16620    new_path="$unix_path"
16621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16623    new_path="$unix_path"
16624  fi
16625
16626    # remove trailing .exe if any
16627    new_path="${new_path/%.exe/}"
16628
16629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16631  fi
16632
16633    else
16634      # We're on a unix platform. Hooray! :)
16635      # First separate the path from the arguments. This will split at the first
16636      # space.
16637      complete="$FOUND_MAKE"
16638      path="${complete%% *}"
16639      tmp="$complete EOL"
16640      arguments="${tmp#* }"
16641
16642      # Cannot rely on the command "which" here since it doesn't always work.
16643      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16644      if test -z "$is_absolute_path"; then
16645        # Path to executable is not absolute. Find it.
16646        IFS_save="$IFS"
16647        IFS=:
16648        for p in $PATH; do
16649          if test -f "$p/$path" && test -x "$p/$path"; then
16650            new_path="$p/$path"
16651            break
16652          fi
16653        done
16654        IFS="$IFS_save"
16655      else
16656        # This is an absolute path, we can use it without further modifications.
16657        new_path="$path"
16658      fi
16659
16660      if test "x$new_path" = x; then
16661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16662$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16663        has_space=`$ECHO "$complete" | $GREP " "`
16664        if test "x$has_space" != x; then
16665          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16667        fi
16668        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16669      fi
16670    fi
16671
16672    # Now join together the path and the arguments once again
16673    if test "x$arguments" != xEOL; then
16674      new_complete="$new_path ${arguments% *}"
16675    else
16676      new_complete="$new_path"
16677    fi
16678
16679    if test "x$complete" != "x$new_complete"; then
16680      FOUND_MAKE="$new_complete"
16681      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16682$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16683    fi
16684  fi
16685
16686        fi
16687      fi
16688    fi
16689  fi
16690
16691    fi
16692
16693    if test "x$FOUND_MAKE" = x; then
16694      if test "x$TOOLCHAIN_PATH" != x; then
16695        # We have a toolchain path, check that as well before giving up.
16696        OLD_PATH=$PATH
16697        PATH=$TOOLCHAIN_PATH:$PATH
16698        for ac_prog in gmake
16699do
16700  # Extract the first word of "$ac_prog", so it can be a program name with args.
16701set dummy $ac_prog; ac_word=$2
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16703$as_echo_n "checking for $ac_word... " >&6; }
16704if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16705  $as_echo_n "(cached) " >&6
16706else
16707  case $CHECK_TOOLSDIR_GMAKE in
16708  [\\/]* | ?:[\\/]*)
16709  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16710  ;;
16711  *)
16712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16713for as_dir in $PATH
16714do
16715  IFS=$as_save_IFS
16716  test -z "$as_dir" && as_dir=.
16717    for ac_exec_ext in '' $ac_executable_extensions; do
16718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16719    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16721    break 2
16722  fi
16723done
16724  done
16725IFS=$as_save_IFS
16726
16727  ;;
16728esac
16729fi
16730CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16731if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16733$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16734else
16735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16736$as_echo "no" >&6; }
16737fi
16738
16739
16740  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16741done
16742
16743
16744  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16745  DESCRIPTION="gmake in tools-dir"
16746
16747  # On Cygwin, we require a newer version of make than on other platforms
16748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749    MAKE_VERSION_EXPR="-e 4\."
16750    MAKE_REQUIRED_VERSION="4.0"
16751   else
16752    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16753    MAKE_REQUIRED_VERSION="3.81"
16754  fi
16755
16756  if test "x$MAKE_CANDIDATE" != x; then
16757    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16758$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16759    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16760    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16761    if test "x$IS_GNU_MAKE" = x; then
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16763$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16764    else
16765      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16766      if test "x$IS_MODERN_MAKE" = x; then
16767        { $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
16768$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;}
16769      else
16770        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16771          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16772            MAKE_EXPECTED_ENV='cygwin'
16773          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16774            MAKE_EXPECTED_ENV='msys'
16775          else
16776            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16777          fi
16778          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16779          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16780        else
16781          # Not relevant for non-Windows
16782          IS_MAKE_CORRECT_ENV=true
16783        fi
16784        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16785          { $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
16786$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;}
16787        else
16788          FOUND_MAKE=$MAKE_CANDIDATE
16789
16790  # Only process if variable expands to non-empty
16791
16792  if test "x$FOUND_MAKE" != x; then
16793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16794
16795  # First separate the path from the arguments. This will split at the first
16796  # space.
16797  complete="$FOUND_MAKE"
16798  path="${complete%% *}"
16799  tmp="$complete EOL"
16800  arguments="${tmp#* }"
16801
16802  # Input might be given as Windows format, start by converting to
16803  # unix format.
16804  new_path=`$CYGPATH -u "$path"`
16805
16806  # Now try to locate executable using which
16807  new_path=`$WHICH "$new_path" 2> /dev/null`
16808  # bat and cmd files are not always considered executable in cygwin causing which
16809  # to not find them
16810  if test "x$new_path" = x \
16811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16813    new_path=`$CYGPATH -u "$path"`
16814  fi
16815  if test "x$new_path" = x; then
16816    # Oops. Which didn't find the executable.
16817    # The splitting of arguments from the executable at a space might have been incorrect,
16818    # since paths with space are more likely in Windows. Give it another try with the whole
16819    # argument.
16820    path="$complete"
16821    arguments="EOL"
16822    new_path=`$CYGPATH -u "$path"`
16823    new_path=`$WHICH "$new_path" 2> /dev/null`
16824    # bat and cmd files are not always considered executable in cygwin causing which
16825    # to not find them
16826    if test "x$new_path" = x \
16827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16829      new_path=`$CYGPATH -u "$path"`
16830    fi
16831    if test "x$new_path" = x; then
16832      # It's still not found. Now this is an unrecoverable error.
16833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16835      has_space=`$ECHO "$complete" | $GREP " "`
16836      if test "x$has_space" != x; then
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16839      fi
16840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16841    fi
16842  fi
16843
16844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16847  # "foo.exe" is OK but "foo" is an error.
16848  #
16849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16850  # It is also a way to make sure we got the proper file name for the real test later on.
16851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16852  if test "x$test_shortpath" = x; then
16853    # Short path failed, file does not exist as specified.
16854    # Try adding .exe or .cmd
16855    if test -f "${new_path}.exe"; then
16856      input_to_shortpath="${new_path}.exe"
16857    elif test -f "${new_path}.cmd"; then
16858      input_to_shortpath="${new_path}.cmd"
16859    else
16860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16865    fi
16866  else
16867    input_to_shortpath="$new_path"
16868  fi
16869
16870  # Call helper function which possibly converts this using DOS-style short mode.
16871  # If so, the updated path is stored in $new_path.
16872  new_path="$input_to_shortpath"
16873
16874  input_path="$input_to_shortpath"
16875  # Check if we need to convert this using DOS-style short mode. If the path
16876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16877  # take no chances and rewrite it.
16878  # Note: m4 eats our [], so we need to use [ and ] instead.
16879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16880  if test "x$has_forbidden_chars" != x; then
16881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16885      # Going to short mode and back again did indeed matter. Since short mode is
16886      # case insensitive, let's make it lowercase to improve readability.
16887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16888      # Now convert it back to Unix-style (cygpath)
16889      input_path=`$CYGPATH -u "$shortmode_path"`
16890      new_path="$input_path"
16891    fi
16892  fi
16893
16894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16895  if test "x$test_cygdrive_prefix" = x; then
16896    # As a simple fix, exclude /usr/bin since it's not a real path.
16897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16899      # a path prefixed by /cygdrive for fixpath to work.
16900      new_path="$CYGWIN_ROOT_PATH$input_path"
16901    fi
16902  fi
16903
16904  # remove trailing .exe if any
16905  new_path="${new_path/%.exe/}"
16906
16907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16908
16909  # First separate the path from the arguments. This will split at the first
16910  # space.
16911  complete="$FOUND_MAKE"
16912  path="${complete%% *}"
16913  tmp="$complete EOL"
16914  arguments="${tmp#* }"
16915
16916  # Input might be given as Windows format, start by converting to
16917  # unix format.
16918  new_path="$path"
16919
16920  windows_path="$new_path"
16921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16922    unix_path=`$CYGPATH -u "$windows_path"`
16923    new_path="$unix_path"
16924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16926    new_path="$unix_path"
16927  fi
16928
16929
16930  # Now try to locate executable using which
16931  new_path=`$WHICH "$new_path" 2> /dev/null`
16932
16933  if test "x$new_path" = x; then
16934    # Oops. Which didn't find the executable.
16935    # The splitting of arguments from the executable at a space might have been incorrect,
16936    # since paths with space are more likely in Windows. Give it another try with the whole
16937    # argument.
16938    path="$complete"
16939    arguments="EOL"
16940    new_path="$path"
16941
16942  windows_path="$new_path"
16943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16944    unix_path=`$CYGPATH -u "$windows_path"`
16945    new_path="$unix_path"
16946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16948    new_path="$unix_path"
16949  fi
16950
16951
16952    new_path=`$WHICH "$new_path" 2> /dev/null`
16953    # bat and cmd files are not always considered executable in MSYS causing which
16954    # to not find them
16955    if test "x$new_path" = x \
16956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16958      new_path="$path"
16959
16960  windows_path="$new_path"
16961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16962    unix_path=`$CYGPATH -u "$windows_path"`
16963    new_path="$unix_path"
16964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16966    new_path="$unix_path"
16967  fi
16968
16969    fi
16970
16971    if test "x$new_path" = x; then
16972      # It's still not found. Now this is an unrecoverable error.
16973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16975      has_space=`$ECHO "$complete" | $GREP " "`
16976      if test "x$has_space" != x; then
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16979      fi
16980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16981    fi
16982  fi
16983
16984  # Now new_path has a complete unix path to the binary
16985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16986    # Keep paths in /bin as-is, but remove trailing .exe if any
16987    new_path="${new_path/%.exe/}"
16988    # Do not save /bin paths to all_fixpath_prefixes!
16989  else
16990    # Not in mixed or Windows style, start by that.
16991    new_path=`cmd //c echo $new_path`
16992
16993  input_path="$new_path"
16994  # Check if we need to convert this using DOS-style short mode. If the path
16995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16996  # take no chances and rewrite it.
16997  # Note: m4 eats our [], so we need to use [ and ] instead.
16998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16999  if test "x$has_forbidden_chars" != x; then
17000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17002  fi
17003
17004    # Output is in $new_path
17005
17006  windows_path="$new_path"
17007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17008    unix_path=`$CYGPATH -u "$windows_path"`
17009    new_path="$unix_path"
17010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17012    new_path="$unix_path"
17013  fi
17014
17015    # remove trailing .exe if any
17016    new_path="${new_path/%.exe/}"
17017
17018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17020  fi
17021
17022    else
17023      # We're on a unix platform. Hooray! :)
17024      # First separate the path from the arguments. This will split at the first
17025      # space.
17026      complete="$FOUND_MAKE"
17027      path="${complete%% *}"
17028      tmp="$complete EOL"
17029      arguments="${tmp#* }"
17030
17031      # Cannot rely on the command "which" here since it doesn't always work.
17032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17033      if test -z "$is_absolute_path"; then
17034        # Path to executable is not absolute. Find it.
17035        IFS_save="$IFS"
17036        IFS=:
17037        for p in $PATH; do
17038          if test -f "$p/$path" && test -x "$p/$path"; then
17039            new_path="$p/$path"
17040            break
17041          fi
17042        done
17043        IFS="$IFS_save"
17044      else
17045        # This is an absolute path, we can use it without further modifications.
17046        new_path="$path"
17047      fi
17048
17049      if test "x$new_path" = x; then
17050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17052        has_space=`$ECHO "$complete" | $GREP " "`
17053        if test "x$has_space" != x; then
17054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17056        fi
17057        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17058      fi
17059    fi
17060
17061    # Now join together the path and the arguments once again
17062    if test "x$arguments" != xEOL; then
17063      new_complete="$new_path ${arguments% *}"
17064    else
17065      new_complete="$new_path"
17066    fi
17067
17068    if test "x$complete" != "x$new_complete"; then
17069      FOUND_MAKE="$new_complete"
17070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17071$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17072    fi
17073  fi
17074
17075        fi
17076      fi
17077    fi
17078  fi
17079
17080        if test "x$FOUND_MAKE" = x; then
17081          for ac_prog in make
17082do
17083  # Extract the first word of "$ac_prog", so it can be a program name with args.
17084set dummy $ac_prog; ac_word=$2
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17086$as_echo_n "checking for $ac_word... " >&6; }
17087if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17088  $as_echo_n "(cached) " >&6
17089else
17090  case $CHECK_TOOLSDIR_MAKE in
17091  [\\/]* | ?:[\\/]*)
17092  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17093  ;;
17094  *)
17095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17096for as_dir in $PATH
17097do
17098  IFS=$as_save_IFS
17099  test -z "$as_dir" && as_dir=.
17100    for ac_exec_ext in '' $ac_executable_extensions; do
17101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17102    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17104    break 2
17105  fi
17106done
17107  done
17108IFS=$as_save_IFS
17109
17110  ;;
17111esac
17112fi
17113CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17114if test -n "$CHECK_TOOLSDIR_MAKE"; then
17115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17116$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17117else
17118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17119$as_echo "no" >&6; }
17120fi
17121
17122
17123  test -n "$CHECK_TOOLSDIR_MAKE" && break
17124done
17125
17126
17127  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17128  DESCRIPTION="make in tools-dir"
17129
17130  # On Cygwin, we require a newer version of make than on other platforms
17131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17132    MAKE_VERSION_EXPR="-e 4\."
17133    MAKE_REQUIRED_VERSION="4.0"
17134   else
17135    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17136    MAKE_REQUIRED_VERSION="3.81"
17137  fi
17138
17139  if test "x$MAKE_CANDIDATE" != x; then
17140    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17141$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17142    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17143    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17144    if test "x$IS_GNU_MAKE" = x; then
17145      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17146$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17147    else
17148      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17149      if test "x$IS_MODERN_MAKE" = x; then
17150        { $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
17151$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;}
17152      else
17153        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17154          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155            MAKE_EXPECTED_ENV='cygwin'
17156          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17157            MAKE_EXPECTED_ENV='msys'
17158          else
17159            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17160          fi
17161          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17162          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17163        else
17164          # Not relevant for non-Windows
17165          IS_MAKE_CORRECT_ENV=true
17166        fi
17167        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17168          { $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
17169$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;}
17170        else
17171          FOUND_MAKE=$MAKE_CANDIDATE
17172
17173  # Only process if variable expands to non-empty
17174
17175  if test "x$FOUND_MAKE" != x; then
17176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17177
17178  # First separate the path from the arguments. This will split at the first
17179  # space.
17180  complete="$FOUND_MAKE"
17181  path="${complete%% *}"
17182  tmp="$complete EOL"
17183  arguments="${tmp#* }"
17184
17185  # Input might be given as Windows format, start by converting to
17186  # unix format.
17187  new_path=`$CYGPATH -u "$path"`
17188
17189  # Now try to locate executable using which
17190  new_path=`$WHICH "$new_path" 2> /dev/null`
17191  # bat and cmd files are not always considered executable in cygwin causing which
17192  # to not find them
17193  if test "x$new_path" = x \
17194      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17195      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17196    new_path=`$CYGPATH -u "$path"`
17197  fi
17198  if test "x$new_path" = x; then
17199    # Oops. Which didn't find the executable.
17200    # The splitting of arguments from the executable at a space might have been incorrect,
17201    # since paths with space are more likely in Windows. Give it another try with the whole
17202    # argument.
17203    path="$complete"
17204    arguments="EOL"
17205    new_path=`$CYGPATH -u "$path"`
17206    new_path=`$WHICH "$new_path" 2> /dev/null`
17207    # bat and cmd files are not always considered executable in cygwin causing which
17208    # to not find them
17209    if test "x$new_path" = x \
17210        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17211        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17212      new_path=`$CYGPATH -u "$path"`
17213    fi
17214    if test "x$new_path" = x; then
17215      # It's still not found. Now this is an unrecoverable error.
17216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17218      has_space=`$ECHO "$complete" | $GREP " "`
17219      if test "x$has_space" != x; then
17220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17222      fi
17223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17224    fi
17225  fi
17226
17227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17230  # "foo.exe" is OK but "foo" is an error.
17231  #
17232  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17233  # It is also a way to make sure we got the proper file name for the real test later on.
17234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17235  if test "x$test_shortpath" = x; then
17236    # Short path failed, file does not exist as specified.
17237    # Try adding .exe or .cmd
17238    if test -f "${new_path}.exe"; then
17239      input_to_shortpath="${new_path}.exe"
17240    elif test -f "${new_path}.cmd"; then
17241      input_to_shortpath="${new_path}.cmd"
17242    else
17243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17244$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17245      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17246$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17248    fi
17249  else
17250    input_to_shortpath="$new_path"
17251  fi
17252
17253  # Call helper function which possibly converts this using DOS-style short mode.
17254  # If so, the updated path is stored in $new_path.
17255  new_path="$input_to_shortpath"
17256
17257  input_path="$input_to_shortpath"
17258  # Check if we need to convert this using DOS-style short mode. If the path
17259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17260  # take no chances and rewrite it.
17261  # Note: m4 eats our [], so we need to use [ and ] instead.
17262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17263  if test "x$has_forbidden_chars" != x; then
17264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17268      # Going to short mode and back again did indeed matter. Since short mode is
17269      # case insensitive, let's make it lowercase to improve readability.
17270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17271      # Now convert it back to Unix-style (cygpath)
17272      input_path=`$CYGPATH -u "$shortmode_path"`
17273      new_path="$input_path"
17274    fi
17275  fi
17276
17277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17278  if test "x$test_cygdrive_prefix" = x; then
17279    # As a simple fix, exclude /usr/bin since it's not a real path.
17280    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17282      # a path prefixed by /cygdrive for fixpath to work.
17283      new_path="$CYGWIN_ROOT_PATH$input_path"
17284    fi
17285  fi
17286
17287  # remove trailing .exe if any
17288  new_path="${new_path/%.exe/}"
17289
17290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17291
17292  # First separate the path from the arguments. This will split at the first
17293  # space.
17294  complete="$FOUND_MAKE"
17295  path="${complete%% *}"
17296  tmp="$complete EOL"
17297  arguments="${tmp#* }"
17298
17299  # Input might be given as Windows format, start by converting to
17300  # unix format.
17301  new_path="$path"
17302
17303  windows_path="$new_path"
17304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17305    unix_path=`$CYGPATH -u "$windows_path"`
17306    new_path="$unix_path"
17307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17309    new_path="$unix_path"
17310  fi
17311
17312
17313  # Now try to locate executable using which
17314  new_path=`$WHICH "$new_path" 2> /dev/null`
17315
17316  if test "x$new_path" = x; then
17317    # Oops. Which didn't find the executable.
17318    # The splitting of arguments from the executable at a space might have been incorrect,
17319    # since paths with space are more likely in Windows. Give it another try with the whole
17320    # argument.
17321    path="$complete"
17322    arguments="EOL"
17323    new_path="$path"
17324
17325  windows_path="$new_path"
17326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17327    unix_path=`$CYGPATH -u "$windows_path"`
17328    new_path="$unix_path"
17329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17331    new_path="$unix_path"
17332  fi
17333
17334
17335    new_path=`$WHICH "$new_path" 2> /dev/null`
17336    # bat and cmd files are not always considered executable in MSYS causing which
17337    # to not find them
17338    if test "x$new_path" = x \
17339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17341      new_path="$path"
17342
17343  windows_path="$new_path"
17344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17345    unix_path=`$CYGPATH -u "$windows_path"`
17346    new_path="$unix_path"
17347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17349    new_path="$unix_path"
17350  fi
17351
17352    fi
17353
17354    if test "x$new_path" = x; then
17355      # It's still not found. Now this is an unrecoverable error.
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17358      has_space=`$ECHO "$complete" | $GREP " "`
17359      if test "x$has_space" != x; then
17360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17362      fi
17363      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17364    fi
17365  fi
17366
17367  # Now new_path has a complete unix path to the binary
17368  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17369    # Keep paths in /bin as-is, but remove trailing .exe if any
17370    new_path="${new_path/%.exe/}"
17371    # Do not save /bin paths to all_fixpath_prefixes!
17372  else
17373    # Not in mixed or Windows style, start by that.
17374    new_path=`cmd //c echo $new_path`
17375
17376  input_path="$new_path"
17377  # Check if we need to convert this using DOS-style short mode. If the path
17378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17379  # take no chances and rewrite it.
17380  # Note: m4 eats our [], so we need to use [ and ] instead.
17381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17382  if test "x$has_forbidden_chars" != x; then
17383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17385  fi
17386
17387    # Output is in $new_path
17388
17389  windows_path="$new_path"
17390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17391    unix_path=`$CYGPATH -u "$windows_path"`
17392    new_path="$unix_path"
17393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17395    new_path="$unix_path"
17396  fi
17397
17398    # remove trailing .exe if any
17399    new_path="${new_path/%.exe/}"
17400
17401    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17402    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17403  fi
17404
17405    else
17406      # We're on a unix platform. Hooray! :)
17407      # First separate the path from the arguments. This will split at the first
17408      # space.
17409      complete="$FOUND_MAKE"
17410      path="${complete%% *}"
17411      tmp="$complete EOL"
17412      arguments="${tmp#* }"
17413
17414      # Cannot rely on the command "which" here since it doesn't always work.
17415      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17416      if test -z "$is_absolute_path"; then
17417        # Path to executable is not absolute. Find it.
17418        IFS_save="$IFS"
17419        IFS=:
17420        for p in $PATH; do
17421          if test -f "$p/$path" && test -x "$p/$path"; then
17422            new_path="$p/$path"
17423            break
17424          fi
17425        done
17426        IFS="$IFS_save"
17427      else
17428        # This is an absolute path, we can use it without further modifications.
17429        new_path="$path"
17430      fi
17431
17432      if test "x$new_path" = x; then
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17434$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17435        has_space=`$ECHO "$complete" | $GREP " "`
17436        if test "x$has_space" != x; then
17437          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17439        fi
17440        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17441      fi
17442    fi
17443
17444    # Now join together the path and the arguments once again
17445    if test "x$arguments" != xEOL; then
17446      new_complete="$new_path ${arguments% *}"
17447    else
17448      new_complete="$new_path"
17449    fi
17450
17451    if test "x$complete" != "x$new_complete"; then
17452      FOUND_MAKE="$new_complete"
17453      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17454$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17455    fi
17456  fi
17457
17458        fi
17459      fi
17460    fi
17461  fi
17462
17463        fi
17464        PATH=$OLD_PATH
17465      fi
17466    fi
17467
17468    if test "x$FOUND_MAKE" = x; then
17469      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
17470    fi
17471  fi
17472
17473  MAKE=$FOUND_MAKE
17474
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17476$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17477
17478
17479  # Check if make supports the output sync option and if so, setup using it.
17480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17481$as_echo_n "checking if make --output-sync is supported... " >&6; }
17482  if $MAKE --version -O > /dev/null 2>&1; then
17483    OUTPUT_SYNC_SUPPORTED=true
17484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17485$as_echo "yes" >&6; }
17486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17487$as_echo_n "checking for output-sync value... " >&6; }
17488
17489# Check whether --with-output-sync was given.
17490if test "${with_output_sync+set}" = set; then :
17491  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17492fi
17493
17494    if test "x$OUTPUT_SYNC" = "x"; then
17495      OUTPUT_SYNC=none
17496    fi
17497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17498$as_echo "$OUTPUT_SYNC" >&6; }
17499    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17500      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17501    fi
17502  else
17503    OUTPUT_SYNC_SUPPORTED=false
17504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17505$as_echo "no" >&6; }
17506  fi
17507
17508
17509
17510
17511
17512
17513  # Test if find supports -delete
17514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17515$as_echo_n "checking if find supports -delete... " >&6; }
17516  FIND_DELETE="-delete"
17517
17518  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17519
17520  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17521
17522  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17523  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17524    # No, it does not.
17525    rm $DELETEDIR/TestIfFindSupportsDelete
17526    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17527      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17528      FIND_DELETE="-print | xargs rm"
17529    else
17530      FIND_DELETE="-exec rm \{\} \+"
17531    fi
17532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533$as_echo "no" >&6; }
17534  else
17535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17536$as_echo "yes" >&6; }
17537  fi
17538  rmdir $DELETEDIR
17539
17540
17541
17542  # These tools might not be installed by default,
17543  # need hint on how to install them.
17544
17545
17546
17547  # Publish this variable in the help.
17548
17549
17550  if test "x$UNZIP" = x; then
17551    # The variable is not set by user, try to locate tool using the code snippet
17552    for ac_prog in unzip
17553do
17554  # Extract the first word of "$ac_prog", so it can be a program name with args.
17555set dummy $ac_prog; ac_word=$2
17556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17557$as_echo_n "checking for $ac_word... " >&6; }
17558if ${ac_cv_path_UNZIP+:} false; then :
17559  $as_echo_n "(cached) " >&6
17560else
17561  case $UNZIP in
17562  [\\/]* | ?:[\\/]*)
17563  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17564  ;;
17565  *)
17566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17567for as_dir in $PATH
17568do
17569  IFS=$as_save_IFS
17570  test -z "$as_dir" && as_dir=.
17571    for ac_exec_ext in '' $ac_executable_extensions; do
17572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17573    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17575    break 2
17576  fi
17577done
17578  done
17579IFS=$as_save_IFS
17580
17581  ;;
17582esac
17583fi
17584UNZIP=$ac_cv_path_UNZIP
17585if test -n "$UNZIP"; then
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17587$as_echo "$UNZIP" >&6; }
17588else
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17590$as_echo "no" >&6; }
17591fi
17592
17593
17594  test -n "$UNZIP" && break
17595done
17596
17597  else
17598    # The variable is set, but is it from the command line or the environment?
17599
17600    # Try to remove the string !UNZIP! from our list.
17601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17603      # If it failed, the variable was not from the command line. Ignore it,
17604      # but warn the user (except for BASH, which is always set by the calling BASH).
17605      if test "xUNZIP" != xBASH; then
17606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17607$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17608      fi
17609      # Try to locate tool using the code snippet
17610      for ac_prog in unzip
17611do
17612  # Extract the first word of "$ac_prog", so it can be a program name with args.
17613set dummy $ac_prog; ac_word=$2
17614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17615$as_echo_n "checking for $ac_word... " >&6; }
17616if ${ac_cv_path_UNZIP+:} false; then :
17617  $as_echo_n "(cached) " >&6
17618else
17619  case $UNZIP in
17620  [\\/]* | ?:[\\/]*)
17621  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17622  ;;
17623  *)
17624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17625for as_dir in $PATH
17626do
17627  IFS=$as_save_IFS
17628  test -z "$as_dir" && as_dir=.
17629    for ac_exec_ext in '' $ac_executable_extensions; do
17630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17631    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17633    break 2
17634  fi
17635done
17636  done
17637IFS=$as_save_IFS
17638
17639  ;;
17640esac
17641fi
17642UNZIP=$ac_cv_path_UNZIP
17643if test -n "$UNZIP"; then
17644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17645$as_echo "$UNZIP" >&6; }
17646else
17647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17648$as_echo "no" >&6; }
17649fi
17650
17651
17652  test -n "$UNZIP" && break
17653done
17654
17655    else
17656      # If it succeeded, then it was overridden by the user. We will use it
17657      # for the tool.
17658
17659      # First remove it from the list of overridden variables, so we can test
17660      # for unknown variables in the end.
17661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17662
17663      # Check if the provided tool contains a complete path.
17664      tool_specified="$UNZIP"
17665      tool_basename="${tool_specified##*/}"
17666      if test "x$tool_basename" = "x$tool_specified"; then
17667        # A command without a complete path is provided, search $PATH.
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17669$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17670        # Extract the first word of "$tool_basename", so it can be a program name with args.
17671set dummy $tool_basename; ac_word=$2
17672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17673$as_echo_n "checking for $ac_word... " >&6; }
17674if ${ac_cv_path_UNZIP+:} false; then :
17675  $as_echo_n "(cached) " >&6
17676else
17677  case $UNZIP in
17678  [\\/]* | ?:[\\/]*)
17679  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17680  ;;
17681  *)
17682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17683for as_dir in $PATH
17684do
17685  IFS=$as_save_IFS
17686  test -z "$as_dir" && as_dir=.
17687    for ac_exec_ext in '' $ac_executable_extensions; do
17688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17689    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17691    break 2
17692  fi
17693done
17694  done
17695IFS=$as_save_IFS
17696
17697  ;;
17698esac
17699fi
17700UNZIP=$ac_cv_path_UNZIP
17701if test -n "$UNZIP"; then
17702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17703$as_echo "$UNZIP" >&6; }
17704else
17705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17706$as_echo "no" >&6; }
17707fi
17708
17709
17710        if test "x$UNZIP" = x; then
17711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17712        fi
17713      else
17714        # Otherwise we believe it is a complete path. Use it as it is.
17715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17716$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17718$as_echo_n "checking for UNZIP... " >&6; }
17719        if test ! -x "$tool_specified"; then
17720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17721$as_echo "not found" >&6; }
17722          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17723        fi
17724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17725$as_echo "$tool_specified" >&6; }
17726      fi
17727    fi
17728  fi
17729
17730
17731
17732  if test "x$UNZIP" = x; then
17733    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17734  fi
17735
17736
17737
17738
17739
17740  # Publish this variable in the help.
17741
17742
17743  if test "x$ZIP" = x; then
17744    # The variable is not set by user, try to locate tool using the code snippet
17745    for ac_prog in zip
17746do
17747  # Extract the first word of "$ac_prog", so it can be a program name with args.
17748set dummy $ac_prog; ac_word=$2
17749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17750$as_echo_n "checking for $ac_word... " >&6; }
17751if ${ac_cv_path_ZIP+:} false; then :
17752  $as_echo_n "(cached) " >&6
17753else
17754  case $ZIP in
17755  [\\/]* | ?:[\\/]*)
17756  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17757  ;;
17758  *)
17759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17760for as_dir in $PATH
17761do
17762  IFS=$as_save_IFS
17763  test -z "$as_dir" && as_dir=.
17764    for ac_exec_ext in '' $ac_executable_extensions; do
17765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17766    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17768    break 2
17769  fi
17770done
17771  done
17772IFS=$as_save_IFS
17773
17774  ;;
17775esac
17776fi
17777ZIP=$ac_cv_path_ZIP
17778if test -n "$ZIP"; then
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17780$as_echo "$ZIP" >&6; }
17781else
17782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17783$as_echo "no" >&6; }
17784fi
17785
17786
17787  test -n "$ZIP" && break
17788done
17789
17790  else
17791    # The variable is set, but is it from the command line or the environment?
17792
17793    # Try to remove the string !ZIP! from our list.
17794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17796      # If it failed, the variable was not from the command line. Ignore it,
17797      # but warn the user (except for BASH, which is always set by the calling BASH).
17798      if test "xZIP" != xBASH; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17800$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17801      fi
17802      # Try to locate tool using the code snippet
17803      for ac_prog in zip
17804do
17805  # Extract the first word of "$ac_prog", so it can be a program name with args.
17806set dummy $ac_prog; ac_word=$2
17807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17808$as_echo_n "checking for $ac_word... " >&6; }
17809if ${ac_cv_path_ZIP+:} false; then :
17810  $as_echo_n "(cached) " >&6
17811else
17812  case $ZIP in
17813  [\\/]* | ?:[\\/]*)
17814  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17815  ;;
17816  *)
17817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17818for as_dir in $PATH
17819do
17820  IFS=$as_save_IFS
17821  test -z "$as_dir" && as_dir=.
17822    for ac_exec_ext in '' $ac_executable_extensions; do
17823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17824    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17826    break 2
17827  fi
17828done
17829  done
17830IFS=$as_save_IFS
17831
17832  ;;
17833esac
17834fi
17835ZIP=$ac_cv_path_ZIP
17836if test -n "$ZIP"; then
17837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17838$as_echo "$ZIP" >&6; }
17839else
17840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17841$as_echo "no" >&6; }
17842fi
17843
17844
17845  test -n "$ZIP" && break
17846done
17847
17848    else
17849      # If it succeeded, then it was overridden by the user. We will use it
17850      # for the tool.
17851
17852      # First remove it from the list of overridden variables, so we can test
17853      # for unknown variables in the end.
17854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17855
17856      # Check if the provided tool contains a complete path.
17857      tool_specified="$ZIP"
17858      tool_basename="${tool_specified##*/}"
17859      if test "x$tool_basename" = "x$tool_specified"; then
17860        # A command without a complete path is provided, search $PATH.
17861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17862$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17863        # Extract the first word of "$tool_basename", so it can be a program name with args.
17864set dummy $tool_basename; ac_word=$2
17865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17866$as_echo_n "checking for $ac_word... " >&6; }
17867if ${ac_cv_path_ZIP+:} false; then :
17868  $as_echo_n "(cached) " >&6
17869else
17870  case $ZIP in
17871  [\\/]* | ?:[\\/]*)
17872  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17873  ;;
17874  *)
17875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17876for as_dir in $PATH
17877do
17878  IFS=$as_save_IFS
17879  test -z "$as_dir" && as_dir=.
17880    for ac_exec_ext in '' $ac_executable_extensions; do
17881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17882    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17884    break 2
17885  fi
17886done
17887  done
17888IFS=$as_save_IFS
17889
17890  ;;
17891esac
17892fi
17893ZIP=$ac_cv_path_ZIP
17894if test -n "$ZIP"; then
17895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17896$as_echo "$ZIP" >&6; }
17897else
17898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17899$as_echo "no" >&6; }
17900fi
17901
17902
17903        if test "x$ZIP" = x; then
17904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17905        fi
17906      else
17907        # Otherwise we believe it is a complete path. Use it as it is.
17908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17909$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17911$as_echo_n "checking for ZIP... " >&6; }
17912        if test ! -x "$tool_specified"; then
17913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17914$as_echo "not found" >&6; }
17915          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17916        fi
17917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17918$as_echo "$tool_specified" >&6; }
17919      fi
17920    fi
17921  fi
17922
17923
17924
17925  if test "x$ZIP" = x; then
17926    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17927  fi
17928
17929
17930
17931  # Non-required basic tools
17932
17933
17934
17935  # Publish this variable in the help.
17936
17937
17938  if test "x$LDD" = x; then
17939    # The variable is not set by user, try to locate tool using the code snippet
17940    for ac_prog in ldd
17941do
17942  # Extract the first word of "$ac_prog", so it can be a program name with args.
17943set dummy $ac_prog; ac_word=$2
17944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17945$as_echo_n "checking for $ac_word... " >&6; }
17946if ${ac_cv_path_LDD+:} false; then :
17947  $as_echo_n "(cached) " >&6
17948else
17949  case $LDD in
17950  [\\/]* | ?:[\\/]*)
17951  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17952  ;;
17953  *)
17954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17955for as_dir in $PATH
17956do
17957  IFS=$as_save_IFS
17958  test -z "$as_dir" && as_dir=.
17959    for ac_exec_ext in '' $ac_executable_extensions; do
17960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17961    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17963    break 2
17964  fi
17965done
17966  done
17967IFS=$as_save_IFS
17968
17969  ;;
17970esac
17971fi
17972LDD=$ac_cv_path_LDD
17973if test -n "$LDD"; then
17974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17975$as_echo "$LDD" >&6; }
17976else
17977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17978$as_echo "no" >&6; }
17979fi
17980
17981
17982  test -n "$LDD" && break
17983done
17984
17985  else
17986    # The variable is set, but is it from the command line or the environment?
17987
17988    # Try to remove the string !LDD! from our list.
17989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17991      # If it failed, the variable was not from the command line. Ignore it,
17992      # but warn the user (except for BASH, which is always set by the calling BASH).
17993      if test "xLDD" != xBASH; then
17994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17995$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17996      fi
17997      # Try to locate tool using the code snippet
17998      for ac_prog in ldd
17999do
18000  # Extract the first word of "$ac_prog", so it can be a program name with args.
18001set dummy $ac_prog; ac_word=$2
18002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18003$as_echo_n "checking for $ac_word... " >&6; }
18004if ${ac_cv_path_LDD+:} false; then :
18005  $as_echo_n "(cached) " >&6
18006else
18007  case $LDD in
18008  [\\/]* | ?:[\\/]*)
18009  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18010  ;;
18011  *)
18012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18013for as_dir in $PATH
18014do
18015  IFS=$as_save_IFS
18016  test -z "$as_dir" && as_dir=.
18017    for ac_exec_ext in '' $ac_executable_extensions; do
18018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18019    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18021    break 2
18022  fi
18023done
18024  done
18025IFS=$as_save_IFS
18026
18027  ;;
18028esac
18029fi
18030LDD=$ac_cv_path_LDD
18031if test -n "$LDD"; then
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18033$as_echo "$LDD" >&6; }
18034else
18035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18036$as_echo "no" >&6; }
18037fi
18038
18039
18040  test -n "$LDD" && break
18041done
18042
18043    else
18044      # If it succeeded, then it was overridden by the user. We will use it
18045      # for the tool.
18046
18047      # First remove it from the list of overridden variables, so we can test
18048      # for unknown variables in the end.
18049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18050
18051      # Check if the provided tool contains a complete path.
18052      tool_specified="$LDD"
18053      tool_basename="${tool_specified##*/}"
18054      if test "x$tool_basename" = "x$tool_specified"; then
18055        # A command without a complete path is provided, search $PATH.
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18057$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18058        # Extract the first word of "$tool_basename", so it can be a program name with args.
18059set dummy $tool_basename; ac_word=$2
18060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18061$as_echo_n "checking for $ac_word... " >&6; }
18062if ${ac_cv_path_LDD+:} false; then :
18063  $as_echo_n "(cached) " >&6
18064else
18065  case $LDD in
18066  [\\/]* | ?:[\\/]*)
18067  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18068  ;;
18069  *)
18070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18071for as_dir in $PATH
18072do
18073  IFS=$as_save_IFS
18074  test -z "$as_dir" && as_dir=.
18075    for ac_exec_ext in '' $ac_executable_extensions; do
18076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18077    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18079    break 2
18080  fi
18081done
18082  done
18083IFS=$as_save_IFS
18084
18085  ;;
18086esac
18087fi
18088LDD=$ac_cv_path_LDD
18089if test -n "$LDD"; then
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18091$as_echo "$LDD" >&6; }
18092else
18093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18094$as_echo "no" >&6; }
18095fi
18096
18097
18098        if test "x$LDD" = x; then
18099          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18100        fi
18101      else
18102        # Otherwise we believe it is a complete path. Use it as it is.
18103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18104$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18106$as_echo_n "checking for LDD... " >&6; }
18107        if test ! -x "$tool_specified"; then
18108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18109$as_echo "not found" >&6; }
18110          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18111        fi
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18113$as_echo "$tool_specified" >&6; }
18114      fi
18115    fi
18116  fi
18117
18118
18119  if test "x$LDD" = "x"; then
18120    # List shared lib dependencies is used for
18121    # debug output and checking for forbidden dependencies.
18122    # We can build without it.
18123    LDD="true"
18124  fi
18125
18126
18127  # Publish this variable in the help.
18128
18129
18130  if test "x$OTOOL" = x; then
18131    # The variable is not set by user, try to locate tool using the code snippet
18132    for ac_prog in otool
18133do
18134  # Extract the first word of "$ac_prog", so it can be a program name with args.
18135set dummy $ac_prog; ac_word=$2
18136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18137$as_echo_n "checking for $ac_word... " >&6; }
18138if ${ac_cv_path_OTOOL+:} false; then :
18139  $as_echo_n "(cached) " >&6
18140else
18141  case $OTOOL in
18142  [\\/]* | ?:[\\/]*)
18143  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18144  ;;
18145  *)
18146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18147for as_dir in $PATH
18148do
18149  IFS=$as_save_IFS
18150  test -z "$as_dir" && as_dir=.
18151    for ac_exec_ext in '' $ac_executable_extensions; do
18152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18153    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18155    break 2
18156  fi
18157done
18158  done
18159IFS=$as_save_IFS
18160
18161  ;;
18162esac
18163fi
18164OTOOL=$ac_cv_path_OTOOL
18165if test -n "$OTOOL"; then
18166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18167$as_echo "$OTOOL" >&6; }
18168else
18169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18170$as_echo "no" >&6; }
18171fi
18172
18173
18174  test -n "$OTOOL" && break
18175done
18176
18177  else
18178    # The variable is set, but is it from the command line or the environment?
18179
18180    # Try to remove the string !OTOOL! from our list.
18181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18183      # If it failed, the variable was not from the command line. Ignore it,
18184      # but warn the user (except for BASH, which is always set by the calling BASH).
18185      if test "xOTOOL" != xBASH; then
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18187$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18188      fi
18189      # Try to locate tool using the code snippet
18190      for ac_prog in otool
18191do
18192  # Extract the first word of "$ac_prog", so it can be a program name with args.
18193set dummy $ac_prog; ac_word=$2
18194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18195$as_echo_n "checking for $ac_word... " >&6; }
18196if ${ac_cv_path_OTOOL+:} false; then :
18197  $as_echo_n "(cached) " >&6
18198else
18199  case $OTOOL in
18200  [\\/]* | ?:[\\/]*)
18201  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18202  ;;
18203  *)
18204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18205for as_dir in $PATH
18206do
18207  IFS=$as_save_IFS
18208  test -z "$as_dir" && as_dir=.
18209    for ac_exec_ext in '' $ac_executable_extensions; do
18210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18211    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18213    break 2
18214  fi
18215done
18216  done
18217IFS=$as_save_IFS
18218
18219  ;;
18220esac
18221fi
18222OTOOL=$ac_cv_path_OTOOL
18223if test -n "$OTOOL"; then
18224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18225$as_echo "$OTOOL" >&6; }
18226else
18227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18228$as_echo "no" >&6; }
18229fi
18230
18231
18232  test -n "$OTOOL" && break
18233done
18234
18235    else
18236      # If it succeeded, then it was overridden by the user. We will use it
18237      # for the tool.
18238
18239      # First remove it from the list of overridden variables, so we can test
18240      # for unknown variables in the end.
18241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18242
18243      # Check if the provided tool contains a complete path.
18244      tool_specified="$OTOOL"
18245      tool_basename="${tool_specified##*/}"
18246      if test "x$tool_basename" = "x$tool_specified"; then
18247        # A command without a complete path is provided, search $PATH.
18248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18249$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18250        # Extract the first word of "$tool_basename", so it can be a program name with args.
18251set dummy $tool_basename; ac_word=$2
18252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18253$as_echo_n "checking for $ac_word... " >&6; }
18254if ${ac_cv_path_OTOOL+:} false; then :
18255  $as_echo_n "(cached) " >&6
18256else
18257  case $OTOOL in
18258  [\\/]* | ?:[\\/]*)
18259  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18260  ;;
18261  *)
18262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18263for as_dir in $PATH
18264do
18265  IFS=$as_save_IFS
18266  test -z "$as_dir" && as_dir=.
18267    for ac_exec_ext in '' $ac_executable_extensions; do
18268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18269    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18271    break 2
18272  fi
18273done
18274  done
18275IFS=$as_save_IFS
18276
18277  ;;
18278esac
18279fi
18280OTOOL=$ac_cv_path_OTOOL
18281if test -n "$OTOOL"; then
18282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18283$as_echo "$OTOOL" >&6; }
18284else
18285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18286$as_echo "no" >&6; }
18287fi
18288
18289
18290        if test "x$OTOOL" = x; then
18291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18292        fi
18293      else
18294        # Otherwise we believe it is a complete path. Use it as it is.
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18296$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18298$as_echo_n "checking for OTOOL... " >&6; }
18299        if test ! -x "$tool_specified"; then
18300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18301$as_echo "not found" >&6; }
18302          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18303        fi
18304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18305$as_echo "$tool_specified" >&6; }
18306      fi
18307    fi
18308  fi
18309
18310
18311  if test "x$OTOOL" = "x"; then
18312    OTOOL="true"
18313  fi
18314
18315
18316  # Publish this variable in the help.
18317
18318
18319  if test "x$READELF" = x; then
18320    # The variable is not set by user, try to locate tool using the code snippet
18321    for ac_prog in greadelf readelf
18322do
18323  # Extract the first word of "$ac_prog", so it can be a program name with args.
18324set dummy $ac_prog; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_READELF+:} false; then :
18328  $as_echo_n "(cached) " >&6
18329else
18330  case $READELF in
18331  [\\/]* | ?:[\\/]*)
18332  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18333  ;;
18334  *)
18335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $PATH
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340    for ac_exec_ext in '' $ac_executable_extensions; do
18341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347  done
18348IFS=$as_save_IFS
18349
18350  ;;
18351esac
18352fi
18353READELF=$ac_cv_path_READELF
18354if test -n "$READELF"; then
18355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18356$as_echo "$READELF" >&6; }
18357else
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363  test -n "$READELF" && break
18364done
18365
18366  else
18367    # The variable is set, but is it from the command line or the environment?
18368
18369    # Try to remove the string !READELF! from our list.
18370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18372      # If it failed, the variable was not from the command line. Ignore it,
18373      # but warn the user (except for BASH, which is always set by the calling BASH).
18374      if test "xREADELF" != xBASH; then
18375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18376$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18377      fi
18378      # Try to locate tool using the code snippet
18379      for ac_prog in greadelf readelf
18380do
18381  # Extract the first word of "$ac_prog", so it can be a program name with args.
18382set dummy $ac_prog; ac_word=$2
18383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18384$as_echo_n "checking for $ac_word... " >&6; }
18385if ${ac_cv_path_READELF+:} false; then :
18386  $as_echo_n "(cached) " >&6
18387else
18388  case $READELF in
18389  [\\/]* | ?:[\\/]*)
18390  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18391  ;;
18392  *)
18393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394for as_dir in $PATH
18395do
18396  IFS=$as_save_IFS
18397  test -z "$as_dir" && as_dir=.
18398    for ac_exec_ext in '' $ac_executable_extensions; do
18399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18400    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402    break 2
18403  fi
18404done
18405  done
18406IFS=$as_save_IFS
18407
18408  ;;
18409esac
18410fi
18411READELF=$ac_cv_path_READELF
18412if test -n "$READELF"; then
18413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18414$as_echo "$READELF" >&6; }
18415else
18416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18417$as_echo "no" >&6; }
18418fi
18419
18420
18421  test -n "$READELF" && break
18422done
18423
18424    else
18425      # If it succeeded, then it was overridden by the user. We will use it
18426      # for the tool.
18427
18428      # First remove it from the list of overridden variables, so we can test
18429      # for unknown variables in the end.
18430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18431
18432      # Check if the provided tool contains a complete path.
18433      tool_specified="$READELF"
18434      tool_basename="${tool_specified##*/}"
18435      if test "x$tool_basename" = "x$tool_specified"; then
18436        # A command without a complete path is provided, search $PATH.
18437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18438$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18439        # Extract the first word of "$tool_basename", so it can be a program name with args.
18440set dummy $tool_basename; ac_word=$2
18441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18442$as_echo_n "checking for $ac_word... " >&6; }
18443if ${ac_cv_path_READELF+:} false; then :
18444  $as_echo_n "(cached) " >&6
18445else
18446  case $READELF in
18447  [\\/]* | ?:[\\/]*)
18448  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18449  ;;
18450  *)
18451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18452for as_dir in $PATH
18453do
18454  IFS=$as_save_IFS
18455  test -z "$as_dir" && as_dir=.
18456    for ac_exec_ext in '' $ac_executable_extensions; do
18457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18458    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18460    break 2
18461  fi
18462done
18463  done
18464IFS=$as_save_IFS
18465
18466  ;;
18467esac
18468fi
18469READELF=$ac_cv_path_READELF
18470if test -n "$READELF"; then
18471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18472$as_echo "$READELF" >&6; }
18473else
18474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18475$as_echo "no" >&6; }
18476fi
18477
18478
18479        if test "x$READELF" = x; then
18480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18481        fi
18482      else
18483        # Otherwise we believe it is a complete path. Use it as it is.
18484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18485$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18487$as_echo_n "checking for READELF... " >&6; }
18488        if test ! -x "$tool_specified"; then
18489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18490$as_echo "not found" >&6; }
18491          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18492        fi
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18494$as_echo "$tool_specified" >&6; }
18495      fi
18496    fi
18497  fi
18498
18499
18500
18501
18502  # Publish this variable in the help.
18503
18504
18505  if test "x$HG" = x; then
18506    # The variable is not set by user, try to locate tool using the code snippet
18507    for ac_prog in hg
18508do
18509  # Extract the first word of "$ac_prog", so it can be a program name with args.
18510set dummy $ac_prog; ac_word=$2
18511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18512$as_echo_n "checking for $ac_word... " >&6; }
18513if ${ac_cv_path_HG+:} false; then :
18514  $as_echo_n "(cached) " >&6
18515else
18516  case $HG in
18517  [\\/]* | ?:[\\/]*)
18518  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18519  ;;
18520  *)
18521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18522for as_dir in $PATH
18523do
18524  IFS=$as_save_IFS
18525  test -z "$as_dir" && as_dir=.
18526    for ac_exec_ext in '' $ac_executable_extensions; do
18527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18528    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18530    break 2
18531  fi
18532done
18533  done
18534IFS=$as_save_IFS
18535
18536  ;;
18537esac
18538fi
18539HG=$ac_cv_path_HG
18540if test -n "$HG"; then
18541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18542$as_echo "$HG" >&6; }
18543else
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18545$as_echo "no" >&6; }
18546fi
18547
18548
18549  test -n "$HG" && break
18550done
18551
18552  else
18553    # The variable is set, but is it from the command line or the environment?
18554
18555    # Try to remove the string !HG! from our list.
18556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18558      # If it failed, the variable was not from the command line. Ignore it,
18559      # but warn the user (except for BASH, which is always set by the calling BASH).
18560      if test "xHG" != xBASH; then
18561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18562$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18563      fi
18564      # Try to locate tool using the code snippet
18565      for ac_prog in hg
18566do
18567  # Extract the first word of "$ac_prog", so it can be a program name with args.
18568set dummy $ac_prog; ac_word=$2
18569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18570$as_echo_n "checking for $ac_word... " >&6; }
18571if ${ac_cv_path_HG+:} false; then :
18572  $as_echo_n "(cached) " >&6
18573else
18574  case $HG in
18575  [\\/]* | ?:[\\/]*)
18576  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18577  ;;
18578  *)
18579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580for as_dir in $PATH
18581do
18582  IFS=$as_save_IFS
18583  test -z "$as_dir" && as_dir=.
18584    for ac_exec_ext in '' $ac_executable_extensions; do
18585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18586    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588    break 2
18589  fi
18590done
18591  done
18592IFS=$as_save_IFS
18593
18594  ;;
18595esac
18596fi
18597HG=$ac_cv_path_HG
18598if test -n "$HG"; then
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18600$as_echo "$HG" >&6; }
18601else
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603$as_echo "no" >&6; }
18604fi
18605
18606
18607  test -n "$HG" && break
18608done
18609
18610    else
18611      # If it succeeded, then it was overridden by the user. We will use it
18612      # for the tool.
18613
18614      # First remove it from the list of overridden variables, so we can test
18615      # for unknown variables in the end.
18616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18617
18618      # Check if the provided tool contains a complete path.
18619      tool_specified="$HG"
18620      tool_basename="${tool_specified##*/}"
18621      if test "x$tool_basename" = "x$tool_specified"; then
18622        # A command without a complete path is provided, search $PATH.
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18624$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18625        # Extract the first word of "$tool_basename", so it can be a program name with args.
18626set dummy $tool_basename; ac_word=$2
18627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18628$as_echo_n "checking for $ac_word... " >&6; }
18629if ${ac_cv_path_HG+:} false; then :
18630  $as_echo_n "(cached) " >&6
18631else
18632  case $HG in
18633  [\\/]* | ?:[\\/]*)
18634  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18635  ;;
18636  *)
18637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18638for as_dir in $PATH
18639do
18640  IFS=$as_save_IFS
18641  test -z "$as_dir" && as_dir=.
18642    for ac_exec_ext in '' $ac_executable_extensions; do
18643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18644    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18646    break 2
18647  fi
18648done
18649  done
18650IFS=$as_save_IFS
18651
18652  ;;
18653esac
18654fi
18655HG=$ac_cv_path_HG
18656if test -n "$HG"; then
18657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18658$as_echo "$HG" >&6; }
18659else
18660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18661$as_echo "no" >&6; }
18662fi
18663
18664
18665        if test "x$HG" = x; then
18666          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18667        fi
18668      else
18669        # Otherwise we believe it is a complete path. Use it as it is.
18670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18671$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18673$as_echo_n "checking for HG... " >&6; }
18674        if test ! -x "$tool_specified"; then
18675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18676$as_echo "not found" >&6; }
18677          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18678        fi
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18680$as_echo "$tool_specified" >&6; }
18681      fi
18682    fi
18683  fi
18684
18685
18686
18687
18688  # Publish this variable in the help.
18689
18690
18691  if test "x$STAT" = x; then
18692    # The variable is not set by user, try to locate tool using the code snippet
18693    for ac_prog in stat
18694do
18695  # Extract the first word of "$ac_prog", so it can be a program name with args.
18696set dummy $ac_prog; ac_word=$2
18697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18698$as_echo_n "checking for $ac_word... " >&6; }
18699if ${ac_cv_path_STAT+:} false; then :
18700  $as_echo_n "(cached) " >&6
18701else
18702  case $STAT in
18703  [\\/]* | ?:[\\/]*)
18704  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18705  ;;
18706  *)
18707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18708for as_dir in $PATH
18709do
18710  IFS=$as_save_IFS
18711  test -z "$as_dir" && as_dir=.
18712    for ac_exec_ext in '' $ac_executable_extensions; do
18713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18714    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18716    break 2
18717  fi
18718done
18719  done
18720IFS=$as_save_IFS
18721
18722  ;;
18723esac
18724fi
18725STAT=$ac_cv_path_STAT
18726if test -n "$STAT"; then
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18728$as_echo "$STAT" >&6; }
18729else
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731$as_echo "no" >&6; }
18732fi
18733
18734
18735  test -n "$STAT" && break
18736done
18737
18738  else
18739    # The variable is set, but is it from the command line or the environment?
18740
18741    # Try to remove the string !STAT! from our list.
18742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18744      # If it failed, the variable was not from the command line. Ignore it,
18745      # but warn the user (except for BASH, which is always set by the calling BASH).
18746      if test "xSTAT" != xBASH; then
18747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18748$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18749      fi
18750      # Try to locate tool using the code snippet
18751      for ac_prog in stat
18752do
18753  # Extract the first word of "$ac_prog", so it can be a program name with args.
18754set dummy $ac_prog; ac_word=$2
18755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18756$as_echo_n "checking for $ac_word... " >&6; }
18757if ${ac_cv_path_STAT+:} false; then :
18758  $as_echo_n "(cached) " >&6
18759else
18760  case $STAT in
18761  [\\/]* | ?:[\\/]*)
18762  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18763  ;;
18764  *)
18765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766for as_dir in $PATH
18767do
18768  IFS=$as_save_IFS
18769  test -z "$as_dir" && as_dir=.
18770    for ac_exec_ext in '' $ac_executable_extensions; do
18771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18774    break 2
18775  fi
18776done
18777  done
18778IFS=$as_save_IFS
18779
18780  ;;
18781esac
18782fi
18783STAT=$ac_cv_path_STAT
18784if test -n "$STAT"; then
18785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18786$as_echo "$STAT" >&6; }
18787else
18788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18789$as_echo "no" >&6; }
18790fi
18791
18792
18793  test -n "$STAT" && break
18794done
18795
18796    else
18797      # If it succeeded, then it was overridden by the user. We will use it
18798      # for the tool.
18799
18800      # First remove it from the list of overridden variables, so we can test
18801      # for unknown variables in the end.
18802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18803
18804      # Check if the provided tool contains a complete path.
18805      tool_specified="$STAT"
18806      tool_basename="${tool_specified##*/}"
18807      if test "x$tool_basename" = "x$tool_specified"; then
18808        # A command without a complete path is provided, search $PATH.
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18810$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18811        # Extract the first word of "$tool_basename", so it can be a program name with args.
18812set dummy $tool_basename; ac_word=$2
18813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18814$as_echo_n "checking for $ac_word... " >&6; }
18815if ${ac_cv_path_STAT+:} false; then :
18816  $as_echo_n "(cached) " >&6
18817else
18818  case $STAT in
18819  [\\/]* | ?:[\\/]*)
18820  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18821  ;;
18822  *)
18823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18824for as_dir in $PATH
18825do
18826  IFS=$as_save_IFS
18827  test -z "$as_dir" && as_dir=.
18828    for ac_exec_ext in '' $ac_executable_extensions; do
18829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18830    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18832    break 2
18833  fi
18834done
18835  done
18836IFS=$as_save_IFS
18837
18838  ;;
18839esac
18840fi
18841STAT=$ac_cv_path_STAT
18842if test -n "$STAT"; then
18843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18844$as_echo "$STAT" >&6; }
18845else
18846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18847$as_echo "no" >&6; }
18848fi
18849
18850
18851        if test "x$STAT" = x; then
18852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18853        fi
18854      else
18855        # Otherwise we believe it is a complete path. Use it as it is.
18856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18857$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18859$as_echo_n "checking for STAT... " >&6; }
18860        if test ! -x "$tool_specified"; then
18861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18862$as_echo "not found" >&6; }
18863          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18864        fi
18865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18866$as_echo "$tool_specified" >&6; }
18867      fi
18868    fi
18869  fi
18870
18871
18872
18873
18874  # Publish this variable in the help.
18875
18876
18877  if test "x$TIME" = x; then
18878    # The variable is not set by user, try to locate tool using the code snippet
18879    for ac_prog in time
18880do
18881  # Extract the first word of "$ac_prog", so it can be a program name with args.
18882set dummy $ac_prog; ac_word=$2
18883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18884$as_echo_n "checking for $ac_word... " >&6; }
18885if ${ac_cv_path_TIME+:} false; then :
18886  $as_echo_n "(cached) " >&6
18887else
18888  case $TIME in
18889  [\\/]* | ?:[\\/]*)
18890  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18891  ;;
18892  *)
18893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18894for as_dir in $PATH
18895do
18896  IFS=$as_save_IFS
18897  test -z "$as_dir" && as_dir=.
18898    for ac_exec_ext in '' $ac_executable_extensions; do
18899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18900    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18902    break 2
18903  fi
18904done
18905  done
18906IFS=$as_save_IFS
18907
18908  ;;
18909esac
18910fi
18911TIME=$ac_cv_path_TIME
18912if test -n "$TIME"; then
18913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18914$as_echo "$TIME" >&6; }
18915else
18916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18917$as_echo "no" >&6; }
18918fi
18919
18920
18921  test -n "$TIME" && break
18922done
18923
18924  else
18925    # The variable is set, but is it from the command line or the environment?
18926
18927    # Try to remove the string !TIME! from our list.
18928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18930      # If it failed, the variable was not from the command line. Ignore it,
18931      # but warn the user (except for BASH, which is always set by the calling BASH).
18932      if test "xTIME" != xBASH; then
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18934$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18935      fi
18936      # Try to locate tool using the code snippet
18937      for ac_prog in time
18938do
18939  # Extract the first word of "$ac_prog", so it can be a program name with args.
18940set dummy $ac_prog; ac_word=$2
18941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18942$as_echo_n "checking for $ac_word... " >&6; }
18943if ${ac_cv_path_TIME+:} false; then :
18944  $as_echo_n "(cached) " >&6
18945else
18946  case $TIME in
18947  [\\/]* | ?:[\\/]*)
18948  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18949  ;;
18950  *)
18951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18952for as_dir in $PATH
18953do
18954  IFS=$as_save_IFS
18955  test -z "$as_dir" && as_dir=.
18956    for ac_exec_ext in '' $ac_executable_extensions; do
18957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18958    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18960    break 2
18961  fi
18962done
18963  done
18964IFS=$as_save_IFS
18965
18966  ;;
18967esac
18968fi
18969TIME=$ac_cv_path_TIME
18970if test -n "$TIME"; then
18971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18972$as_echo "$TIME" >&6; }
18973else
18974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975$as_echo "no" >&6; }
18976fi
18977
18978
18979  test -n "$TIME" && break
18980done
18981
18982    else
18983      # If it succeeded, then it was overridden by the user. We will use it
18984      # for the tool.
18985
18986      # First remove it from the list of overridden variables, so we can test
18987      # for unknown variables in the end.
18988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18989
18990      # Check if the provided tool contains a complete path.
18991      tool_specified="$TIME"
18992      tool_basename="${tool_specified##*/}"
18993      if test "x$tool_basename" = "x$tool_specified"; then
18994        # A command without a complete path is provided, search $PATH.
18995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18996$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18997        # Extract the first word of "$tool_basename", so it can be a program name with args.
18998set dummy $tool_basename; ac_word=$2
18999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19000$as_echo_n "checking for $ac_word... " >&6; }
19001if ${ac_cv_path_TIME+:} false; then :
19002  $as_echo_n "(cached) " >&6
19003else
19004  case $TIME in
19005  [\\/]* | ?:[\\/]*)
19006  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19007  ;;
19008  *)
19009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19010for as_dir in $PATH
19011do
19012  IFS=$as_save_IFS
19013  test -z "$as_dir" && as_dir=.
19014    for ac_exec_ext in '' $ac_executable_extensions; do
19015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19016    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19018    break 2
19019  fi
19020done
19021  done
19022IFS=$as_save_IFS
19023
19024  ;;
19025esac
19026fi
19027TIME=$ac_cv_path_TIME
19028if test -n "$TIME"; then
19029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19030$as_echo "$TIME" >&6; }
19031else
19032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19033$as_echo "no" >&6; }
19034fi
19035
19036
19037        if test "x$TIME" = x; then
19038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19039        fi
19040      else
19041        # Otherwise we believe it is a complete path. Use it as it is.
19042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19043$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19045$as_echo_n "checking for TIME... " >&6; }
19046        if test ! -x "$tool_specified"; then
19047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19048$as_echo "not found" >&6; }
19049          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19050        fi
19051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19052$as_echo "$tool_specified" >&6; }
19053      fi
19054    fi
19055  fi
19056
19057
19058  # Check if it's GNU time
19059  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19060  if test "x$IS_GNU_TIME" != x; then
19061    IS_GNU_TIME=yes
19062  else
19063    IS_GNU_TIME=no
19064  fi
19065
19066
19067  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19068
19069
19070
19071  # Publish this variable in the help.
19072
19073
19074  if test "x$DSYMUTIL" = x; then
19075    # The variable is not set by user, try to locate tool using the code snippet
19076    for ac_prog in dsymutil
19077do
19078  # Extract the first word of "$ac_prog", so it can be a program name with args.
19079set dummy $ac_prog; ac_word=$2
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19081$as_echo_n "checking for $ac_word... " >&6; }
19082if ${ac_cv_path_DSYMUTIL+:} false; then :
19083  $as_echo_n "(cached) " >&6
19084else
19085  case $DSYMUTIL in
19086  [\\/]* | ?:[\\/]*)
19087  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19088  ;;
19089  *)
19090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091for as_dir in $PATH
19092do
19093  IFS=$as_save_IFS
19094  test -z "$as_dir" && as_dir=.
19095    for ac_exec_ext in '' $ac_executable_extensions; do
19096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19097    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099    break 2
19100  fi
19101done
19102  done
19103IFS=$as_save_IFS
19104
19105  ;;
19106esac
19107fi
19108DSYMUTIL=$ac_cv_path_DSYMUTIL
19109if test -n "$DSYMUTIL"; then
19110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19111$as_echo "$DSYMUTIL" >&6; }
19112else
19113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19114$as_echo "no" >&6; }
19115fi
19116
19117
19118  test -n "$DSYMUTIL" && break
19119done
19120
19121  else
19122    # The variable is set, but is it from the command line or the environment?
19123
19124    # Try to remove the string !DSYMUTIL! from our list.
19125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19127      # If it failed, the variable was not from the command line. Ignore it,
19128      # but warn the user (except for BASH, which is always set by the calling BASH).
19129      if test "xDSYMUTIL" != xBASH; then
19130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19131$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19132      fi
19133      # Try to locate tool using the code snippet
19134      for ac_prog in dsymutil
19135do
19136  # Extract the first word of "$ac_prog", so it can be a program name with args.
19137set dummy $ac_prog; ac_word=$2
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19139$as_echo_n "checking for $ac_word... " >&6; }
19140if ${ac_cv_path_DSYMUTIL+:} false; then :
19141  $as_echo_n "(cached) " >&6
19142else
19143  case $DSYMUTIL in
19144  [\\/]* | ?:[\\/]*)
19145  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19146  ;;
19147  *)
19148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19149for as_dir in $PATH
19150do
19151  IFS=$as_save_IFS
19152  test -z "$as_dir" && as_dir=.
19153    for ac_exec_ext in '' $ac_executable_extensions; do
19154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19155    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19157    break 2
19158  fi
19159done
19160  done
19161IFS=$as_save_IFS
19162
19163  ;;
19164esac
19165fi
19166DSYMUTIL=$ac_cv_path_DSYMUTIL
19167if test -n "$DSYMUTIL"; then
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19169$as_echo "$DSYMUTIL" >&6; }
19170else
19171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19172$as_echo "no" >&6; }
19173fi
19174
19175
19176  test -n "$DSYMUTIL" && break
19177done
19178
19179    else
19180      # If it succeeded, then it was overridden by the user. We will use it
19181      # for the tool.
19182
19183      # First remove it from the list of overridden variables, so we can test
19184      # for unknown variables in the end.
19185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19186
19187      # Check if the provided tool contains a complete path.
19188      tool_specified="$DSYMUTIL"
19189      tool_basename="${tool_specified##*/}"
19190      if test "x$tool_basename" = "x$tool_specified"; then
19191        # A command without a complete path is provided, search $PATH.
19192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19193$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19194        # Extract the first word of "$tool_basename", so it can be a program name with args.
19195set dummy $tool_basename; ac_word=$2
19196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19197$as_echo_n "checking for $ac_word... " >&6; }
19198if ${ac_cv_path_DSYMUTIL+:} false; then :
19199  $as_echo_n "(cached) " >&6
19200else
19201  case $DSYMUTIL in
19202  [\\/]* | ?:[\\/]*)
19203  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19204  ;;
19205  *)
19206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19207for as_dir in $PATH
19208do
19209  IFS=$as_save_IFS
19210  test -z "$as_dir" && as_dir=.
19211    for ac_exec_ext in '' $ac_executable_extensions; do
19212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19213    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19215    break 2
19216  fi
19217done
19218  done
19219IFS=$as_save_IFS
19220
19221  ;;
19222esac
19223fi
19224DSYMUTIL=$ac_cv_path_DSYMUTIL
19225if test -n "$DSYMUTIL"; then
19226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19227$as_echo "$DSYMUTIL" >&6; }
19228else
19229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19230$as_echo "no" >&6; }
19231fi
19232
19233
19234        if test "x$DSYMUTIL" = x; then
19235          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19236        fi
19237      else
19238        # Otherwise we believe it is a complete path. Use it as it is.
19239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19240$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19242$as_echo_n "checking for DSYMUTIL... " >&6; }
19243        if test ! -x "$tool_specified"; then
19244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19245$as_echo "not found" >&6; }
19246          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19247        fi
19248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19249$as_echo "$tool_specified" >&6; }
19250      fi
19251    fi
19252  fi
19253
19254
19255
19256  if test "x$DSYMUTIL" = x; then
19257    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19258  fi
19259
19260
19261
19262
19263
19264  # Publish this variable in the help.
19265
19266
19267  if test "x$XATTR" = x; then
19268    # The variable is not set by user, try to locate tool using the code snippet
19269    for ac_prog in xattr
19270do
19271  # Extract the first word of "$ac_prog", so it can be a program name with args.
19272set dummy $ac_prog; ac_word=$2
19273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19274$as_echo_n "checking for $ac_word... " >&6; }
19275if ${ac_cv_path_XATTR+:} false; then :
19276  $as_echo_n "(cached) " >&6
19277else
19278  case $XATTR in
19279  [\\/]* | ?:[\\/]*)
19280  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19281  ;;
19282  *)
19283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19284for as_dir in $PATH
19285do
19286  IFS=$as_save_IFS
19287  test -z "$as_dir" && as_dir=.
19288    for ac_exec_ext in '' $ac_executable_extensions; do
19289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19290    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19292    break 2
19293  fi
19294done
19295  done
19296IFS=$as_save_IFS
19297
19298  ;;
19299esac
19300fi
19301XATTR=$ac_cv_path_XATTR
19302if test -n "$XATTR"; then
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19304$as_echo "$XATTR" >&6; }
19305else
19306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19307$as_echo "no" >&6; }
19308fi
19309
19310
19311  test -n "$XATTR" && break
19312done
19313
19314  else
19315    # The variable is set, but is it from the command line or the environment?
19316
19317    # Try to remove the string !XATTR! from our list.
19318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19320      # If it failed, the variable was not from the command line. Ignore it,
19321      # but warn the user (except for BASH, which is always set by the calling BASH).
19322      if test "xXATTR" != xBASH; then
19323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19324$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19325      fi
19326      # Try to locate tool using the code snippet
19327      for ac_prog in xattr
19328do
19329  # Extract the first word of "$ac_prog", so it can be a program name with args.
19330set dummy $ac_prog; ac_word=$2
19331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19332$as_echo_n "checking for $ac_word... " >&6; }
19333if ${ac_cv_path_XATTR+:} false; then :
19334  $as_echo_n "(cached) " >&6
19335else
19336  case $XATTR in
19337  [\\/]* | ?:[\\/]*)
19338  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19339  ;;
19340  *)
19341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19342for as_dir in $PATH
19343do
19344  IFS=$as_save_IFS
19345  test -z "$as_dir" && as_dir=.
19346    for ac_exec_ext in '' $ac_executable_extensions; do
19347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19348    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19350    break 2
19351  fi
19352done
19353  done
19354IFS=$as_save_IFS
19355
19356  ;;
19357esac
19358fi
19359XATTR=$ac_cv_path_XATTR
19360if test -n "$XATTR"; then
19361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19362$as_echo "$XATTR" >&6; }
19363else
19364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19365$as_echo "no" >&6; }
19366fi
19367
19368
19369  test -n "$XATTR" && break
19370done
19371
19372    else
19373      # If it succeeded, then it was overridden by the user. We will use it
19374      # for the tool.
19375
19376      # First remove it from the list of overridden variables, so we can test
19377      # for unknown variables in the end.
19378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19379
19380      # Check if the provided tool contains a complete path.
19381      tool_specified="$XATTR"
19382      tool_basename="${tool_specified##*/}"
19383      if test "x$tool_basename" = "x$tool_specified"; then
19384        # A command without a complete path is provided, search $PATH.
19385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19386$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19387        # Extract the first word of "$tool_basename", so it can be a program name with args.
19388set dummy $tool_basename; ac_word=$2
19389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19390$as_echo_n "checking for $ac_word... " >&6; }
19391if ${ac_cv_path_XATTR+:} false; then :
19392  $as_echo_n "(cached) " >&6
19393else
19394  case $XATTR in
19395  [\\/]* | ?:[\\/]*)
19396  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19397  ;;
19398  *)
19399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19400for as_dir in $PATH
19401do
19402  IFS=$as_save_IFS
19403  test -z "$as_dir" && as_dir=.
19404    for ac_exec_ext in '' $ac_executable_extensions; do
19405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19406    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19408    break 2
19409  fi
19410done
19411  done
19412IFS=$as_save_IFS
19413
19414  ;;
19415esac
19416fi
19417XATTR=$ac_cv_path_XATTR
19418if test -n "$XATTR"; then
19419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19420$as_echo "$XATTR" >&6; }
19421else
19422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19423$as_echo "no" >&6; }
19424fi
19425
19426
19427        if test "x$XATTR" = x; then
19428          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19429        fi
19430      else
19431        # Otherwise we believe it is a complete path. Use it as it is.
19432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19433$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19435$as_echo_n "checking for XATTR... " >&6; }
19436        if test ! -x "$tool_specified"; then
19437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19438$as_echo "not found" >&6; }
19439          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19440        fi
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19442$as_echo "$tool_specified" >&6; }
19443      fi
19444    fi
19445  fi
19446
19447
19448
19449  if test "x$XATTR" = x; then
19450    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19451  fi
19452
19453
19454
19455
19456  # Publish this variable in the help.
19457
19458
19459  if test "x$CODESIGN" = x; then
19460    # The variable is not set by user, try to locate tool using the code snippet
19461    for ac_prog in codesign
19462do
19463  # Extract the first word of "$ac_prog", so it can be a program name with args.
19464set dummy $ac_prog; ac_word=$2
19465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19466$as_echo_n "checking for $ac_word... " >&6; }
19467if ${ac_cv_path_CODESIGN+:} false; then :
19468  $as_echo_n "(cached) " >&6
19469else
19470  case $CODESIGN in
19471  [\\/]* | ?:[\\/]*)
19472  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19473  ;;
19474  *)
19475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19476for as_dir in $PATH
19477do
19478  IFS=$as_save_IFS
19479  test -z "$as_dir" && as_dir=.
19480    for ac_exec_ext in '' $ac_executable_extensions; do
19481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19482    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19484    break 2
19485  fi
19486done
19487  done
19488IFS=$as_save_IFS
19489
19490  ;;
19491esac
19492fi
19493CODESIGN=$ac_cv_path_CODESIGN
19494if test -n "$CODESIGN"; then
19495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19496$as_echo "$CODESIGN" >&6; }
19497else
19498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19499$as_echo "no" >&6; }
19500fi
19501
19502
19503  test -n "$CODESIGN" && break
19504done
19505
19506  else
19507    # The variable is set, but is it from the command line or the environment?
19508
19509    # Try to remove the string !CODESIGN! from our list.
19510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19512      # If it failed, the variable was not from the command line. Ignore it,
19513      # but warn the user (except for BASH, which is always set by the calling BASH).
19514      if test "xCODESIGN" != xBASH; then
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19516$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19517      fi
19518      # Try to locate tool using the code snippet
19519      for ac_prog in codesign
19520do
19521  # Extract the first word of "$ac_prog", so it can be a program name with args.
19522set dummy $ac_prog; ac_word=$2
19523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19524$as_echo_n "checking for $ac_word... " >&6; }
19525if ${ac_cv_path_CODESIGN+:} false; then :
19526  $as_echo_n "(cached) " >&6
19527else
19528  case $CODESIGN in
19529  [\\/]* | ?:[\\/]*)
19530  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19531  ;;
19532  *)
19533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19534for as_dir in $PATH
19535do
19536  IFS=$as_save_IFS
19537  test -z "$as_dir" && as_dir=.
19538    for ac_exec_ext in '' $ac_executable_extensions; do
19539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19540    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19542    break 2
19543  fi
19544done
19545  done
19546IFS=$as_save_IFS
19547
19548  ;;
19549esac
19550fi
19551CODESIGN=$ac_cv_path_CODESIGN
19552if test -n "$CODESIGN"; then
19553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19554$as_echo "$CODESIGN" >&6; }
19555else
19556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19557$as_echo "no" >&6; }
19558fi
19559
19560
19561  test -n "$CODESIGN" && break
19562done
19563
19564    else
19565      # If it succeeded, then it was overridden by the user. We will use it
19566      # for the tool.
19567
19568      # First remove it from the list of overridden variables, so we can test
19569      # for unknown variables in the end.
19570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19571
19572      # Check if the provided tool contains a complete path.
19573      tool_specified="$CODESIGN"
19574      tool_basename="${tool_specified##*/}"
19575      if test "x$tool_basename" = "x$tool_specified"; then
19576        # A command without a complete path is provided, search $PATH.
19577        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19578$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19579        # Extract the first word of "$tool_basename", so it can be a program name with args.
19580set dummy $tool_basename; ac_word=$2
19581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19582$as_echo_n "checking for $ac_word... " >&6; }
19583if ${ac_cv_path_CODESIGN+:} false; then :
19584  $as_echo_n "(cached) " >&6
19585else
19586  case $CODESIGN in
19587  [\\/]* | ?:[\\/]*)
19588  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19589  ;;
19590  *)
19591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19592for as_dir in $PATH
19593do
19594  IFS=$as_save_IFS
19595  test -z "$as_dir" && as_dir=.
19596    for ac_exec_ext in '' $ac_executable_extensions; do
19597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19598    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19600    break 2
19601  fi
19602done
19603  done
19604IFS=$as_save_IFS
19605
19606  ;;
19607esac
19608fi
19609CODESIGN=$ac_cv_path_CODESIGN
19610if test -n "$CODESIGN"; then
19611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19612$as_echo "$CODESIGN" >&6; }
19613else
19614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19615$as_echo "no" >&6; }
19616fi
19617
19618
19619        if test "x$CODESIGN" = x; then
19620          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19621        fi
19622      else
19623        # Otherwise we believe it is a complete path. Use it as it is.
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19625$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19627$as_echo_n "checking for CODESIGN... " >&6; }
19628        if test ! -x "$tool_specified"; then
19629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19630$as_echo "not found" >&6; }
19631          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19632        fi
19633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19634$as_echo "$tool_specified" >&6; }
19635      fi
19636    fi
19637  fi
19638
19639
19640    if test "x$CODESIGN" != "x"; then
19641      # Verify that the openjdk_codesign certificate is present
19642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19643$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19644      rm -f codesign-testfile
19645      touch codesign-testfile
19646      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19647      rm -f codesign-testfile
19648      if test "x$CODESIGN" = x; then
19649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19650$as_echo "no" >&6; }
19651      else
19652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19653$as_echo "yes" >&6; }
19654      fi
19655    fi
19656  fi
19657
19658
19659  # Test if bash supports pipefail.
19660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19661$as_echo_n "checking if bash supports pipefail... " >&6; }
19662  if ${BASH} -c 'set -o pipefail'; then
19663    BASH_ARGS="$BASH_ARGS -o pipefail"
19664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19665$as_echo "yes" >&6; }
19666  else
19667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19668$as_echo "no" >&6; }
19669  fi
19670
19671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19672$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19673  if ${BASH} -e -c 'true'; then
19674    BASH_ARGS="$BASH_ARGS -e"
19675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19676$as_echo "yes" >&6; }
19677  else
19678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19679$as_echo "no" >&6; }
19680  fi
19681
19682
19683
19684
19685# Check if pkg-config is available.
19686
19687
19688if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19689	if test -n "$ac_tool_prefix"; then
19690  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19691set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19693$as_echo_n "checking for $ac_word... " >&6; }
19694if ${ac_cv_path_PKG_CONFIG+:} false; then :
19695  $as_echo_n "(cached) " >&6
19696else
19697  case $PKG_CONFIG in
19698  [\\/]* | ?:[\\/]*)
19699  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19700  ;;
19701  *)
19702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19709    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717  ;;
19718esac
19719fi
19720PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19721if test -n "$PKG_CONFIG"; then
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19723$as_echo "$PKG_CONFIG" >&6; }
19724else
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726$as_echo "no" >&6; }
19727fi
19728
19729
19730fi
19731if test -z "$ac_cv_path_PKG_CONFIG"; then
19732  ac_pt_PKG_CONFIG=$PKG_CONFIG
19733  # Extract the first word of "pkg-config", so it can be a program name with args.
19734set dummy pkg-config; ac_word=$2
19735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19736$as_echo_n "checking for $ac_word... " >&6; }
19737if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19738  $as_echo_n "(cached) " >&6
19739else
19740  case $ac_pt_PKG_CONFIG in
19741  [\\/]* | ?:[\\/]*)
19742  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19743  ;;
19744  *)
19745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19746for as_dir in $PATH
19747do
19748  IFS=$as_save_IFS
19749  test -z "$as_dir" && as_dir=.
19750    for ac_exec_ext in '' $ac_executable_extensions; do
19751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19752    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19754    break 2
19755  fi
19756done
19757  done
19758IFS=$as_save_IFS
19759
19760  ;;
19761esac
19762fi
19763ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19764if test -n "$ac_pt_PKG_CONFIG"; then
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19766$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19767else
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19769$as_echo "no" >&6; }
19770fi
19771
19772  if test "x$ac_pt_PKG_CONFIG" = x; then
19773    PKG_CONFIG=""
19774  else
19775    case $cross_compiling:$ac_tool_warned in
19776yes:)
19777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19779ac_tool_warned=yes ;;
19780esac
19781    PKG_CONFIG=$ac_pt_PKG_CONFIG
19782  fi
19783else
19784  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19785fi
19786
19787fi
19788if test -n "$PKG_CONFIG"; then
19789	_pkg_min_version=0.9.0
19790	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19791$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19792	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19793		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19794$as_echo "yes" >&6; }
19795	else
19796		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19797$as_echo "no" >&6; }
19798		PKG_CONFIG=""
19799	fi
19800
19801fi
19802
19803# After basic tools have been setup, we can check build os specific details.
19804
19805  ###############################################################################
19806
19807  # Note that this is the build platform OS version!
19808
19809  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19810  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19811  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19812  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19813
19814
19815
19816
19817
19818# Setup builddeps, for automatic downloading of tools we need.
19819# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19820# boot-jdk setup, but we need to have basic tools setup first.
19821
19822
19823# Check whether --with-builddeps-conf was given.
19824if test "${with_builddeps_conf+set}" = set; then :
19825  withval=$with_builddeps_conf;
19826fi
19827
19828
19829
19830# Check whether --with-builddeps-server was given.
19831if test "${with_builddeps_server+set}" = set; then :
19832  withval=$with_builddeps_server;
19833fi
19834
19835
19836
19837# Check whether --with-builddeps-dir was given.
19838if test "${with_builddeps_dir+set}" = set; then :
19839  withval=$with_builddeps_dir;
19840else
19841  with_builddeps_dir=/localhome/builddeps
19842fi
19843
19844
19845
19846# Check whether --with-builddeps-group was given.
19847if test "${with_builddeps_group+set}" = set; then :
19848  withval=$with_builddeps_group;
19849fi
19850
19851
19852
19853
19854  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19855    if test "x$with_builddeps_conf" != x; then
19856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19857$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19858      builddepsfile=$with_builddeps_conf
19859      if test -s $builddepsfile; then
19860        . $builddepsfile
19861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19862$as_echo "loaded!" >&6; }
19863      else
19864        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19865      fi
19866    else
19867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19868$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19869      builddepsfile=`mktemp`
19870      touch $builddepsfile
19871      # Put all found confs into a single file.
19872      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19873      # Source the file to acquire the variables
19874      if test -s $builddepsfile; then
19875        . $builddepsfile
19876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19877$as_echo "found at least one!" >&6; }
19878      else
19879        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19880      fi
19881    fi
19882    # Create build and target names that use _ instead of "-" and ".".
19883    # This is necessary to use them in variable names.
19884    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19885    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19886    # Extract rewrite information for build and target
19887    eval rewritten_build=\${REWRITE_${build_var}}
19888    if test "x$rewritten_build" = x; then
19889      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19890      echo Build stays the same $rewritten_build
19891    else
19892      echo Rewriting build for builddeps into $rewritten_build
19893    fi
19894    eval rewritten_target=\${REWRITE_${target_var}}
19895    if test "x$rewritten_target" = x; then
19896      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19897      echo Target stays the same $rewritten_target
19898    else
19899      echo Rewriting target for builddeps into $rewritten_target
19900    fi
19901    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19902    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19903  fi
19904  for ac_prog in 7z unzip
19905do
19906  # Extract the first word of "$ac_prog", so it can be a program name with args.
19907set dummy $ac_prog; ac_word=$2
19908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19909$as_echo_n "checking for $ac_word... " >&6; }
19910if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19911  $as_echo_n "(cached) " >&6
19912else
19913  if test -n "$BDEPS_UNZIP"; then
19914  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19915else
19916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19917for as_dir in $PATH
19918do
19919  IFS=$as_save_IFS
19920  test -z "$as_dir" && as_dir=.
19921    for ac_exec_ext in '' $ac_executable_extensions; do
19922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19923    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19925    break 2
19926  fi
19927done
19928  done
19929IFS=$as_save_IFS
19930
19931fi
19932fi
19933BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19934if test -n "$BDEPS_UNZIP"; then
19935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19936$as_echo "$BDEPS_UNZIP" >&6; }
19937else
19938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19939$as_echo "no" >&6; }
19940fi
19941
19942
19943  test -n "$BDEPS_UNZIP" && break
19944done
19945
19946  if test "x$BDEPS_UNZIP" = x7z; then
19947    BDEPS_UNZIP="7z x"
19948  fi
19949
19950  for ac_prog in wget lftp ftp
19951do
19952  # Extract the first word of "$ac_prog", so it can be a program name with args.
19953set dummy $ac_prog; ac_word=$2
19954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19955$as_echo_n "checking for $ac_word... " >&6; }
19956if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19957  $as_echo_n "(cached) " >&6
19958else
19959  if test -n "$BDEPS_FTP"; then
19960  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19961else
19962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19963for as_dir in $PATH
19964do
19965  IFS=$as_save_IFS
19966  test -z "$as_dir" && as_dir=.
19967    for ac_exec_ext in '' $ac_executable_extensions; do
19968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19969    ac_cv_prog_BDEPS_FTP="$ac_prog"
19970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19971    break 2
19972  fi
19973done
19974  done
19975IFS=$as_save_IFS
19976
19977fi
19978fi
19979BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19980if test -n "$BDEPS_FTP"; then
19981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19982$as_echo "$BDEPS_FTP" >&6; }
19983else
19984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19985$as_echo "no" >&6; }
19986fi
19987
19988
19989  test -n "$BDEPS_FTP" && break
19990done
19991
19992
19993
19994###############################################################################
19995#
19996# Determine OpenJDK variants, options and version numbers.
19997#
19998###############################################################################
19999
20000# We need build & target for this.
20001
20002
20003  ###############################################################################
20004  #
20005  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20006  # We always build headless support.
20007  #
20008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20009$as_echo_n "checking headful support... " >&6; }
20010  # Check whether --enable-headful was given.
20011if test "${enable_headful+set}" = set; then :
20012  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20013else
20014  SUPPORT_HEADFUL=yes
20015fi
20016
20017
20018  SUPPORT_HEADLESS=yes
20019  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20020
20021  if test "x$SUPPORT_HEADFUL" = xyes; then
20022    # We are building both headful and headless.
20023    headful_msg="include support for both headful and headless"
20024  fi
20025
20026  if test "x$SUPPORT_HEADFUL" = xno; then
20027    # Thus we are building headless only.
20028    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20029    headful_msg="headless only"
20030  fi
20031
20032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20033$as_echo "$headful_msg" >&6; }
20034
20035
20036
20037
20038
20039  # Control wether Hotspot runs Queens test after build.
20040  # Check whether --enable-hotspot-test-in-build was given.
20041if test "${enable_hotspot_test_in_build+set}" = set; then :
20042  enableval=$enable_hotspot_test_in_build;
20043else
20044  enable_hotspot_test_in_build=no
20045fi
20046
20047  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20048    TEST_IN_BUILD=true
20049  else
20050    TEST_IN_BUILD=false
20051  fi
20052
20053
20054  ###############################################################################
20055  #
20056  # Choose cacerts source file
20057  #
20058
20059# Check whether --with-cacerts-file was given.
20060if test "${with_cacerts_file+set}" = set; then :
20061  withval=$with_cacerts_file;
20062fi
20063
20064  if test "x$with_cacerts_file" != x; then
20065    CACERTS_FILE=$with_cacerts_file
20066  fi
20067
20068
20069  ###############################################################################
20070  #
20071  # Enable or disable unlimited crypto
20072  #
20073  # Check whether --enable-unlimited-crypto was given.
20074if test "${enable_unlimited_crypto+set}" = set; then :
20075  enableval=$enable_unlimited_crypto;
20076else
20077  enable_unlimited_crypto=no
20078fi
20079
20080  if test "x$enable_unlimited_crypto" = "xyes"; then
20081    UNLIMITED_CRYPTO=true
20082  else
20083    UNLIMITED_CRYPTO=false
20084  fi
20085
20086
20087  ###############################################################################
20088  #
20089  # Enable or disable the elliptic curve crypto implementation
20090  #
20091
20092
20093  ###############################################################################
20094  #
20095  # --enable-rmiconnector-iiop
20096  #
20097  # Check whether --enable-rmiconnector-iiop was given.
20098if test "${enable_rmiconnector_iiop+set}" = set; then :
20099  enableval=$enable_rmiconnector_iiop;
20100fi
20101
20102  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20103    RMICONNECTOR_IIOP=true
20104  else
20105    RMICONNECTOR_IIOP=false
20106  fi
20107
20108
20109  ###############################################################################
20110  #
20111  # Compress jars
20112  #
20113  COMPRESS_JARS=false
20114
20115
20116
20117
20118  # Source the version numbers
20119  . $AUTOCONF_DIR/version-numbers
20120
20121  # Get the settings from parameters
20122
20123# Check whether --with-milestone was given.
20124if test "${with_milestone+set}" = set; then :
20125  withval=$with_milestone;
20126fi
20127
20128  if test "x$with_milestone" = xyes; then
20129    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20130  elif test "x$with_milestone" != x; then
20131    MILESTONE="$with_milestone"
20132  fi
20133  if test "x$MILESTONE" = x; then
20134    MILESTONE=internal
20135  fi
20136
20137
20138# Check whether --with-update-version was given.
20139if test "${with_update_version+set}" = set; then :
20140  withval=$with_update_version;
20141fi
20142
20143  if test "x$with_update_version" = xyes; then
20144    as_fn_error $? "Update version must have a value" "$LINENO" 5
20145  elif test "x$with_update_version" != x; then
20146    JDK_UPDATE_VERSION="$with_update_version"
20147    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20148    # to a bug in expr (which reduces it to just X). To work around this, we
20149    # always add a 0 to one digit update versions.
20150    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20151      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20152    fi
20153  fi
20154
20155
20156# Check whether --with-user-release-suffix was given.
20157if test "${with_user_release_suffix+set}" = set; then :
20158  withval=$with_user_release_suffix;
20159fi
20160
20161  if test "x$with_user_release_suffix" = xyes; then
20162    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20163  elif test "x$with_user_release_suffix" != x; then
20164    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20165  fi
20166
20167
20168# Check whether --with-build-number was given.
20169if test "${with_build_number+set}" = set; then :
20170  withval=$with_build_number;
20171fi
20172
20173  if test "x$with_build_number" = xyes; then
20174    as_fn_error $? "Build number must have a value" "$LINENO" 5
20175  elif test "x$with_build_number" != x; then
20176    JDK_BUILD_NUMBER="$with_build_number"
20177  fi
20178  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20179  if test "x$JDK_BUILD_NUMBER" = x; then
20180    JDK_BUILD_NUMBER=b00
20181    if test "x$USER_RELEASE_SUFFIX" = x; then
20182      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20183      # Avoid [:alnum:] since it depends on the locale.
20184      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20185      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20186    fi
20187  fi
20188
20189  # Now set the JDK version, milestone, build number etc.
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206# Check whether --with-copyright-year was given.
20207if test "${with_copyright_year+set}" = set; then :
20208  withval=$with_copyright_year;
20209fi
20210
20211  if test "x$with_copyright_year" = xyes; then
20212    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20213  elif test "x$with_copyright_year" != x; then
20214    COPYRIGHT_YEAR="$with_copyright_year"
20215  else
20216    COPYRIGHT_YEAR=`date +'%Y'`
20217  fi
20218
20219
20220  if test "x$JDK_UPDATE_VERSION" != x; then
20221    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20222  else
20223    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20224  fi
20225
20226
20227  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20228
20229
20230
20231###############################################################################
20232#
20233# Setup BootJDK, used to bootstrap the build.
20234#
20235###############################################################################
20236
20237
20238  BOOT_JDK_FOUND=no
20239
20240# Check whether --with-boot-jdk was given.
20241if test "${with_boot_jdk+set}" = set; then :
20242  withval=$with_boot_jdk;
20243fi
20244
20245
20246  # We look for the Boot JDK through various means, going from more certain to
20247  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20248  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20249  # must check if this is indeed valid; otherwise we'll continue looking.
20250
20251  # Test: Is bootjdk explicitely set by command line arguments?
20252
20253  if test "x$BOOT_JDK_FOUND" = xno; then
20254    # Now execute the test
20255
20256  if test "x$with_boot_jdk" != x; then
20257    BOOT_JDK=$with_boot_jdk
20258    BOOT_JDK_FOUND=maybe
20259    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20260$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20261  fi
20262
20263
20264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20266      # Do we have a bin/java?
20267      if test ! -x "$BOOT_JDK/bin/java"; then
20268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20270        BOOT_JDK_FOUND=no
20271      else
20272        # Do we have a bin/javac?
20273        if test ! -x "$BOOT_JDK/bin/javac"; then
20274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20278          BOOT_JDK_FOUND=no
20279        else
20280          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20281          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20282
20283          # Extra M4 quote needed to protect [] in grep expression.
20284          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20285          if test "x$FOUND_CORRECT_VERSION" = x; then
20286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20288            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20289$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20290            BOOT_JDK_FOUND=no
20291          else
20292            # We're done! :-)
20293            BOOT_JDK_FOUND=yes
20294
20295  # Only process if variable expands to non-empty
20296
20297  if test "x$BOOT_JDK" != x; then
20298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20299
20300  # Input might be given as Windows format, start by converting to
20301  # unix format.
20302  path="$BOOT_JDK"
20303  new_path=`$CYGPATH -u "$path"`
20304
20305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20308  # "foo.exe" is OK but "foo" is an error.
20309  #
20310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20311  # It is also a way to make sure we got the proper file name for the real test later on.
20312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20313  if test "x$test_shortpath" = x; then
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20317  fi
20318
20319  # Call helper function which possibly converts this using DOS-style short mode.
20320  # If so, the updated path is stored in $new_path.
20321
20322  input_path="$new_path"
20323  # Check if we need to convert this using DOS-style short mode. If the path
20324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20325  # take no chances and rewrite it.
20326  # Note: m4 eats our [], so we need to use [ and ] instead.
20327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20328  if test "x$has_forbidden_chars" != x; then
20329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20333      # Going to short mode and back again did indeed matter. Since short mode is
20334      # case insensitive, let's make it lowercase to improve readability.
20335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20336      # Now convert it back to Unix-style (cygpath)
20337      input_path=`$CYGPATH -u "$shortmode_path"`
20338      new_path="$input_path"
20339    fi
20340  fi
20341
20342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20343  if test "x$test_cygdrive_prefix" = x; then
20344    # As a simple fix, exclude /usr/bin since it's not a real path.
20345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20347      # a path prefixed by /cygdrive for fixpath to work.
20348      new_path="$CYGWIN_ROOT_PATH$input_path"
20349    fi
20350  fi
20351
20352
20353  if test "x$path" != "x$new_path"; then
20354    BOOT_JDK="$new_path"
20355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20357  fi
20358
20359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20360
20361  path="$BOOT_JDK"
20362  has_colon=`$ECHO $path | $GREP ^.:`
20363  new_path="$path"
20364  if test "x$has_colon" = x; then
20365    # Not in mixed or Windows style, start by that.
20366    new_path=`cmd //c echo $path`
20367  fi
20368
20369
20370  input_path="$new_path"
20371  # Check if we need to convert this using DOS-style short mode. If the path
20372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20373  # take no chances and rewrite it.
20374  # Note: m4 eats our [], so we need to use [ and ] instead.
20375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20376  if test "x$has_forbidden_chars" != x; then
20377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20379  fi
20380
20381
20382  windows_path="$new_path"
20383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20384    unix_path=`$CYGPATH -u "$windows_path"`
20385    new_path="$unix_path"
20386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20388    new_path="$unix_path"
20389  fi
20390
20391  if test "x$path" != "x$new_path"; then
20392    BOOT_JDK="$new_path"
20393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20395  fi
20396
20397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20399
20400    else
20401      # We're on a unix platform. Hooray! :)
20402      path="$BOOT_JDK"
20403      has_space=`$ECHO "$path" | $GREP " "`
20404      if test "x$has_space" != x; then
20405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20408      fi
20409
20410      # Use eval to expand a potential ~
20411      eval path="$path"
20412      if test ! -f "$path" && test ! -d "$path"; then
20413        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20414      fi
20415
20416      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20417    fi
20418  fi
20419
20420            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20421$as_echo_n "checking for Boot JDK... " >&6; }
20422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20423$as_echo "$BOOT_JDK" >&6; }
20424            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20425$as_echo_n "checking Boot JDK version... " >&6; }
20426            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20428$as_echo "$BOOT_JDK_VERSION" >&6; }
20429          fi # end check jdk version
20430        fi # end check javac
20431      fi # end check java
20432    fi # end check boot jdk found
20433  fi
20434
20435  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20436    # Having specified an argument which is incorrect will produce an instant failure;
20437    # we should not go on looking
20438    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20439  fi
20440
20441  # Test: Is bootjdk available from builddeps?
20442
20443  if test "x$BOOT_JDK_FOUND" = xno; then
20444    # Now execute the test
20445
20446
20447
20448  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20449    # Source the builddeps file again, to make sure it uses the latest variables!
20450    . $builddepsfile
20451    # Look for a target and build machine specific resource!
20452    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20453    if test "x$resource" = x; then
20454      # Ok, lets instead look for a target specific resource
20455      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20456    fi
20457    if test "x$resource" = x; then
20458      # Ok, lets instead look for a build specific resource
20459      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20460    fi
20461    if test "x$resource" = x; then
20462      # Ok, lets instead look for a generic resource
20463      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20464      resource=${builddep_bootjdk}
20465    fi
20466    if test "x$resource" != x; then
20467      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20468$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20469      # If the resource in the builddeps.conf file is an existing directory,
20470      # for example /java/linux/cups
20471      if test -d ${resource}; then
20472        depdir=${resource}
20473      else
20474
20475  # bootjdk is for example mymodule
20476  # $resource is for example libs/general/libmymod_1_2_3.zip
20477  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20478  # $with_builddeps_dir is for example /localhome/builddeps
20479  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20480  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20481  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20482  filename=`basename $resource`
20483  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20484  filebase=${filename%%.*}
20485  extension=${filename#*.}
20486  installdir=$with_builddeps_dir/$filebase
20487  if test ! -f $installdir/$filename.unpacked; then
20488    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20489$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20490    if test ! -d $installdir; then
20491      mkdir -p $installdir
20492    fi
20493    if test ! -d $installdir; then
20494      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20495    fi
20496    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20497    touch $tmpfile
20498    if test ! -f $tmpfile; then
20499      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20500    fi
20501
20502  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20503  # $tmpfile is the local file name for the downloaded file.
20504  VALID_TOOL=no
20505  if test "x$BDEPS_FTP" = xwget; then
20506    VALID_TOOL=yes
20507    wget -O $tmpfile $with_builddeps_server/$resource
20508  fi
20509  if test "x$BDEPS_FTP" = xlftp; then
20510    VALID_TOOL=yes
20511    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20512  fi
20513  if test "x$BDEPS_FTP" = xftp; then
20514    VALID_TOOL=yes
20515    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20516    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20517    FTPUSERPWD=${FTPSERVER%%@*}
20518    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20519      FTPUSER=${userpwd%%:*}
20520      FTPPWD=${userpwd#*@}
20521      FTPSERVER=${FTPSERVER#*@}
20522    else
20523      FTPUSER=ftp
20524      FTPPWD=ftp
20525    fi
20526    # the "pass" command does not work on some
20527    # ftp clients (read ftp.exe) but if it works,
20528    # passive mode is better!
20529    ( \
20530        echo "user $FTPUSER $FTPPWD"        ; \
20531        echo "pass"                         ; \
20532        echo "bin"                          ; \
20533        echo "get $FTPPATH $tmpfile"              ; \
20534    ) | ftp -in $FTPSERVER
20535  fi
20536  if test "x$VALID_TOOL" != xyes; then
20537    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20538  fi
20539
20540    mv $tmpfile $installdir/$filename
20541    if test ! -s $installdir/$filename; then
20542      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20543    fi
20544    case "$extension" in
20545      zip)  echo "Unzipping $installdir/$filename..."
20546        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20547        ;;
20548      tar.gz) echo "Untaring $installdir/$filename..."
20549        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20550        ;;
20551      tgz) echo "Untaring $installdir/$filename..."
20552        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20553        ;;
20554      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20555        ;;
20556    esac
20557  fi
20558  if test -f $installdir/$filename.unpacked; then
20559    depdir=$installdir
20560  fi
20561
20562      fi
20563      # Source the builddeps file again, because in the previous command, the depdir
20564      # was updated to point at the current build dependency install directory.
20565      . $builddepsfile
20566      # Now extract variables from the builddeps.conf files.
20567      theroot=${builddep_bootjdk_ROOT}
20568      thecflags=${builddep_bootjdk_CFLAGS}
20569      thelibs=${builddep_bootjdk_LIBS}
20570      if test "x$depdir" = x; then
20571        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20572      fi
20573      BOOT_JDK=$depdir
20574      if test "x$theroot" != x; then
20575        BOOT_JDK="$theroot"
20576      fi
20577      if test "x$thecflags" != x; then
20578        BOOT_JDK_CFLAGS="$thecflags"
20579      fi
20580      if test "x$thelibs" != x; then
20581        BOOT_JDK_LIBS="$thelibs"
20582      fi
20583      BOOT_JDK_FOUND=maybe
20584      else BOOT_JDK_FOUND=no
20585
20586    fi
20587    else BOOT_JDK_FOUND=no
20588
20589  fi
20590
20591
20592
20593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20595      # Do we have a bin/java?
20596      if test ! -x "$BOOT_JDK/bin/java"; then
20597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20599        BOOT_JDK_FOUND=no
20600      else
20601        # Do we have a bin/javac?
20602        if test ! -x "$BOOT_JDK/bin/javac"; then
20603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20607          BOOT_JDK_FOUND=no
20608        else
20609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20611
20612          # Extra M4 quote needed to protect [] in grep expression.
20613          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20614          if test "x$FOUND_CORRECT_VERSION" = x; then
20615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20619            BOOT_JDK_FOUND=no
20620          else
20621            # We're done! :-)
20622            BOOT_JDK_FOUND=yes
20623
20624  # Only process if variable expands to non-empty
20625
20626  if test "x$BOOT_JDK" != x; then
20627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20628
20629  # Input might be given as Windows format, start by converting to
20630  # unix format.
20631  path="$BOOT_JDK"
20632  new_path=`$CYGPATH -u "$path"`
20633
20634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20637  # "foo.exe" is OK but "foo" is an error.
20638  #
20639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20640  # It is also a way to make sure we got the proper file name for the real test later on.
20641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20642  if test "x$test_shortpath" = x; then
20643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20646  fi
20647
20648  # Call helper function which possibly converts this using DOS-style short mode.
20649  # If so, the updated path is stored in $new_path.
20650
20651  input_path="$new_path"
20652  # Check if we need to convert this using DOS-style short mode. If the path
20653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20654  # take no chances and rewrite it.
20655  # Note: m4 eats our [], so we need to use [ and ] instead.
20656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20657  if test "x$has_forbidden_chars" != x; then
20658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20662      # Going to short mode and back again did indeed matter. Since short mode is
20663      # case insensitive, let's make it lowercase to improve readability.
20664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20665      # Now convert it back to Unix-style (cygpath)
20666      input_path=`$CYGPATH -u "$shortmode_path"`
20667      new_path="$input_path"
20668    fi
20669  fi
20670
20671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20672  if test "x$test_cygdrive_prefix" = x; then
20673    # As a simple fix, exclude /usr/bin since it's not a real path.
20674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20676      # a path prefixed by /cygdrive for fixpath to work.
20677      new_path="$CYGWIN_ROOT_PATH$input_path"
20678    fi
20679  fi
20680
20681
20682  if test "x$path" != "x$new_path"; then
20683    BOOT_JDK="$new_path"
20684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20686  fi
20687
20688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20689
20690  path="$BOOT_JDK"
20691  has_colon=`$ECHO $path | $GREP ^.:`
20692  new_path="$path"
20693  if test "x$has_colon" = x; then
20694    # Not in mixed or Windows style, start by that.
20695    new_path=`cmd //c echo $path`
20696  fi
20697
20698
20699  input_path="$new_path"
20700  # Check if we need to convert this using DOS-style short mode. If the path
20701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20702  # take no chances and rewrite it.
20703  # Note: m4 eats our [], so we need to use [ and ] instead.
20704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20705  if test "x$has_forbidden_chars" != x; then
20706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20708  fi
20709
20710
20711  windows_path="$new_path"
20712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20713    unix_path=`$CYGPATH -u "$windows_path"`
20714    new_path="$unix_path"
20715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20717    new_path="$unix_path"
20718  fi
20719
20720  if test "x$path" != "x$new_path"; then
20721    BOOT_JDK="$new_path"
20722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20724  fi
20725
20726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20728
20729    else
20730      # We're on a unix platform. Hooray! :)
20731      path="$BOOT_JDK"
20732      has_space=`$ECHO "$path" | $GREP " "`
20733      if test "x$has_space" != x; then
20734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20737      fi
20738
20739      # Use eval to expand a potential ~
20740      eval path="$path"
20741      if test ! -f "$path" && test ! -d "$path"; then
20742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20743      fi
20744
20745      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20746    fi
20747  fi
20748
20749            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20750$as_echo_n "checking for Boot JDK... " >&6; }
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20752$as_echo "$BOOT_JDK" >&6; }
20753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20754$as_echo_n "checking Boot JDK version... " >&6; }
20755            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20757$as_echo "$BOOT_JDK_VERSION" >&6; }
20758          fi # end check jdk version
20759        fi # end check javac
20760      fi # end check java
20761    fi # end check boot jdk found
20762  fi
20763
20764
20765  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20766
20767  if test "x$BOOT_JDK_FOUND" = xno; then
20768    # Now execute the test
20769
20770  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20771    # First check at user selected default
20772
20773  if test "x$BOOT_JDK_FOUND" = xno; then
20774    # Now execute the test
20775
20776  if test -x /usr/libexec/java_home; then
20777    BOOT_JDK=`/usr/libexec/java_home `
20778    BOOT_JDK_FOUND=maybe
20779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20780$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20781  fi
20782
20783
20784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20786      # Do we have a bin/java?
20787      if test ! -x "$BOOT_JDK/bin/java"; then
20788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20790        BOOT_JDK_FOUND=no
20791      else
20792        # Do we have a bin/javac?
20793        if test ! -x "$BOOT_JDK/bin/javac"; then
20794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20798          BOOT_JDK_FOUND=no
20799        else
20800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20802
20803          # Extra M4 quote needed to protect [] in grep expression.
20804          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20805          if test "x$FOUND_CORRECT_VERSION" = x; then
20806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20810            BOOT_JDK_FOUND=no
20811          else
20812            # We're done! :-)
20813            BOOT_JDK_FOUND=yes
20814
20815  # Only process if variable expands to non-empty
20816
20817  if test "x$BOOT_JDK" != x; then
20818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20819
20820  # Input might be given as Windows format, start by converting to
20821  # unix format.
20822  path="$BOOT_JDK"
20823  new_path=`$CYGPATH -u "$path"`
20824
20825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20828  # "foo.exe" is OK but "foo" is an error.
20829  #
20830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20831  # It is also a way to make sure we got the proper file name for the real test later on.
20832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20833  if test "x$test_shortpath" = x; then
20834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20837  fi
20838
20839  # Call helper function which possibly converts this using DOS-style short mode.
20840  # If so, the updated path is stored in $new_path.
20841
20842  input_path="$new_path"
20843  # Check if we need to convert this using DOS-style short mode. If the path
20844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20845  # take no chances and rewrite it.
20846  # Note: m4 eats our [], so we need to use [ and ] instead.
20847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20848  if test "x$has_forbidden_chars" != x; then
20849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20853      # Going to short mode and back again did indeed matter. Since short mode is
20854      # case insensitive, let's make it lowercase to improve readability.
20855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20856      # Now convert it back to Unix-style (cygpath)
20857      input_path=`$CYGPATH -u "$shortmode_path"`
20858      new_path="$input_path"
20859    fi
20860  fi
20861
20862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20863  if test "x$test_cygdrive_prefix" = x; then
20864    # As a simple fix, exclude /usr/bin since it's not a real path.
20865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20867      # a path prefixed by /cygdrive for fixpath to work.
20868      new_path="$CYGWIN_ROOT_PATH$input_path"
20869    fi
20870  fi
20871
20872
20873  if test "x$path" != "x$new_path"; then
20874    BOOT_JDK="$new_path"
20875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20877  fi
20878
20879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20880
20881  path="$BOOT_JDK"
20882  has_colon=`$ECHO $path | $GREP ^.:`
20883  new_path="$path"
20884  if test "x$has_colon" = x; then
20885    # Not in mixed or Windows style, start by that.
20886    new_path=`cmd //c echo $path`
20887  fi
20888
20889
20890  input_path="$new_path"
20891  # Check if we need to convert this using DOS-style short mode. If the path
20892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20893  # take no chances and rewrite it.
20894  # Note: m4 eats our [], so we need to use [ and ] instead.
20895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20896  if test "x$has_forbidden_chars" != x; then
20897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20899  fi
20900
20901
20902  windows_path="$new_path"
20903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904    unix_path=`$CYGPATH -u "$windows_path"`
20905    new_path="$unix_path"
20906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908    new_path="$unix_path"
20909  fi
20910
20911  if test "x$path" != "x$new_path"; then
20912    BOOT_JDK="$new_path"
20913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20915  fi
20916
20917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20919
20920    else
20921      # We're on a unix platform. Hooray! :)
20922      path="$BOOT_JDK"
20923      has_space=`$ECHO "$path" | $GREP " "`
20924      if test "x$has_space" != x; then
20925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20928      fi
20929
20930      # Use eval to expand a potential ~
20931      eval path="$path"
20932      if test ! -f "$path" && test ! -d "$path"; then
20933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20934      fi
20935
20936      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20937    fi
20938  fi
20939
20940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20941$as_echo_n "checking for Boot JDK... " >&6; }
20942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20943$as_echo "$BOOT_JDK" >&6; }
20944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20945$as_echo_n "checking Boot JDK version... " >&6; }
20946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20948$as_echo "$BOOT_JDK_VERSION" >&6; }
20949          fi # end check jdk version
20950        fi # end check javac
20951      fi # end check java
20952    fi # end check boot jdk found
20953  fi
20954
20955    # If that did not work out (e.g. too old), try explicit versions instead
20956
20957  if test "x$BOOT_JDK_FOUND" = xno; then
20958    # Now execute the test
20959
20960  if test -x /usr/libexec/java_home; then
20961    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20962    BOOT_JDK_FOUND=maybe
20963    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20964$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20965  fi
20966
20967
20968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20970      # Do we have a bin/java?
20971      if test ! -x "$BOOT_JDK/bin/java"; then
20972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20974        BOOT_JDK_FOUND=no
20975      else
20976        # Do we have a bin/javac?
20977        if test ! -x "$BOOT_JDK/bin/javac"; then
20978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20982          BOOT_JDK_FOUND=no
20983        else
20984          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20985          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20986
20987          # Extra M4 quote needed to protect [] in grep expression.
20988          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20989          if test "x$FOUND_CORRECT_VERSION" = x; then
20990            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20992            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20993$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20994            BOOT_JDK_FOUND=no
20995          else
20996            # We're done! :-)
20997            BOOT_JDK_FOUND=yes
20998
20999  # Only process if variable expands to non-empty
21000
21001  if test "x$BOOT_JDK" != x; then
21002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21003
21004  # Input might be given as Windows format, start by converting to
21005  # unix format.
21006  path="$BOOT_JDK"
21007  new_path=`$CYGPATH -u "$path"`
21008
21009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21012  # "foo.exe" is OK but "foo" is an error.
21013  #
21014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21015  # It is also a way to make sure we got the proper file name for the real test later on.
21016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21017  if test "x$test_shortpath" = x; then
21018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21021  fi
21022
21023  # Call helper function which possibly converts this using DOS-style short mode.
21024  # If so, the updated path is stored in $new_path.
21025
21026  input_path="$new_path"
21027  # Check if we need to convert this using DOS-style short mode. If the path
21028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21029  # take no chances and rewrite it.
21030  # Note: m4 eats our [], so we need to use [ and ] instead.
21031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21032  if test "x$has_forbidden_chars" != x; then
21033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21037      # Going to short mode and back again did indeed matter. Since short mode is
21038      # case insensitive, let's make it lowercase to improve readability.
21039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21040      # Now convert it back to Unix-style (cygpath)
21041      input_path=`$CYGPATH -u "$shortmode_path"`
21042      new_path="$input_path"
21043    fi
21044  fi
21045
21046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21047  if test "x$test_cygdrive_prefix" = x; then
21048    # As a simple fix, exclude /usr/bin since it's not a real path.
21049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21051      # a path prefixed by /cygdrive for fixpath to work.
21052      new_path="$CYGWIN_ROOT_PATH$input_path"
21053    fi
21054  fi
21055
21056
21057  if test "x$path" != "x$new_path"; then
21058    BOOT_JDK="$new_path"
21059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21061  fi
21062
21063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21064
21065  path="$BOOT_JDK"
21066  has_colon=`$ECHO $path | $GREP ^.:`
21067  new_path="$path"
21068  if test "x$has_colon" = x; then
21069    # Not in mixed or Windows style, start by that.
21070    new_path=`cmd //c echo $path`
21071  fi
21072
21073
21074  input_path="$new_path"
21075  # Check if we need to convert this using DOS-style short mode. If the path
21076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21077  # take no chances and rewrite it.
21078  # Note: m4 eats our [], so we need to use [ and ] instead.
21079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21080  if test "x$has_forbidden_chars" != x; then
21081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21083  fi
21084
21085
21086  windows_path="$new_path"
21087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21088    unix_path=`$CYGPATH -u "$windows_path"`
21089    new_path="$unix_path"
21090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21092    new_path="$unix_path"
21093  fi
21094
21095  if test "x$path" != "x$new_path"; then
21096    BOOT_JDK="$new_path"
21097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21099  fi
21100
21101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21103
21104    else
21105      # We're on a unix platform. Hooray! :)
21106      path="$BOOT_JDK"
21107      has_space=`$ECHO "$path" | $GREP " "`
21108      if test "x$has_space" != x; then
21109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21112      fi
21113
21114      # Use eval to expand a potential ~
21115      eval path="$path"
21116      if test ! -f "$path" && test ! -d "$path"; then
21117        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21118      fi
21119
21120      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21121    fi
21122  fi
21123
21124            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21125$as_echo_n "checking for Boot JDK... " >&6; }
21126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21127$as_echo "$BOOT_JDK" >&6; }
21128            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21129$as_echo_n "checking Boot JDK version... " >&6; }
21130            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21132$as_echo "$BOOT_JDK_VERSION" >&6; }
21133          fi # end check jdk version
21134        fi # end check javac
21135      fi # end check java
21136    fi # end check boot jdk found
21137  fi
21138
21139
21140  if test "x$BOOT_JDK_FOUND" = xno; then
21141    # Now execute the test
21142
21143  if test -x /usr/libexec/java_home; then
21144    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21145    BOOT_JDK_FOUND=maybe
21146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21147$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21148  fi
21149
21150
21151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21153      # Do we have a bin/java?
21154      if test ! -x "$BOOT_JDK/bin/java"; then
21155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21157        BOOT_JDK_FOUND=no
21158      else
21159        # Do we have a bin/javac?
21160        if test ! -x "$BOOT_JDK/bin/javac"; then
21161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21165          BOOT_JDK_FOUND=no
21166        else
21167          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21168          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21169
21170          # Extra M4 quote needed to protect [] in grep expression.
21171          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21172          if test "x$FOUND_CORRECT_VERSION" = x; then
21173            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21175            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21176$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21177            BOOT_JDK_FOUND=no
21178          else
21179            # We're done! :-)
21180            BOOT_JDK_FOUND=yes
21181
21182  # Only process if variable expands to non-empty
21183
21184  if test "x$BOOT_JDK" != x; then
21185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21186
21187  # Input might be given as Windows format, start by converting to
21188  # unix format.
21189  path="$BOOT_JDK"
21190  new_path=`$CYGPATH -u "$path"`
21191
21192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21195  # "foo.exe" is OK but "foo" is an error.
21196  #
21197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21198  # It is also a way to make sure we got the proper file name for the real test later on.
21199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21200  if test "x$test_shortpath" = x; then
21201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21204  fi
21205
21206  # Call helper function which possibly converts this using DOS-style short mode.
21207  # If so, the updated path is stored in $new_path.
21208
21209  input_path="$new_path"
21210  # Check if we need to convert this using DOS-style short mode. If the path
21211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21212  # take no chances and rewrite it.
21213  # Note: m4 eats our [], so we need to use [ and ] instead.
21214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21215  if test "x$has_forbidden_chars" != x; then
21216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21220      # Going to short mode and back again did indeed matter. Since short mode is
21221      # case insensitive, let's make it lowercase to improve readability.
21222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21223      # Now convert it back to Unix-style (cygpath)
21224      input_path=`$CYGPATH -u "$shortmode_path"`
21225      new_path="$input_path"
21226    fi
21227  fi
21228
21229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21230  if test "x$test_cygdrive_prefix" = x; then
21231    # As a simple fix, exclude /usr/bin since it's not a real path.
21232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21234      # a path prefixed by /cygdrive for fixpath to work.
21235      new_path="$CYGWIN_ROOT_PATH$input_path"
21236    fi
21237  fi
21238
21239
21240  if test "x$path" != "x$new_path"; then
21241    BOOT_JDK="$new_path"
21242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21244  fi
21245
21246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21247
21248  path="$BOOT_JDK"
21249  has_colon=`$ECHO $path | $GREP ^.:`
21250  new_path="$path"
21251  if test "x$has_colon" = x; then
21252    # Not in mixed or Windows style, start by that.
21253    new_path=`cmd //c echo $path`
21254  fi
21255
21256
21257  input_path="$new_path"
21258  # Check if we need to convert this using DOS-style short mode. If the path
21259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21260  # take no chances and rewrite it.
21261  # Note: m4 eats our [], so we need to use [ and ] instead.
21262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21263  if test "x$has_forbidden_chars" != x; then
21264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21266  fi
21267
21268
21269  windows_path="$new_path"
21270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271    unix_path=`$CYGPATH -u "$windows_path"`
21272    new_path="$unix_path"
21273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21275    new_path="$unix_path"
21276  fi
21277
21278  if test "x$path" != "x$new_path"; then
21279    BOOT_JDK="$new_path"
21280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21282  fi
21283
21284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21286
21287    else
21288      # We're on a unix platform. Hooray! :)
21289      path="$BOOT_JDK"
21290      has_space=`$ECHO "$path" | $GREP " "`
21291      if test "x$has_space" != x; then
21292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21295      fi
21296
21297      # Use eval to expand a potential ~
21298      eval path="$path"
21299      if test ! -f "$path" && test ! -d "$path"; then
21300        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21301      fi
21302
21303      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21304    fi
21305  fi
21306
21307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21308$as_echo_n "checking for Boot JDK... " >&6; }
21309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21310$as_echo "$BOOT_JDK" >&6; }
21311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21312$as_echo_n "checking Boot JDK version... " >&6; }
21313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21315$as_echo "$BOOT_JDK_VERSION" >&6; }
21316          fi # end check jdk version
21317        fi # end check javac
21318      fi # end check java
21319    fi # end check boot jdk found
21320  fi
21321
21322
21323  if test "x$BOOT_JDK_FOUND" = xno; then
21324    # Now execute the test
21325
21326  if test -x /usr/libexec/java_home; then
21327    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21328    BOOT_JDK_FOUND=maybe
21329    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21330$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21331  fi
21332
21333
21334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21336      # Do we have a bin/java?
21337      if test ! -x "$BOOT_JDK/bin/java"; then
21338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21340        BOOT_JDK_FOUND=no
21341      else
21342        # Do we have a bin/javac?
21343        if test ! -x "$BOOT_JDK/bin/javac"; then
21344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21348          BOOT_JDK_FOUND=no
21349        else
21350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21352
21353          # Extra M4 quote needed to protect [] in grep expression.
21354          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21355          if test "x$FOUND_CORRECT_VERSION" = x; then
21356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21360            BOOT_JDK_FOUND=no
21361          else
21362            # We're done! :-)
21363            BOOT_JDK_FOUND=yes
21364
21365  # Only process if variable expands to non-empty
21366
21367  if test "x$BOOT_JDK" != x; then
21368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21369
21370  # Input might be given as Windows format, start by converting to
21371  # unix format.
21372  path="$BOOT_JDK"
21373  new_path=`$CYGPATH -u "$path"`
21374
21375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21378  # "foo.exe" is OK but "foo" is an error.
21379  #
21380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21381  # It is also a way to make sure we got the proper file name for the real test later on.
21382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21383  if test "x$test_shortpath" = x; then
21384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21387  fi
21388
21389  # Call helper function which possibly converts this using DOS-style short mode.
21390  # If so, the updated path is stored in $new_path.
21391
21392  input_path="$new_path"
21393  # Check if we need to convert this using DOS-style short mode. If the path
21394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21395  # take no chances and rewrite it.
21396  # Note: m4 eats our [], so we need to use [ and ] instead.
21397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21398  if test "x$has_forbidden_chars" != x; then
21399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21403      # Going to short mode and back again did indeed matter. Since short mode is
21404      # case insensitive, let's make it lowercase to improve readability.
21405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21406      # Now convert it back to Unix-style (cygpath)
21407      input_path=`$CYGPATH -u "$shortmode_path"`
21408      new_path="$input_path"
21409    fi
21410  fi
21411
21412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21413  if test "x$test_cygdrive_prefix" = x; then
21414    # As a simple fix, exclude /usr/bin since it's not a real path.
21415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21417      # a path prefixed by /cygdrive for fixpath to work.
21418      new_path="$CYGWIN_ROOT_PATH$input_path"
21419    fi
21420  fi
21421
21422
21423  if test "x$path" != "x$new_path"; then
21424    BOOT_JDK="$new_path"
21425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21427  fi
21428
21429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21430
21431  path="$BOOT_JDK"
21432  has_colon=`$ECHO $path | $GREP ^.:`
21433  new_path="$path"
21434  if test "x$has_colon" = x; then
21435    # Not in mixed or Windows style, start by that.
21436    new_path=`cmd //c echo $path`
21437  fi
21438
21439
21440  input_path="$new_path"
21441  # Check if we need to convert this using DOS-style short mode. If the path
21442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21443  # take no chances and rewrite it.
21444  # Note: m4 eats our [], so we need to use [ and ] instead.
21445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21446  if test "x$has_forbidden_chars" != x; then
21447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21449  fi
21450
21451
21452  windows_path="$new_path"
21453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21454    unix_path=`$CYGPATH -u "$windows_path"`
21455    new_path="$unix_path"
21456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21458    new_path="$unix_path"
21459  fi
21460
21461  if test "x$path" != "x$new_path"; then
21462    BOOT_JDK="$new_path"
21463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21465  fi
21466
21467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21469
21470    else
21471      # We're on a unix platform. Hooray! :)
21472      path="$BOOT_JDK"
21473      has_space=`$ECHO "$path" | $GREP " "`
21474      if test "x$has_space" != x; then
21475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21478      fi
21479
21480      # Use eval to expand a potential ~
21481      eval path="$path"
21482      if test ! -f "$path" && test ! -d "$path"; then
21483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21484      fi
21485
21486      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21487    fi
21488  fi
21489
21490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21491$as_echo_n "checking for Boot JDK... " >&6; }
21492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21493$as_echo "$BOOT_JDK" >&6; }
21494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21495$as_echo_n "checking Boot JDK version... " >&6; }
21496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21498$as_echo "$BOOT_JDK_VERSION" >&6; }
21499          fi # end check jdk version
21500        fi # end check javac
21501      fi # end check java
21502    fi # end check boot jdk found
21503  fi
21504
21505  fi
21506
21507
21508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21510      # Do we have a bin/java?
21511      if test ! -x "$BOOT_JDK/bin/java"; then
21512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21514        BOOT_JDK_FOUND=no
21515      else
21516        # Do we have a bin/javac?
21517        if test ! -x "$BOOT_JDK/bin/javac"; then
21518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21522          BOOT_JDK_FOUND=no
21523        else
21524          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21525          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21526
21527          # Extra M4 quote needed to protect [] in grep expression.
21528          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21529          if test "x$FOUND_CORRECT_VERSION" = x; then
21530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21532            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21533$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21534            BOOT_JDK_FOUND=no
21535          else
21536            # We're done! :-)
21537            BOOT_JDK_FOUND=yes
21538
21539  # Only process if variable expands to non-empty
21540
21541  if test "x$BOOT_JDK" != x; then
21542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543
21544  # Input might be given as Windows format, start by converting to
21545  # unix format.
21546  path="$BOOT_JDK"
21547  new_path=`$CYGPATH -u "$path"`
21548
21549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21552  # "foo.exe" is OK but "foo" is an error.
21553  #
21554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21555  # It is also a way to make sure we got the proper file name for the real test later on.
21556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21557  if test "x$test_shortpath" = x; then
21558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21561  fi
21562
21563  # Call helper function which possibly converts this using DOS-style short mode.
21564  # If so, the updated path is stored in $new_path.
21565
21566  input_path="$new_path"
21567  # Check if we need to convert this using DOS-style short mode. If the path
21568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21569  # take no chances and rewrite it.
21570  # Note: m4 eats our [], so we need to use [ and ] instead.
21571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21572  if test "x$has_forbidden_chars" != x; then
21573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21577      # Going to short mode and back again did indeed matter. Since short mode is
21578      # case insensitive, let's make it lowercase to improve readability.
21579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21580      # Now convert it back to Unix-style (cygpath)
21581      input_path=`$CYGPATH -u "$shortmode_path"`
21582      new_path="$input_path"
21583    fi
21584  fi
21585
21586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21587  if test "x$test_cygdrive_prefix" = x; then
21588    # As a simple fix, exclude /usr/bin since it's not a real path.
21589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21591      # a path prefixed by /cygdrive for fixpath to work.
21592      new_path="$CYGWIN_ROOT_PATH$input_path"
21593    fi
21594  fi
21595
21596
21597  if test "x$path" != "x$new_path"; then
21598    BOOT_JDK="$new_path"
21599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21601  fi
21602
21603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21604
21605  path="$BOOT_JDK"
21606  has_colon=`$ECHO $path | $GREP ^.:`
21607  new_path="$path"
21608  if test "x$has_colon" = x; then
21609    # Not in mixed or Windows style, start by that.
21610    new_path=`cmd //c echo $path`
21611  fi
21612
21613
21614  input_path="$new_path"
21615  # Check if we need to convert this using DOS-style short mode. If the path
21616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21617  # take no chances and rewrite it.
21618  # Note: m4 eats our [], so we need to use [ and ] instead.
21619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21620  if test "x$has_forbidden_chars" != x; then
21621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21623  fi
21624
21625
21626  windows_path="$new_path"
21627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21628    unix_path=`$CYGPATH -u "$windows_path"`
21629    new_path="$unix_path"
21630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21632    new_path="$unix_path"
21633  fi
21634
21635  if test "x$path" != "x$new_path"; then
21636    BOOT_JDK="$new_path"
21637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21639  fi
21640
21641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21643
21644    else
21645      # We're on a unix platform. Hooray! :)
21646      path="$BOOT_JDK"
21647      has_space=`$ECHO "$path" | $GREP " "`
21648      if test "x$has_space" != x; then
21649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21652      fi
21653
21654      # Use eval to expand a potential ~
21655      eval path="$path"
21656      if test ! -f "$path" && test ! -d "$path"; then
21657        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21658      fi
21659
21660      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21661    fi
21662  fi
21663
21664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21665$as_echo_n "checking for Boot JDK... " >&6; }
21666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21667$as_echo "$BOOT_JDK" >&6; }
21668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21669$as_echo_n "checking Boot JDK version... " >&6; }
21670            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21672$as_echo "$BOOT_JDK_VERSION" >&6; }
21673          fi # end check jdk version
21674        fi # end check javac
21675      fi # end check java
21676    fi # end check boot jdk found
21677  fi
21678
21679
21680  # Test: Is $JAVA_HOME set?
21681
21682  if test "x$BOOT_JDK_FOUND" = xno; then
21683    # Now execute the test
21684
21685  if test "x$JAVA_HOME" != x; then
21686    JAVA_HOME_PROCESSED="$JAVA_HOME"
21687
21688  # Only process if variable expands to non-empty
21689
21690  if test "x$JAVA_HOME_PROCESSED" != x; then
21691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21692
21693  # Input might be given as Windows format, start by converting to
21694  # unix format.
21695  path="$JAVA_HOME_PROCESSED"
21696  new_path=`$CYGPATH -u "$path"`
21697
21698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21701  # "foo.exe" is OK but "foo" is an error.
21702  #
21703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21704  # It is also a way to make sure we got the proper file name for the real test later on.
21705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21706  if test "x$test_shortpath" = x; then
21707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21708$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21709    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21710  fi
21711
21712  # Call helper function which possibly converts this using DOS-style short mode.
21713  # If so, the updated path is stored in $new_path.
21714
21715  input_path="$new_path"
21716  # Check if we need to convert this using DOS-style short mode. If the path
21717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21718  # take no chances and rewrite it.
21719  # Note: m4 eats our [], so we need to use [ and ] instead.
21720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21721  if test "x$has_forbidden_chars" != x; then
21722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21726      # Going to short mode and back again did indeed matter. Since short mode is
21727      # case insensitive, let's make it lowercase to improve readability.
21728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21729      # Now convert it back to Unix-style (cygpath)
21730      input_path=`$CYGPATH -u "$shortmode_path"`
21731      new_path="$input_path"
21732    fi
21733  fi
21734
21735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21736  if test "x$test_cygdrive_prefix" = x; then
21737    # As a simple fix, exclude /usr/bin since it's not a real path.
21738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21740      # a path prefixed by /cygdrive for fixpath to work.
21741      new_path="$CYGWIN_ROOT_PATH$input_path"
21742    fi
21743  fi
21744
21745
21746  if test "x$path" != "x$new_path"; then
21747    JAVA_HOME_PROCESSED="$new_path"
21748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21749$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21750  fi
21751
21752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21753
21754  path="$JAVA_HOME_PROCESSED"
21755  has_colon=`$ECHO $path | $GREP ^.:`
21756  new_path="$path"
21757  if test "x$has_colon" = x; then
21758    # Not in mixed or Windows style, start by that.
21759    new_path=`cmd //c echo $path`
21760  fi
21761
21762
21763  input_path="$new_path"
21764  # Check if we need to convert this using DOS-style short mode. If the path
21765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21766  # take no chances and rewrite it.
21767  # Note: m4 eats our [], so we need to use [ and ] instead.
21768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21769  if test "x$has_forbidden_chars" != x; then
21770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21772  fi
21773
21774
21775  windows_path="$new_path"
21776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21777    unix_path=`$CYGPATH -u "$windows_path"`
21778    new_path="$unix_path"
21779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21781    new_path="$unix_path"
21782  fi
21783
21784  if test "x$path" != "x$new_path"; then
21785    JAVA_HOME_PROCESSED="$new_path"
21786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21787$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21788  fi
21789
21790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21792
21793    else
21794      # We're on a unix platform. Hooray! :)
21795      path="$JAVA_HOME_PROCESSED"
21796      has_space=`$ECHO "$path" | $GREP " "`
21797      if test "x$has_space" != x; then
21798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21799$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21801      fi
21802
21803      # Use eval to expand a potential ~
21804      eval path="$path"
21805      if test ! -f "$path" && test ! -d "$path"; then
21806        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21807      fi
21808
21809      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21810    fi
21811  fi
21812
21813    if test ! -d "$JAVA_HOME_PROCESSED"; then
21814      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21815$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21816    else
21817      # Aha, the user has set a JAVA_HOME
21818      # let us use that as the Boot JDK.
21819      BOOT_JDK="$JAVA_HOME_PROCESSED"
21820      BOOT_JDK_FOUND=maybe
21821      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21822$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21823    fi
21824  fi
21825
21826
21827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21829      # Do we have a bin/java?
21830      if test ! -x "$BOOT_JDK/bin/java"; then
21831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21833        BOOT_JDK_FOUND=no
21834      else
21835        # Do we have a bin/javac?
21836        if test ! -x "$BOOT_JDK/bin/javac"; then
21837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21841          BOOT_JDK_FOUND=no
21842        else
21843          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21844          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21845
21846          # Extra M4 quote needed to protect [] in grep expression.
21847          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21848          if test "x$FOUND_CORRECT_VERSION" = x; then
21849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21851            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21852$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21853            BOOT_JDK_FOUND=no
21854          else
21855            # We're done! :-)
21856            BOOT_JDK_FOUND=yes
21857
21858  # Only process if variable expands to non-empty
21859
21860  if test "x$BOOT_JDK" != x; then
21861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21862
21863  # Input might be given as Windows format, start by converting to
21864  # unix format.
21865  path="$BOOT_JDK"
21866  new_path=`$CYGPATH -u "$path"`
21867
21868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21871  # "foo.exe" is OK but "foo" is an error.
21872  #
21873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21874  # It is also a way to make sure we got the proper file name for the real test later on.
21875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21876  if test "x$test_shortpath" = x; then
21877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21879    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21880  fi
21881
21882  # Call helper function which possibly converts this using DOS-style short mode.
21883  # If so, the updated path is stored in $new_path.
21884
21885  input_path="$new_path"
21886  # Check if we need to convert this using DOS-style short mode. If the path
21887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21888  # take no chances and rewrite it.
21889  # Note: m4 eats our [], so we need to use [ and ] instead.
21890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21891  if test "x$has_forbidden_chars" != x; then
21892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21896      # Going to short mode and back again did indeed matter. Since short mode is
21897      # case insensitive, let's make it lowercase to improve readability.
21898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21899      # Now convert it back to Unix-style (cygpath)
21900      input_path=`$CYGPATH -u "$shortmode_path"`
21901      new_path="$input_path"
21902    fi
21903  fi
21904
21905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21906  if test "x$test_cygdrive_prefix" = x; then
21907    # As a simple fix, exclude /usr/bin since it's not a real path.
21908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21910      # a path prefixed by /cygdrive for fixpath to work.
21911      new_path="$CYGWIN_ROOT_PATH$input_path"
21912    fi
21913  fi
21914
21915
21916  if test "x$path" != "x$new_path"; then
21917    BOOT_JDK="$new_path"
21918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21920  fi
21921
21922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21923
21924  path="$BOOT_JDK"
21925  has_colon=`$ECHO $path | $GREP ^.:`
21926  new_path="$path"
21927  if test "x$has_colon" = x; then
21928    # Not in mixed or Windows style, start by that.
21929    new_path=`cmd //c echo $path`
21930  fi
21931
21932
21933  input_path="$new_path"
21934  # Check if we need to convert this using DOS-style short mode. If the path
21935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21936  # take no chances and rewrite it.
21937  # Note: m4 eats our [], so we need to use [ and ] instead.
21938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21939  if test "x$has_forbidden_chars" != x; then
21940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21942  fi
21943
21944
21945  windows_path="$new_path"
21946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21947    unix_path=`$CYGPATH -u "$windows_path"`
21948    new_path="$unix_path"
21949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21951    new_path="$unix_path"
21952  fi
21953
21954  if test "x$path" != "x$new_path"; then
21955    BOOT_JDK="$new_path"
21956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21958  fi
21959
21960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21962
21963    else
21964      # We're on a unix platform. Hooray! :)
21965      path="$BOOT_JDK"
21966      has_space=`$ECHO "$path" | $GREP " "`
21967      if test "x$has_space" != x; then
21968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21971      fi
21972
21973      # Use eval to expand a potential ~
21974      eval path="$path"
21975      if test ! -f "$path" && test ! -d "$path"; then
21976        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21977      fi
21978
21979      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21980    fi
21981  fi
21982
21983            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21984$as_echo_n "checking for Boot JDK... " >&6; }
21985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21986$as_echo "$BOOT_JDK" >&6; }
21987            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21988$as_echo_n "checking Boot JDK version... " >&6; }
21989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21991$as_echo "$BOOT_JDK_VERSION" >&6; }
21992          fi # end check jdk version
21993        fi # end check javac
21994      fi # end check java
21995    fi # end check boot jdk found
21996  fi
21997
21998
21999  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22000
22001  if test "x$BOOT_JDK_FOUND" = xno; then
22002    # Now execute the test
22003
22004  # Extract the first word of "javac", so it can be a program name with args.
22005set dummy javac; ac_word=$2
22006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22007$as_echo_n "checking for $ac_word... " >&6; }
22008if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22009  $as_echo_n "(cached) " >&6
22010else
22011  case $JAVAC_CHECK in
22012  [\\/]* | ?:[\\/]*)
22013  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22014  ;;
22015  *)
22016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22017for as_dir in $PATH
22018do
22019  IFS=$as_save_IFS
22020  test -z "$as_dir" && as_dir=.
22021    for ac_exec_ext in '' $ac_executable_extensions; do
22022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22023    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22025    break 2
22026  fi
22027done
22028  done
22029IFS=$as_save_IFS
22030
22031  ;;
22032esac
22033fi
22034JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22035if test -n "$JAVAC_CHECK"; then
22036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22037$as_echo "$JAVAC_CHECK" >&6; }
22038else
22039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22040$as_echo "no" >&6; }
22041fi
22042
22043
22044  # Extract the first word of "java", so it can be a program name with args.
22045set dummy java; ac_word=$2
22046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22047$as_echo_n "checking for $ac_word... " >&6; }
22048if ${ac_cv_path_JAVA_CHECK+:} false; then :
22049  $as_echo_n "(cached) " >&6
22050else
22051  case $JAVA_CHECK in
22052  [\\/]* | ?:[\\/]*)
22053  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22054  ;;
22055  *)
22056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22057for as_dir in $PATH
22058do
22059  IFS=$as_save_IFS
22060  test -z "$as_dir" && as_dir=.
22061    for ac_exec_ext in '' $ac_executable_extensions; do
22062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22063    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22065    break 2
22066  fi
22067done
22068  done
22069IFS=$as_save_IFS
22070
22071  ;;
22072esac
22073fi
22074JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22075if test -n "$JAVA_CHECK"; then
22076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22077$as_echo "$JAVA_CHECK" >&6; }
22078else
22079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22080$as_echo "no" >&6; }
22081fi
22082
22083
22084  BINARY="$JAVAC_CHECK"
22085  if test "x$JAVAC_CHECK" = x; then
22086    BINARY="$JAVA_CHECK"
22087  fi
22088  if test "x$BINARY" != x; then
22089    # So there is a java(c) binary, it might be part of a JDK.
22090    # Lets find the JDK/JRE directory by following symbolic links.
22091    # Linux/GNU systems often have links from /usr/bin/java to
22092    # /etc/alternatives/java to the real JDK binary.
22093
22094  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22095    # Follow a chain of symbolic links. Use readlink
22096    # where it exists, else fall back to horribly
22097    # complicated shell code.
22098    if test "x$READLINK_TESTED" != yes; then
22099      # On MacOSX there is a readlink tool with a different
22100      # purpose than the GNU readlink tool. Check the found readlink.
22101      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22102      if test "x$ISGNU" = x; then
22103        # A readlink that we do not know how to use.
22104        # Are there other non-GNU readlinks out there?
22105        READLINK_TESTED=yes
22106        READLINK=
22107      fi
22108    fi
22109
22110    if test "x$READLINK" != x; then
22111      BINARY=`$READLINK -f $BINARY`
22112    else
22113      # Save the current directory for restoring afterwards
22114      STARTDIR=$PWD
22115      COUNTER=0
22116      sym_link_dir=`$DIRNAME $BINARY`
22117      sym_link_file=`$BASENAME $BINARY`
22118      cd $sym_link_dir
22119      # Use -P flag to resolve symlinks in directories.
22120      cd `$THEPWDCMD -P`
22121      sym_link_dir=`$THEPWDCMD -P`
22122      # Resolve file symlinks
22123      while test $COUNTER -lt 20; do
22124        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22125        if test "x$ISLINK" == x; then
22126          # This is not a symbolic link! We are done!
22127          break
22128        fi
22129        # Again resolve directory symlinks since the target of the just found
22130        # link could be in a different directory
22131        cd `$DIRNAME $ISLINK`
22132        sym_link_dir=`$THEPWDCMD -P`
22133        sym_link_file=`$BASENAME $ISLINK`
22134        let COUNTER=COUNTER+1
22135      done
22136      cd $STARTDIR
22137      BINARY=$sym_link_dir/$sym_link_file
22138    fi
22139  fi
22140
22141    BOOT_JDK=`dirname "$BINARY"`
22142    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22143    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22144      # Looks like we found ourselves an JDK
22145      BOOT_JDK_FOUND=maybe
22146      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22147$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22148    fi
22149  fi
22150
22151
22152    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22153    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22154      # Do we have a bin/java?
22155      if test ! -x "$BOOT_JDK/bin/java"; then
22156        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22158        BOOT_JDK_FOUND=no
22159      else
22160        # Do we have a bin/javac?
22161        if test ! -x "$BOOT_JDK/bin/javac"; then
22162          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22164          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22165$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22166          BOOT_JDK_FOUND=no
22167        else
22168          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22169          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22170
22171          # Extra M4 quote needed to protect [] in grep expression.
22172          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22173          if test "x$FOUND_CORRECT_VERSION" = x; then
22174            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22176            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22177$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22178            BOOT_JDK_FOUND=no
22179          else
22180            # We're done! :-)
22181            BOOT_JDK_FOUND=yes
22182
22183  # Only process if variable expands to non-empty
22184
22185  if test "x$BOOT_JDK" != x; then
22186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22187
22188  # Input might be given as Windows format, start by converting to
22189  # unix format.
22190  path="$BOOT_JDK"
22191  new_path=`$CYGPATH -u "$path"`
22192
22193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22196  # "foo.exe" is OK but "foo" is an error.
22197  #
22198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22199  # It is also a way to make sure we got the proper file name for the real test later on.
22200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22201  if test "x$test_shortpath" = x; then
22202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22204    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22205  fi
22206
22207  # Call helper function which possibly converts this using DOS-style short mode.
22208  # If so, the updated path is stored in $new_path.
22209
22210  input_path="$new_path"
22211  # Check if we need to convert this using DOS-style short mode. If the path
22212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22213  # take no chances and rewrite it.
22214  # Note: m4 eats our [], so we need to use [ and ] instead.
22215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22216  if test "x$has_forbidden_chars" != x; then
22217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22221      # Going to short mode and back again did indeed matter. Since short mode is
22222      # case insensitive, let's make it lowercase to improve readability.
22223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22224      # Now convert it back to Unix-style (cygpath)
22225      input_path=`$CYGPATH -u "$shortmode_path"`
22226      new_path="$input_path"
22227    fi
22228  fi
22229
22230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22231  if test "x$test_cygdrive_prefix" = x; then
22232    # As a simple fix, exclude /usr/bin since it's not a real path.
22233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22235      # a path prefixed by /cygdrive for fixpath to work.
22236      new_path="$CYGWIN_ROOT_PATH$input_path"
22237    fi
22238  fi
22239
22240
22241  if test "x$path" != "x$new_path"; then
22242    BOOT_JDK="$new_path"
22243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22245  fi
22246
22247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22248
22249  path="$BOOT_JDK"
22250  has_colon=`$ECHO $path | $GREP ^.:`
22251  new_path="$path"
22252  if test "x$has_colon" = x; then
22253    # Not in mixed or Windows style, start by that.
22254    new_path=`cmd //c echo $path`
22255  fi
22256
22257
22258  input_path="$new_path"
22259  # Check if we need to convert this using DOS-style short mode. If the path
22260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22261  # take no chances and rewrite it.
22262  # Note: m4 eats our [], so we need to use [ and ] instead.
22263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22264  if test "x$has_forbidden_chars" != x; then
22265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22267  fi
22268
22269
22270  windows_path="$new_path"
22271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22272    unix_path=`$CYGPATH -u "$windows_path"`
22273    new_path="$unix_path"
22274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22276    new_path="$unix_path"
22277  fi
22278
22279  if test "x$path" != "x$new_path"; then
22280    BOOT_JDK="$new_path"
22281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22283  fi
22284
22285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22287
22288    else
22289      # We're on a unix platform. Hooray! :)
22290      path="$BOOT_JDK"
22291      has_space=`$ECHO "$path" | $GREP " "`
22292      if test "x$has_space" != x; then
22293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22296      fi
22297
22298      # Use eval to expand a potential ~
22299      eval path="$path"
22300      if test ! -f "$path" && test ! -d "$path"; then
22301        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22302      fi
22303
22304      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22305    fi
22306  fi
22307
22308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22309$as_echo_n "checking for Boot JDK... " >&6; }
22310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22311$as_echo "$BOOT_JDK" >&6; }
22312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22313$as_echo_n "checking Boot JDK version... " >&6; }
22314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22316$as_echo "$BOOT_JDK_VERSION" >&6; }
22317          fi # end check jdk version
22318        fi # end check javac
22319      fi # end check java
22320    fi # end check boot jdk found
22321  fi
22322
22323
22324  # Test: Is there a JDK installed in default, well-known locations?
22325
22326  if test "x$BOOT_JDK_FOUND" = xno; then
22327    # Now execute the test
22328
22329  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22330
22331  if test "x$BOOT_JDK_FOUND" = xno; then
22332    # Now execute the test
22333
22334  if test "x$ProgramW6432" != x; then
22335    VIRTUAL_DIR="$ProgramW6432/Java"
22336
22337  windows_path="$VIRTUAL_DIR"
22338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22339    unix_path=`$CYGPATH -u "$windows_path"`
22340    VIRTUAL_DIR="$unix_path"
22341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22343    VIRTUAL_DIR="$unix_path"
22344  fi
22345
22346
22347  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22348  BOOT_JDK_SUFFIX=""
22349  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22350  if test "x$ALL_JDKS_FOUND" != x; then
22351    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22352
22353  if test "x$BOOT_JDK_FOUND" = xno; then
22354    # Now execute the test
22355
22356        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22357        if test -d "$BOOT_JDK"; then
22358          BOOT_JDK_FOUND=maybe
22359          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22360$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22361        fi
22362
22363
22364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22366      # Do we have a bin/java?
22367      if test ! -x "$BOOT_JDK/bin/java"; then
22368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22370        BOOT_JDK_FOUND=no
22371      else
22372        # Do we have a bin/javac?
22373        if test ! -x "$BOOT_JDK/bin/javac"; then
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22378          BOOT_JDK_FOUND=no
22379        else
22380          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22381          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22382
22383          # Extra M4 quote needed to protect [] in grep expression.
22384          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22385          if test "x$FOUND_CORRECT_VERSION" = x; then
22386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22388            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22390            BOOT_JDK_FOUND=no
22391          else
22392            # We're done! :-)
22393            BOOT_JDK_FOUND=yes
22394
22395  # Only process if variable expands to non-empty
22396
22397  if test "x$BOOT_JDK" != x; then
22398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22399
22400  # Input might be given as Windows format, start by converting to
22401  # unix format.
22402  path="$BOOT_JDK"
22403  new_path=`$CYGPATH -u "$path"`
22404
22405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22408  # "foo.exe" is OK but "foo" is an error.
22409  #
22410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22411  # It is also a way to make sure we got the proper file name for the real test later on.
22412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22413  if test "x$test_shortpath" = x; then
22414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22417  fi
22418
22419  # Call helper function which possibly converts this using DOS-style short mode.
22420  # If so, the updated path is stored in $new_path.
22421
22422  input_path="$new_path"
22423  # Check if we need to convert this using DOS-style short mode. If the path
22424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22425  # take no chances and rewrite it.
22426  # Note: m4 eats our [], so we need to use [ and ] instead.
22427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22428  if test "x$has_forbidden_chars" != x; then
22429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22433      # Going to short mode and back again did indeed matter. Since short mode is
22434      # case insensitive, let's make it lowercase to improve readability.
22435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22436      # Now convert it back to Unix-style (cygpath)
22437      input_path=`$CYGPATH -u "$shortmode_path"`
22438      new_path="$input_path"
22439    fi
22440  fi
22441
22442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22443  if test "x$test_cygdrive_prefix" = x; then
22444    # As a simple fix, exclude /usr/bin since it's not a real path.
22445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22447      # a path prefixed by /cygdrive for fixpath to work.
22448      new_path="$CYGWIN_ROOT_PATH$input_path"
22449    fi
22450  fi
22451
22452
22453  if test "x$path" != "x$new_path"; then
22454    BOOT_JDK="$new_path"
22455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22457  fi
22458
22459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22460
22461  path="$BOOT_JDK"
22462  has_colon=`$ECHO $path | $GREP ^.:`
22463  new_path="$path"
22464  if test "x$has_colon" = x; then
22465    # Not in mixed or Windows style, start by that.
22466    new_path=`cmd //c echo $path`
22467  fi
22468
22469
22470  input_path="$new_path"
22471  # Check if we need to convert this using DOS-style short mode. If the path
22472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22473  # take no chances and rewrite it.
22474  # Note: m4 eats our [], so we need to use [ and ] instead.
22475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22476  if test "x$has_forbidden_chars" != x; then
22477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22479  fi
22480
22481
22482  windows_path="$new_path"
22483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22484    unix_path=`$CYGPATH -u "$windows_path"`
22485    new_path="$unix_path"
22486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22488    new_path="$unix_path"
22489  fi
22490
22491  if test "x$path" != "x$new_path"; then
22492    BOOT_JDK="$new_path"
22493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22495  fi
22496
22497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22499
22500    else
22501      # We're on a unix platform. Hooray! :)
22502      path="$BOOT_JDK"
22503      has_space=`$ECHO "$path" | $GREP " "`
22504      if test "x$has_space" != x; then
22505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22508      fi
22509
22510      # Use eval to expand a potential ~
22511      eval path="$path"
22512      if test ! -f "$path" && test ! -d "$path"; then
22513        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22514      fi
22515
22516      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22517    fi
22518  fi
22519
22520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22521$as_echo_n "checking for Boot JDK... " >&6; }
22522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22523$as_echo "$BOOT_JDK" >&6; }
22524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22525$as_echo_n "checking Boot JDK version... " >&6; }
22526            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22528$as_echo "$BOOT_JDK_VERSION" >&6; }
22529          fi # end check jdk version
22530        fi # end check javac
22531      fi # end check java
22532    fi # end check boot jdk found
22533  fi
22534
22535    done
22536  fi
22537
22538  fi
22539
22540
22541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22543      # Do we have a bin/java?
22544      if test ! -x "$BOOT_JDK/bin/java"; then
22545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22547        BOOT_JDK_FOUND=no
22548      else
22549        # Do we have a bin/javac?
22550        if test ! -x "$BOOT_JDK/bin/javac"; then
22551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22555          BOOT_JDK_FOUND=no
22556        else
22557          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22558          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22559
22560          # Extra M4 quote needed to protect [] in grep expression.
22561          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22562          if test "x$FOUND_CORRECT_VERSION" = x; then
22563            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22565            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22566$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22567            BOOT_JDK_FOUND=no
22568          else
22569            # We're done! :-)
22570            BOOT_JDK_FOUND=yes
22571
22572  # Only process if variable expands to non-empty
22573
22574  if test "x$BOOT_JDK" != x; then
22575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22576
22577  # Input might be given as Windows format, start by converting to
22578  # unix format.
22579  path="$BOOT_JDK"
22580  new_path=`$CYGPATH -u "$path"`
22581
22582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22585  # "foo.exe" is OK but "foo" is an error.
22586  #
22587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22588  # It is also a way to make sure we got the proper file name for the real test later on.
22589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22590  if test "x$test_shortpath" = x; then
22591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22593    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22594  fi
22595
22596  # Call helper function which possibly converts this using DOS-style short mode.
22597  # If so, the updated path is stored in $new_path.
22598
22599  input_path="$new_path"
22600  # Check if we need to convert this using DOS-style short mode. If the path
22601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22602  # take no chances and rewrite it.
22603  # Note: m4 eats our [], so we need to use [ and ] instead.
22604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22605  if test "x$has_forbidden_chars" != x; then
22606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22610      # Going to short mode and back again did indeed matter. Since short mode is
22611      # case insensitive, let's make it lowercase to improve readability.
22612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22613      # Now convert it back to Unix-style (cygpath)
22614      input_path=`$CYGPATH -u "$shortmode_path"`
22615      new_path="$input_path"
22616    fi
22617  fi
22618
22619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22620  if test "x$test_cygdrive_prefix" = x; then
22621    # As a simple fix, exclude /usr/bin since it's not a real path.
22622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22624      # a path prefixed by /cygdrive for fixpath to work.
22625      new_path="$CYGWIN_ROOT_PATH$input_path"
22626    fi
22627  fi
22628
22629
22630  if test "x$path" != "x$new_path"; then
22631    BOOT_JDK="$new_path"
22632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22634  fi
22635
22636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22637
22638  path="$BOOT_JDK"
22639  has_colon=`$ECHO $path | $GREP ^.:`
22640  new_path="$path"
22641  if test "x$has_colon" = x; then
22642    # Not in mixed or Windows style, start by that.
22643    new_path=`cmd //c echo $path`
22644  fi
22645
22646
22647  input_path="$new_path"
22648  # Check if we need to convert this using DOS-style short mode. If the path
22649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22650  # take no chances and rewrite it.
22651  # Note: m4 eats our [], so we need to use [ and ] instead.
22652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22653  if test "x$has_forbidden_chars" != x; then
22654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22656  fi
22657
22658
22659  windows_path="$new_path"
22660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22661    unix_path=`$CYGPATH -u "$windows_path"`
22662    new_path="$unix_path"
22663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22665    new_path="$unix_path"
22666  fi
22667
22668  if test "x$path" != "x$new_path"; then
22669    BOOT_JDK="$new_path"
22670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22672  fi
22673
22674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22676
22677    else
22678      # We're on a unix platform. Hooray! :)
22679      path="$BOOT_JDK"
22680      has_space=`$ECHO "$path" | $GREP " "`
22681      if test "x$has_space" != x; then
22682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22685      fi
22686
22687      # Use eval to expand a potential ~
22688      eval path="$path"
22689      if test ! -f "$path" && test ! -d "$path"; then
22690        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22691      fi
22692
22693      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22694    fi
22695  fi
22696
22697            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22698$as_echo_n "checking for Boot JDK... " >&6; }
22699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22700$as_echo "$BOOT_JDK" >&6; }
22701            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22702$as_echo_n "checking Boot JDK version... " >&6; }
22703            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22705$as_echo "$BOOT_JDK_VERSION" >&6; }
22706          fi # end check jdk version
22707        fi # end check javac
22708      fi # end check java
22709    fi # end check boot jdk found
22710  fi
22711
22712
22713  if test "x$BOOT_JDK_FOUND" = xno; then
22714    # Now execute the test
22715
22716  if test "x$PROGRAMW6432" != x; then
22717    VIRTUAL_DIR="$PROGRAMW6432/Java"
22718
22719  windows_path="$VIRTUAL_DIR"
22720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22721    unix_path=`$CYGPATH -u "$windows_path"`
22722    VIRTUAL_DIR="$unix_path"
22723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22725    VIRTUAL_DIR="$unix_path"
22726  fi
22727
22728
22729  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22730  BOOT_JDK_SUFFIX=""
22731  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22732  if test "x$ALL_JDKS_FOUND" != x; then
22733    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22734
22735  if test "x$BOOT_JDK_FOUND" = xno; then
22736    # Now execute the test
22737
22738        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22739        if test -d "$BOOT_JDK"; then
22740          BOOT_JDK_FOUND=maybe
22741          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22742$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22743        fi
22744
22745
22746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22748      # Do we have a bin/java?
22749      if test ! -x "$BOOT_JDK/bin/java"; then
22750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22752        BOOT_JDK_FOUND=no
22753      else
22754        # Do we have a bin/javac?
22755        if test ! -x "$BOOT_JDK/bin/javac"; then
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22760          BOOT_JDK_FOUND=no
22761        else
22762          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22763          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22764
22765          # Extra M4 quote needed to protect [] in grep expression.
22766          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22767          if test "x$FOUND_CORRECT_VERSION" = x; then
22768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22770            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22771$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22772            BOOT_JDK_FOUND=no
22773          else
22774            # We're done! :-)
22775            BOOT_JDK_FOUND=yes
22776
22777  # Only process if variable expands to non-empty
22778
22779  if test "x$BOOT_JDK" != x; then
22780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781
22782  # Input might be given as Windows format, start by converting to
22783  # unix format.
22784  path="$BOOT_JDK"
22785  new_path=`$CYGPATH -u "$path"`
22786
22787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22790  # "foo.exe" is OK but "foo" is an error.
22791  #
22792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22793  # It is also a way to make sure we got the proper file name for the real test later on.
22794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22795  if test "x$test_shortpath" = x; then
22796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22799  fi
22800
22801  # Call helper function which possibly converts this using DOS-style short mode.
22802  # If so, the updated path is stored in $new_path.
22803
22804  input_path="$new_path"
22805  # Check if we need to convert this using DOS-style short mode. If the path
22806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22807  # take no chances and rewrite it.
22808  # Note: m4 eats our [], so we need to use [ and ] instead.
22809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22810  if test "x$has_forbidden_chars" != x; then
22811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22815      # Going to short mode and back again did indeed matter. Since short mode is
22816      # case insensitive, let's make it lowercase to improve readability.
22817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22818      # Now convert it back to Unix-style (cygpath)
22819      input_path=`$CYGPATH -u "$shortmode_path"`
22820      new_path="$input_path"
22821    fi
22822  fi
22823
22824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22825  if test "x$test_cygdrive_prefix" = x; then
22826    # As a simple fix, exclude /usr/bin since it's not a real path.
22827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22829      # a path prefixed by /cygdrive for fixpath to work.
22830      new_path="$CYGWIN_ROOT_PATH$input_path"
22831    fi
22832  fi
22833
22834
22835  if test "x$path" != "x$new_path"; then
22836    BOOT_JDK="$new_path"
22837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22839  fi
22840
22841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22842
22843  path="$BOOT_JDK"
22844  has_colon=`$ECHO $path | $GREP ^.:`
22845  new_path="$path"
22846  if test "x$has_colon" = x; then
22847    # Not in mixed or Windows style, start by that.
22848    new_path=`cmd //c echo $path`
22849  fi
22850
22851
22852  input_path="$new_path"
22853  # Check if we need to convert this using DOS-style short mode. If the path
22854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22855  # take no chances and rewrite it.
22856  # Note: m4 eats our [], so we need to use [ and ] instead.
22857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22858  if test "x$has_forbidden_chars" != x; then
22859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22861  fi
22862
22863
22864  windows_path="$new_path"
22865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22866    unix_path=`$CYGPATH -u "$windows_path"`
22867    new_path="$unix_path"
22868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22870    new_path="$unix_path"
22871  fi
22872
22873  if test "x$path" != "x$new_path"; then
22874    BOOT_JDK="$new_path"
22875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22877  fi
22878
22879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22881
22882    else
22883      # We're on a unix platform. Hooray! :)
22884      path="$BOOT_JDK"
22885      has_space=`$ECHO "$path" | $GREP " "`
22886      if test "x$has_space" != x; then
22887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22890      fi
22891
22892      # Use eval to expand a potential ~
22893      eval path="$path"
22894      if test ! -f "$path" && test ! -d "$path"; then
22895        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22896      fi
22897
22898      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22899    fi
22900  fi
22901
22902            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22903$as_echo_n "checking for Boot JDK... " >&6; }
22904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22905$as_echo "$BOOT_JDK" >&6; }
22906            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22907$as_echo_n "checking Boot JDK version... " >&6; }
22908            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22910$as_echo "$BOOT_JDK_VERSION" >&6; }
22911          fi # end check jdk version
22912        fi # end check javac
22913      fi # end check java
22914    fi # end check boot jdk found
22915  fi
22916
22917    done
22918  fi
22919
22920  fi
22921
22922
22923    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22924    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22925      # Do we have a bin/java?
22926      if test ! -x "$BOOT_JDK/bin/java"; then
22927        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22929        BOOT_JDK_FOUND=no
22930      else
22931        # Do we have a bin/javac?
22932        if test ! -x "$BOOT_JDK/bin/javac"; then
22933          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22936$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22937          BOOT_JDK_FOUND=no
22938        else
22939          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22940          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22941
22942          # Extra M4 quote needed to protect [] in grep expression.
22943          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22944          if test "x$FOUND_CORRECT_VERSION" = x; then
22945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22947            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22948$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22949            BOOT_JDK_FOUND=no
22950          else
22951            # We're done! :-)
22952            BOOT_JDK_FOUND=yes
22953
22954  # Only process if variable expands to non-empty
22955
22956  if test "x$BOOT_JDK" != x; then
22957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22958
22959  # Input might be given as Windows format, start by converting to
22960  # unix format.
22961  path="$BOOT_JDK"
22962  new_path=`$CYGPATH -u "$path"`
22963
22964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22967  # "foo.exe" is OK but "foo" is an error.
22968  #
22969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22970  # It is also a way to make sure we got the proper file name for the real test later on.
22971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22972  if test "x$test_shortpath" = x; then
22973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22975    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22976  fi
22977
22978  # Call helper function which possibly converts this using DOS-style short mode.
22979  # If so, the updated path is stored in $new_path.
22980
22981  input_path="$new_path"
22982  # Check if we need to convert this using DOS-style short mode. If the path
22983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22984  # take no chances and rewrite it.
22985  # Note: m4 eats our [], so we need to use [ and ] instead.
22986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22987  if test "x$has_forbidden_chars" != x; then
22988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22992      # Going to short mode and back again did indeed matter. Since short mode is
22993      # case insensitive, let's make it lowercase to improve readability.
22994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22995      # Now convert it back to Unix-style (cygpath)
22996      input_path=`$CYGPATH -u "$shortmode_path"`
22997      new_path="$input_path"
22998    fi
22999  fi
23000
23001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23002  if test "x$test_cygdrive_prefix" = x; then
23003    # As a simple fix, exclude /usr/bin since it's not a real path.
23004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23006      # a path prefixed by /cygdrive for fixpath to work.
23007      new_path="$CYGWIN_ROOT_PATH$input_path"
23008    fi
23009  fi
23010
23011
23012  if test "x$path" != "x$new_path"; then
23013    BOOT_JDK="$new_path"
23014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23016  fi
23017
23018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23019
23020  path="$BOOT_JDK"
23021  has_colon=`$ECHO $path | $GREP ^.:`
23022  new_path="$path"
23023  if test "x$has_colon" = x; then
23024    # Not in mixed or Windows style, start by that.
23025    new_path=`cmd //c echo $path`
23026  fi
23027
23028
23029  input_path="$new_path"
23030  # Check if we need to convert this using DOS-style short mode. If the path
23031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23032  # take no chances and rewrite it.
23033  # Note: m4 eats our [], so we need to use [ and ] instead.
23034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23035  if test "x$has_forbidden_chars" != x; then
23036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23038  fi
23039
23040
23041  windows_path="$new_path"
23042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23043    unix_path=`$CYGPATH -u "$windows_path"`
23044    new_path="$unix_path"
23045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23047    new_path="$unix_path"
23048  fi
23049
23050  if test "x$path" != "x$new_path"; then
23051    BOOT_JDK="$new_path"
23052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23054  fi
23055
23056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23058
23059    else
23060      # We're on a unix platform. Hooray! :)
23061      path="$BOOT_JDK"
23062      has_space=`$ECHO "$path" | $GREP " "`
23063      if test "x$has_space" != x; then
23064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23067      fi
23068
23069      # Use eval to expand a potential ~
23070      eval path="$path"
23071      if test ! -f "$path" && test ! -d "$path"; then
23072        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23073      fi
23074
23075      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23076    fi
23077  fi
23078
23079            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23080$as_echo_n "checking for Boot JDK... " >&6; }
23081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23082$as_echo "$BOOT_JDK" >&6; }
23083            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23084$as_echo_n "checking Boot JDK version... " >&6; }
23085            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23087$as_echo "$BOOT_JDK_VERSION" >&6; }
23088          fi # end check jdk version
23089        fi # end check javac
23090      fi # end check java
23091    fi # end check boot jdk found
23092  fi
23093
23094
23095  if test "x$BOOT_JDK_FOUND" = xno; then
23096    # Now execute the test
23097
23098  if test "x$PROGRAMFILES" != x; then
23099    VIRTUAL_DIR="$PROGRAMFILES/Java"
23100
23101  windows_path="$VIRTUAL_DIR"
23102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23103    unix_path=`$CYGPATH -u "$windows_path"`
23104    VIRTUAL_DIR="$unix_path"
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23107    VIRTUAL_DIR="$unix_path"
23108  fi
23109
23110
23111  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23112  BOOT_JDK_SUFFIX=""
23113  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23114  if test "x$ALL_JDKS_FOUND" != x; then
23115    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23116
23117  if test "x$BOOT_JDK_FOUND" = xno; then
23118    # Now execute the test
23119
23120        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23121        if test -d "$BOOT_JDK"; then
23122          BOOT_JDK_FOUND=maybe
23123          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23124$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23125        fi
23126
23127
23128    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23129    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23130      # Do we have a bin/java?
23131      if test ! -x "$BOOT_JDK/bin/java"; then
23132        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23134        BOOT_JDK_FOUND=no
23135      else
23136        # Do we have a bin/javac?
23137        if test ! -x "$BOOT_JDK/bin/javac"; then
23138          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23140          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23141$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23142          BOOT_JDK_FOUND=no
23143        else
23144          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23145          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23146
23147          # Extra M4 quote needed to protect [] in grep expression.
23148          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23149          if test "x$FOUND_CORRECT_VERSION" = x; then
23150            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23152            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23153$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23154            BOOT_JDK_FOUND=no
23155          else
23156            # We're done! :-)
23157            BOOT_JDK_FOUND=yes
23158
23159  # Only process if variable expands to non-empty
23160
23161  if test "x$BOOT_JDK" != x; then
23162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23163
23164  # Input might be given as Windows format, start by converting to
23165  # unix format.
23166  path="$BOOT_JDK"
23167  new_path=`$CYGPATH -u "$path"`
23168
23169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23172  # "foo.exe" is OK but "foo" is an error.
23173  #
23174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23175  # It is also a way to make sure we got the proper file name for the real test later on.
23176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23177  if test "x$test_shortpath" = x; then
23178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23179$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23180    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23181  fi
23182
23183  # Call helper function which possibly converts this using DOS-style short mode.
23184  # If so, the updated path is stored in $new_path.
23185
23186  input_path="$new_path"
23187  # Check if we need to convert this using DOS-style short mode. If the path
23188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23189  # take no chances and rewrite it.
23190  # Note: m4 eats our [], so we need to use [ and ] instead.
23191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23192  if test "x$has_forbidden_chars" != x; then
23193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23197      # Going to short mode and back again did indeed matter. Since short mode is
23198      # case insensitive, let's make it lowercase to improve readability.
23199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23200      # Now convert it back to Unix-style (cygpath)
23201      input_path=`$CYGPATH -u "$shortmode_path"`
23202      new_path="$input_path"
23203    fi
23204  fi
23205
23206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23207  if test "x$test_cygdrive_prefix" = x; then
23208    # As a simple fix, exclude /usr/bin since it's not a real path.
23209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23211      # a path prefixed by /cygdrive for fixpath to work.
23212      new_path="$CYGWIN_ROOT_PATH$input_path"
23213    fi
23214  fi
23215
23216
23217  if test "x$path" != "x$new_path"; then
23218    BOOT_JDK="$new_path"
23219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23221  fi
23222
23223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23224
23225  path="$BOOT_JDK"
23226  has_colon=`$ECHO $path | $GREP ^.:`
23227  new_path="$path"
23228  if test "x$has_colon" = x; then
23229    # Not in mixed or Windows style, start by that.
23230    new_path=`cmd //c echo $path`
23231  fi
23232
23233
23234  input_path="$new_path"
23235  # Check if we need to convert this using DOS-style short mode. If the path
23236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23237  # take no chances and rewrite it.
23238  # Note: m4 eats our [], so we need to use [ and ] instead.
23239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23240  if test "x$has_forbidden_chars" != x; then
23241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23243  fi
23244
23245
23246  windows_path="$new_path"
23247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23248    unix_path=`$CYGPATH -u "$windows_path"`
23249    new_path="$unix_path"
23250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23252    new_path="$unix_path"
23253  fi
23254
23255  if test "x$path" != "x$new_path"; then
23256    BOOT_JDK="$new_path"
23257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23259  fi
23260
23261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23263
23264    else
23265      # We're on a unix platform. Hooray! :)
23266      path="$BOOT_JDK"
23267      has_space=`$ECHO "$path" | $GREP " "`
23268      if test "x$has_space" != x; then
23269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23272      fi
23273
23274      # Use eval to expand a potential ~
23275      eval path="$path"
23276      if test ! -f "$path" && test ! -d "$path"; then
23277        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23278      fi
23279
23280      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23281    fi
23282  fi
23283
23284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23285$as_echo_n "checking for Boot JDK... " >&6; }
23286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23287$as_echo "$BOOT_JDK" >&6; }
23288            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23289$as_echo_n "checking Boot JDK version... " >&6; }
23290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23292$as_echo "$BOOT_JDK_VERSION" >&6; }
23293          fi # end check jdk version
23294        fi # end check javac
23295      fi # end check java
23296    fi # end check boot jdk found
23297  fi
23298
23299    done
23300  fi
23301
23302  fi
23303
23304
23305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23307      # Do we have a bin/java?
23308      if test ! -x "$BOOT_JDK/bin/java"; then
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23311        BOOT_JDK_FOUND=no
23312      else
23313        # Do we have a bin/javac?
23314        if test ! -x "$BOOT_JDK/bin/javac"; then
23315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23319          BOOT_JDK_FOUND=no
23320        else
23321          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23322          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23323
23324          # Extra M4 quote needed to protect [] in grep expression.
23325          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23326          if test "x$FOUND_CORRECT_VERSION" = x; then
23327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23329            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23330$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23331            BOOT_JDK_FOUND=no
23332          else
23333            # We're done! :-)
23334            BOOT_JDK_FOUND=yes
23335
23336  # Only process if variable expands to non-empty
23337
23338  if test "x$BOOT_JDK" != x; then
23339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23340
23341  # Input might be given as Windows format, start by converting to
23342  # unix format.
23343  path="$BOOT_JDK"
23344  new_path=`$CYGPATH -u "$path"`
23345
23346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23349  # "foo.exe" is OK but "foo" is an error.
23350  #
23351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23352  # It is also a way to make sure we got the proper file name for the real test later on.
23353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23354  if test "x$test_shortpath" = x; then
23355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23358  fi
23359
23360  # Call helper function which possibly converts this using DOS-style short mode.
23361  # If so, the updated path is stored in $new_path.
23362
23363  input_path="$new_path"
23364  # Check if we need to convert this using DOS-style short mode. If the path
23365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23366  # take no chances and rewrite it.
23367  # Note: m4 eats our [], so we need to use [ and ] instead.
23368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23369  if test "x$has_forbidden_chars" != x; then
23370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23374      # Going to short mode and back again did indeed matter. Since short mode is
23375      # case insensitive, let's make it lowercase to improve readability.
23376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23377      # Now convert it back to Unix-style (cygpath)
23378      input_path=`$CYGPATH -u "$shortmode_path"`
23379      new_path="$input_path"
23380    fi
23381  fi
23382
23383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23384  if test "x$test_cygdrive_prefix" = x; then
23385    # As a simple fix, exclude /usr/bin since it's not a real path.
23386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23388      # a path prefixed by /cygdrive for fixpath to work.
23389      new_path="$CYGWIN_ROOT_PATH$input_path"
23390    fi
23391  fi
23392
23393
23394  if test "x$path" != "x$new_path"; then
23395    BOOT_JDK="$new_path"
23396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23398  fi
23399
23400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23401
23402  path="$BOOT_JDK"
23403  has_colon=`$ECHO $path | $GREP ^.:`
23404  new_path="$path"
23405  if test "x$has_colon" = x; then
23406    # Not in mixed or Windows style, start by that.
23407    new_path=`cmd //c echo $path`
23408  fi
23409
23410
23411  input_path="$new_path"
23412  # Check if we need to convert this using DOS-style short mode. If the path
23413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23414  # take no chances and rewrite it.
23415  # Note: m4 eats our [], so we need to use [ and ] instead.
23416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23417  if test "x$has_forbidden_chars" != x; then
23418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23420  fi
23421
23422
23423  windows_path="$new_path"
23424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23425    unix_path=`$CYGPATH -u "$windows_path"`
23426    new_path="$unix_path"
23427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23429    new_path="$unix_path"
23430  fi
23431
23432  if test "x$path" != "x$new_path"; then
23433    BOOT_JDK="$new_path"
23434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23436  fi
23437
23438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23440
23441    else
23442      # We're on a unix platform. Hooray! :)
23443      path="$BOOT_JDK"
23444      has_space=`$ECHO "$path" | $GREP " "`
23445      if test "x$has_space" != x; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23449      fi
23450
23451      # Use eval to expand a potential ~
23452      eval path="$path"
23453      if test ! -f "$path" && test ! -d "$path"; then
23454        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23455      fi
23456
23457      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23458    fi
23459  fi
23460
23461            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23462$as_echo_n "checking for Boot JDK... " >&6; }
23463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23464$as_echo "$BOOT_JDK" >&6; }
23465            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23466$as_echo_n "checking Boot JDK version... " >&6; }
23467            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23469$as_echo "$BOOT_JDK_VERSION" >&6; }
23470          fi # end check jdk version
23471        fi # end check javac
23472      fi # end check java
23473    fi # end check boot jdk found
23474  fi
23475
23476
23477  if test "x$BOOT_JDK_FOUND" = xno; then
23478    # Now execute the test
23479
23480  if test "x$ProgramFiles" != x; then
23481    VIRTUAL_DIR="$ProgramFiles/Java"
23482
23483  windows_path="$VIRTUAL_DIR"
23484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23485    unix_path=`$CYGPATH -u "$windows_path"`
23486    VIRTUAL_DIR="$unix_path"
23487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23489    VIRTUAL_DIR="$unix_path"
23490  fi
23491
23492
23493  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23494  BOOT_JDK_SUFFIX=""
23495  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23496  if test "x$ALL_JDKS_FOUND" != x; then
23497    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23498
23499  if test "x$BOOT_JDK_FOUND" = xno; then
23500    # Now execute the test
23501
23502        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23503        if test -d "$BOOT_JDK"; then
23504          BOOT_JDK_FOUND=maybe
23505          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23506$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23507        fi
23508
23509
23510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23512      # Do we have a bin/java?
23513      if test ! -x "$BOOT_JDK/bin/java"; then
23514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23516        BOOT_JDK_FOUND=no
23517      else
23518        # Do we have a bin/javac?
23519        if test ! -x "$BOOT_JDK/bin/javac"; then
23520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23524          BOOT_JDK_FOUND=no
23525        else
23526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23528
23529          # Extra M4 quote needed to protect [] in grep expression.
23530          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23531          if test "x$FOUND_CORRECT_VERSION" = x; then
23532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23536            BOOT_JDK_FOUND=no
23537          else
23538            # We're done! :-)
23539            BOOT_JDK_FOUND=yes
23540
23541  # Only process if variable expands to non-empty
23542
23543  if test "x$BOOT_JDK" != x; then
23544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23545
23546  # Input might be given as Windows format, start by converting to
23547  # unix format.
23548  path="$BOOT_JDK"
23549  new_path=`$CYGPATH -u "$path"`
23550
23551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23554  # "foo.exe" is OK but "foo" is an error.
23555  #
23556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23557  # It is also a way to make sure we got the proper file name for the real test later on.
23558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23559  if test "x$test_shortpath" = x; then
23560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23563  fi
23564
23565  # Call helper function which possibly converts this using DOS-style short mode.
23566  # If so, the updated path is stored in $new_path.
23567
23568  input_path="$new_path"
23569  # Check if we need to convert this using DOS-style short mode. If the path
23570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23571  # take no chances and rewrite it.
23572  # Note: m4 eats our [], so we need to use [ and ] instead.
23573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23574  if test "x$has_forbidden_chars" != x; then
23575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23579      # Going to short mode and back again did indeed matter. Since short mode is
23580      # case insensitive, let's make it lowercase to improve readability.
23581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23582      # Now convert it back to Unix-style (cygpath)
23583      input_path=`$CYGPATH -u "$shortmode_path"`
23584      new_path="$input_path"
23585    fi
23586  fi
23587
23588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23589  if test "x$test_cygdrive_prefix" = x; then
23590    # As a simple fix, exclude /usr/bin since it's not a real path.
23591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23593      # a path prefixed by /cygdrive for fixpath to work.
23594      new_path="$CYGWIN_ROOT_PATH$input_path"
23595    fi
23596  fi
23597
23598
23599  if test "x$path" != "x$new_path"; then
23600    BOOT_JDK="$new_path"
23601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23603  fi
23604
23605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23606
23607  path="$BOOT_JDK"
23608  has_colon=`$ECHO $path | $GREP ^.:`
23609  new_path="$path"
23610  if test "x$has_colon" = x; then
23611    # Not in mixed or Windows style, start by that.
23612    new_path=`cmd //c echo $path`
23613  fi
23614
23615
23616  input_path="$new_path"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23625  fi
23626
23627
23628  windows_path="$new_path"
23629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23630    unix_path=`$CYGPATH -u "$windows_path"`
23631    new_path="$unix_path"
23632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23634    new_path="$unix_path"
23635  fi
23636
23637  if test "x$path" != "x$new_path"; then
23638    BOOT_JDK="$new_path"
23639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23641  fi
23642
23643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23645
23646    else
23647      # We're on a unix platform. Hooray! :)
23648      path="$BOOT_JDK"
23649      has_space=`$ECHO "$path" | $GREP " "`
23650      if test "x$has_space" != x; then
23651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23654      fi
23655
23656      # Use eval to expand a potential ~
23657      eval path="$path"
23658      if test ! -f "$path" && test ! -d "$path"; then
23659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23660      fi
23661
23662      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23663    fi
23664  fi
23665
23666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23667$as_echo_n "checking for Boot JDK... " >&6; }
23668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23669$as_echo "$BOOT_JDK" >&6; }
23670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23671$as_echo_n "checking Boot JDK version... " >&6; }
23672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23674$as_echo "$BOOT_JDK_VERSION" >&6; }
23675          fi # end check jdk version
23676        fi # end check javac
23677      fi # end check java
23678    fi # end check boot jdk found
23679  fi
23680
23681    done
23682  fi
23683
23684  fi
23685
23686
23687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23689      # Do we have a bin/java?
23690      if test ! -x "$BOOT_JDK/bin/java"; then
23691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23693        BOOT_JDK_FOUND=no
23694      else
23695        # Do we have a bin/javac?
23696        if test ! -x "$BOOT_JDK/bin/javac"; then
23697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23701          BOOT_JDK_FOUND=no
23702        else
23703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23705
23706          # Extra M4 quote needed to protect [] in grep expression.
23707          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23708          if test "x$FOUND_CORRECT_VERSION" = x; then
23709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23713            BOOT_JDK_FOUND=no
23714          else
23715            # We're done! :-)
23716            BOOT_JDK_FOUND=yes
23717
23718  # Only process if variable expands to non-empty
23719
23720  if test "x$BOOT_JDK" != x; then
23721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23722
23723  # Input might be given as Windows format, start by converting to
23724  # unix format.
23725  path="$BOOT_JDK"
23726  new_path=`$CYGPATH -u "$path"`
23727
23728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23731  # "foo.exe" is OK but "foo" is an error.
23732  #
23733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23734  # It is also a way to make sure we got the proper file name for the real test later on.
23735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23736  if test "x$test_shortpath" = x; then
23737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23740  fi
23741
23742  # Call helper function which possibly converts this using DOS-style short mode.
23743  # If so, the updated path is stored in $new_path.
23744
23745  input_path="$new_path"
23746  # Check if we need to convert this using DOS-style short mode. If the path
23747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23748  # take no chances and rewrite it.
23749  # Note: m4 eats our [], so we need to use [ and ] instead.
23750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23751  if test "x$has_forbidden_chars" != x; then
23752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23756      # Going to short mode and back again did indeed matter. Since short mode is
23757      # case insensitive, let's make it lowercase to improve readability.
23758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23759      # Now convert it back to Unix-style (cygpath)
23760      input_path=`$CYGPATH -u "$shortmode_path"`
23761      new_path="$input_path"
23762    fi
23763  fi
23764
23765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23766  if test "x$test_cygdrive_prefix" = x; then
23767    # As a simple fix, exclude /usr/bin since it's not a real path.
23768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23770      # a path prefixed by /cygdrive for fixpath to work.
23771      new_path="$CYGWIN_ROOT_PATH$input_path"
23772    fi
23773  fi
23774
23775
23776  if test "x$path" != "x$new_path"; then
23777    BOOT_JDK="$new_path"
23778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23780  fi
23781
23782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23783
23784  path="$BOOT_JDK"
23785  has_colon=`$ECHO $path | $GREP ^.:`
23786  new_path="$path"
23787  if test "x$has_colon" = x; then
23788    # Not in mixed or Windows style, start by that.
23789    new_path=`cmd //c echo $path`
23790  fi
23791
23792
23793  input_path="$new_path"
23794  # Check if we need to convert this using DOS-style short mode. If the path
23795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23796  # take no chances and rewrite it.
23797  # Note: m4 eats our [], so we need to use [ and ] instead.
23798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23799  if test "x$has_forbidden_chars" != x; then
23800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23802  fi
23803
23804
23805  windows_path="$new_path"
23806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23807    unix_path=`$CYGPATH -u "$windows_path"`
23808    new_path="$unix_path"
23809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23811    new_path="$unix_path"
23812  fi
23813
23814  if test "x$path" != "x$new_path"; then
23815    BOOT_JDK="$new_path"
23816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23818  fi
23819
23820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23822
23823    else
23824      # We're on a unix platform. Hooray! :)
23825      path="$BOOT_JDK"
23826      has_space=`$ECHO "$path" | $GREP " "`
23827      if test "x$has_space" != x; then
23828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23831      fi
23832
23833      # Use eval to expand a potential ~
23834      eval path="$path"
23835      if test ! -f "$path" && test ! -d "$path"; then
23836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23837      fi
23838
23839      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23840    fi
23841  fi
23842
23843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23844$as_echo_n "checking for Boot JDK... " >&6; }
23845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23846$as_echo "$BOOT_JDK" >&6; }
23847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23848$as_echo_n "checking Boot JDK version... " >&6; }
23849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23851$as_echo "$BOOT_JDK_VERSION" >&6; }
23852          fi # end check jdk version
23853        fi # end check javac
23854      fi # end check java
23855    fi # end check boot jdk found
23856  fi
23857
23858
23859  if test "x$BOOT_JDK_FOUND" = xno; then
23860    # Now execute the test
23861
23862  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23863  BOOT_JDK_SUFFIX=""
23864  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23865  if test "x$ALL_JDKS_FOUND" != x; then
23866    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23867
23868  if test "x$BOOT_JDK_FOUND" = xno; then
23869    # Now execute the test
23870
23871        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23872        if test -d "$BOOT_JDK"; then
23873          BOOT_JDK_FOUND=maybe
23874          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23875$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23876        fi
23877
23878
23879    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23880    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23881      # Do we have a bin/java?
23882      if test ! -x "$BOOT_JDK/bin/java"; then
23883        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23885        BOOT_JDK_FOUND=no
23886      else
23887        # Do we have a bin/javac?
23888        if test ! -x "$BOOT_JDK/bin/javac"; then
23889          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23891          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23892$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23893          BOOT_JDK_FOUND=no
23894        else
23895          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23896          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23897
23898          # Extra M4 quote needed to protect [] in grep expression.
23899          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23900          if test "x$FOUND_CORRECT_VERSION" = x; then
23901            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23904$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23905            BOOT_JDK_FOUND=no
23906          else
23907            # We're done! :-)
23908            BOOT_JDK_FOUND=yes
23909
23910  # Only process if variable expands to non-empty
23911
23912  if test "x$BOOT_JDK" != x; then
23913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23914
23915  # Input might be given as Windows format, start by converting to
23916  # unix format.
23917  path="$BOOT_JDK"
23918  new_path=`$CYGPATH -u "$path"`
23919
23920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23923  # "foo.exe" is OK but "foo" is an error.
23924  #
23925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23926  # It is also a way to make sure we got the proper file name for the real test later on.
23927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23928  if test "x$test_shortpath" = x; then
23929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23931    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23932  fi
23933
23934  # Call helper function which possibly converts this using DOS-style short mode.
23935  # If so, the updated path is stored in $new_path.
23936
23937  input_path="$new_path"
23938  # Check if we need to convert this using DOS-style short mode. If the path
23939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23940  # take no chances and rewrite it.
23941  # Note: m4 eats our [], so we need to use [ and ] instead.
23942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23943  if test "x$has_forbidden_chars" != x; then
23944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23948      # Going to short mode and back again did indeed matter. Since short mode is
23949      # case insensitive, let's make it lowercase to improve readability.
23950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23951      # Now convert it back to Unix-style (cygpath)
23952      input_path=`$CYGPATH -u "$shortmode_path"`
23953      new_path="$input_path"
23954    fi
23955  fi
23956
23957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23958  if test "x$test_cygdrive_prefix" = x; then
23959    # As a simple fix, exclude /usr/bin since it's not a real path.
23960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23962      # a path prefixed by /cygdrive for fixpath to work.
23963      new_path="$CYGWIN_ROOT_PATH$input_path"
23964    fi
23965  fi
23966
23967
23968  if test "x$path" != "x$new_path"; then
23969    BOOT_JDK="$new_path"
23970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23971$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23972  fi
23973
23974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23975
23976  path="$BOOT_JDK"
23977  has_colon=`$ECHO $path | $GREP ^.:`
23978  new_path="$path"
23979  if test "x$has_colon" = x; then
23980    # Not in mixed or Windows style, start by that.
23981    new_path=`cmd //c echo $path`
23982  fi
23983
23984
23985  input_path="$new_path"
23986  # Check if we need to convert this using DOS-style short mode. If the path
23987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23988  # take no chances and rewrite it.
23989  # Note: m4 eats our [], so we need to use [ and ] instead.
23990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23991  if test "x$has_forbidden_chars" != x; then
23992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23994  fi
23995
23996
23997  windows_path="$new_path"
23998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23999    unix_path=`$CYGPATH -u "$windows_path"`
24000    new_path="$unix_path"
24001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24003    new_path="$unix_path"
24004  fi
24005
24006  if test "x$path" != "x$new_path"; then
24007    BOOT_JDK="$new_path"
24008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24010  fi
24011
24012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24014
24015    else
24016      # We're on a unix platform. Hooray! :)
24017      path="$BOOT_JDK"
24018      has_space=`$ECHO "$path" | $GREP " "`
24019      if test "x$has_space" != x; then
24020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24023      fi
24024
24025      # Use eval to expand a potential ~
24026      eval path="$path"
24027      if test ! -f "$path" && test ! -d "$path"; then
24028        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24029      fi
24030
24031      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24032    fi
24033  fi
24034
24035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24036$as_echo_n "checking for Boot JDK... " >&6; }
24037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24038$as_echo "$BOOT_JDK" >&6; }
24039            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24040$as_echo_n "checking Boot JDK version... " >&6; }
24041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24043$as_echo "$BOOT_JDK_VERSION" >&6; }
24044          fi # end check jdk version
24045        fi # end check javac
24046      fi # end check java
24047    fi # end check boot jdk found
24048  fi
24049
24050    done
24051  fi
24052
24053
24054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24056      # Do we have a bin/java?
24057      if test ! -x "$BOOT_JDK/bin/java"; then
24058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24060        BOOT_JDK_FOUND=no
24061      else
24062        # Do we have a bin/javac?
24063        if test ! -x "$BOOT_JDK/bin/javac"; then
24064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24068          BOOT_JDK_FOUND=no
24069        else
24070          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24071          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24072
24073          # Extra M4 quote needed to protect [] in grep expression.
24074          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24075          if test "x$FOUND_CORRECT_VERSION" = x; then
24076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24078            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24079$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24080            BOOT_JDK_FOUND=no
24081          else
24082            # We're done! :-)
24083            BOOT_JDK_FOUND=yes
24084
24085  # Only process if variable expands to non-empty
24086
24087  if test "x$BOOT_JDK" != x; then
24088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24089
24090  # Input might be given as Windows format, start by converting to
24091  # unix format.
24092  path="$BOOT_JDK"
24093  new_path=`$CYGPATH -u "$path"`
24094
24095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24098  # "foo.exe" is OK but "foo" is an error.
24099  #
24100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24101  # It is also a way to make sure we got the proper file name for the real test later on.
24102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24103  if test "x$test_shortpath" = x; then
24104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24107  fi
24108
24109  # Call helper function which possibly converts this using DOS-style short mode.
24110  # If so, the updated path is stored in $new_path.
24111
24112  input_path="$new_path"
24113  # Check if we need to convert this using DOS-style short mode. If the path
24114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24115  # take no chances and rewrite it.
24116  # Note: m4 eats our [], so we need to use [ and ] instead.
24117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24118  if test "x$has_forbidden_chars" != x; then
24119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24123      # Going to short mode and back again did indeed matter. Since short mode is
24124      # case insensitive, let's make it lowercase to improve readability.
24125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24126      # Now convert it back to Unix-style (cygpath)
24127      input_path=`$CYGPATH -u "$shortmode_path"`
24128      new_path="$input_path"
24129    fi
24130  fi
24131
24132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24133  if test "x$test_cygdrive_prefix" = x; then
24134    # As a simple fix, exclude /usr/bin since it's not a real path.
24135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24137      # a path prefixed by /cygdrive for fixpath to work.
24138      new_path="$CYGWIN_ROOT_PATH$input_path"
24139    fi
24140  fi
24141
24142
24143  if test "x$path" != "x$new_path"; then
24144    BOOT_JDK="$new_path"
24145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24147  fi
24148
24149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24150
24151  path="$BOOT_JDK"
24152  has_colon=`$ECHO $path | $GREP ^.:`
24153  new_path="$path"
24154  if test "x$has_colon" = x; then
24155    # Not in mixed or Windows style, start by that.
24156    new_path=`cmd //c echo $path`
24157  fi
24158
24159
24160  input_path="$new_path"
24161  # Check if we need to convert this using DOS-style short mode. If the path
24162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24163  # take no chances and rewrite it.
24164  # Note: m4 eats our [], so we need to use [ and ] instead.
24165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24166  if test "x$has_forbidden_chars" != x; then
24167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24169  fi
24170
24171
24172  windows_path="$new_path"
24173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24174    unix_path=`$CYGPATH -u "$windows_path"`
24175    new_path="$unix_path"
24176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24178    new_path="$unix_path"
24179  fi
24180
24181  if test "x$path" != "x$new_path"; then
24182    BOOT_JDK="$new_path"
24183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24185  fi
24186
24187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24189
24190    else
24191      # We're on a unix platform. Hooray! :)
24192      path="$BOOT_JDK"
24193      has_space=`$ECHO "$path" | $GREP " "`
24194      if test "x$has_space" != x; then
24195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24198      fi
24199
24200      # Use eval to expand a potential ~
24201      eval path="$path"
24202      if test ! -f "$path" && test ! -d "$path"; then
24203        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24204      fi
24205
24206      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24207    fi
24208  fi
24209
24210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24211$as_echo_n "checking for Boot JDK... " >&6; }
24212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24213$as_echo "$BOOT_JDK" >&6; }
24214            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24215$as_echo_n "checking Boot JDK version... " >&6; }
24216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24218$as_echo "$BOOT_JDK_VERSION" >&6; }
24219          fi # end check jdk version
24220        fi # end check javac
24221      fi # end check java
24222    fi # end check boot jdk found
24223  fi
24224
24225  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24226
24227  if test "x$BOOT_JDK_FOUND" = xno; then
24228    # Now execute the test
24229
24230  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24231  BOOT_JDK_SUFFIX="/Contents/Home"
24232  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24233  if test "x$ALL_JDKS_FOUND" != x; then
24234    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24235
24236  if test "x$BOOT_JDK_FOUND" = xno; then
24237    # Now execute the test
24238
24239        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24240        if test -d "$BOOT_JDK"; then
24241          BOOT_JDK_FOUND=maybe
24242          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24243$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24244        fi
24245
24246
24247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24249      # Do we have a bin/java?
24250      if test ! -x "$BOOT_JDK/bin/java"; then
24251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24253        BOOT_JDK_FOUND=no
24254      else
24255        # Do we have a bin/javac?
24256        if test ! -x "$BOOT_JDK/bin/javac"; then
24257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24261          BOOT_JDK_FOUND=no
24262        else
24263          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24264          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24265
24266          # Extra M4 quote needed to protect [] in grep expression.
24267          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24268          if test "x$FOUND_CORRECT_VERSION" = x; then
24269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24271            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24272$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24273            BOOT_JDK_FOUND=no
24274          else
24275            # We're done! :-)
24276            BOOT_JDK_FOUND=yes
24277
24278  # Only process if variable expands to non-empty
24279
24280  if test "x$BOOT_JDK" != x; then
24281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24282
24283  # Input might be given as Windows format, start by converting to
24284  # unix format.
24285  path="$BOOT_JDK"
24286  new_path=`$CYGPATH -u "$path"`
24287
24288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24291  # "foo.exe" is OK but "foo" is an error.
24292  #
24293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24294  # It is also a way to make sure we got the proper file name for the real test later on.
24295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24296  if test "x$test_shortpath" = x; then
24297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24299    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24300  fi
24301
24302  # Call helper function which possibly converts this using DOS-style short mode.
24303  # If so, the updated path is stored in $new_path.
24304
24305  input_path="$new_path"
24306  # Check if we need to convert this using DOS-style short mode. If the path
24307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24308  # take no chances and rewrite it.
24309  # Note: m4 eats our [], so we need to use [ and ] instead.
24310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24311  if test "x$has_forbidden_chars" != x; then
24312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24316      # Going to short mode and back again did indeed matter. Since short mode is
24317      # case insensitive, let's make it lowercase to improve readability.
24318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24319      # Now convert it back to Unix-style (cygpath)
24320      input_path=`$CYGPATH -u "$shortmode_path"`
24321      new_path="$input_path"
24322    fi
24323  fi
24324
24325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24326  if test "x$test_cygdrive_prefix" = x; then
24327    # As a simple fix, exclude /usr/bin since it's not a real path.
24328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24330      # a path prefixed by /cygdrive for fixpath to work.
24331      new_path="$CYGWIN_ROOT_PATH$input_path"
24332    fi
24333  fi
24334
24335
24336  if test "x$path" != "x$new_path"; then
24337    BOOT_JDK="$new_path"
24338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24340  fi
24341
24342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24343
24344  path="$BOOT_JDK"
24345  has_colon=`$ECHO $path | $GREP ^.:`
24346  new_path="$path"
24347  if test "x$has_colon" = x; then
24348    # Not in mixed or Windows style, start by that.
24349    new_path=`cmd //c echo $path`
24350  fi
24351
24352
24353  input_path="$new_path"
24354  # Check if we need to convert this using DOS-style short mode. If the path
24355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24356  # take no chances and rewrite it.
24357  # Note: m4 eats our [], so we need to use [ and ] instead.
24358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24359  if test "x$has_forbidden_chars" != x; then
24360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24362  fi
24363
24364
24365  windows_path="$new_path"
24366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24367    unix_path=`$CYGPATH -u "$windows_path"`
24368    new_path="$unix_path"
24369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24371    new_path="$unix_path"
24372  fi
24373
24374  if test "x$path" != "x$new_path"; then
24375    BOOT_JDK="$new_path"
24376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24378  fi
24379
24380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24382
24383    else
24384      # We're on a unix platform. Hooray! :)
24385      path="$BOOT_JDK"
24386      has_space=`$ECHO "$path" | $GREP " "`
24387      if test "x$has_space" != x; then
24388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24391      fi
24392
24393      # Use eval to expand a potential ~
24394      eval path="$path"
24395      if test ! -f "$path" && test ! -d "$path"; then
24396        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24397      fi
24398
24399      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24400    fi
24401  fi
24402
24403            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24404$as_echo_n "checking for Boot JDK... " >&6; }
24405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24406$as_echo "$BOOT_JDK" >&6; }
24407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24408$as_echo_n "checking Boot JDK version... " >&6; }
24409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24411$as_echo "$BOOT_JDK_VERSION" >&6; }
24412          fi # end check jdk version
24413        fi # end check javac
24414      fi # end check java
24415    fi # end check boot jdk found
24416  fi
24417
24418    done
24419  fi
24420
24421
24422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24424      # Do we have a bin/java?
24425      if test ! -x "$BOOT_JDK/bin/java"; then
24426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24428        BOOT_JDK_FOUND=no
24429      else
24430        # Do we have a bin/javac?
24431        if test ! -x "$BOOT_JDK/bin/javac"; then
24432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24436          BOOT_JDK_FOUND=no
24437        else
24438          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24439          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24440
24441          # Extra M4 quote needed to protect [] in grep expression.
24442          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24443          if test "x$FOUND_CORRECT_VERSION" = x; then
24444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24446            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24447$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24448            BOOT_JDK_FOUND=no
24449          else
24450            # We're done! :-)
24451            BOOT_JDK_FOUND=yes
24452
24453  # Only process if variable expands to non-empty
24454
24455  if test "x$BOOT_JDK" != x; then
24456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24457
24458  # Input might be given as Windows format, start by converting to
24459  # unix format.
24460  path="$BOOT_JDK"
24461  new_path=`$CYGPATH -u "$path"`
24462
24463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24466  # "foo.exe" is OK but "foo" is an error.
24467  #
24468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24469  # It is also a way to make sure we got the proper file name for the real test later on.
24470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24471  if test "x$test_shortpath" = x; then
24472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24475  fi
24476
24477  # Call helper function which possibly converts this using DOS-style short mode.
24478  # If so, the updated path is stored in $new_path.
24479
24480  input_path="$new_path"
24481  # Check if we need to convert this using DOS-style short mode. If the path
24482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24483  # take no chances and rewrite it.
24484  # Note: m4 eats our [], so we need to use [ and ] instead.
24485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24486  if test "x$has_forbidden_chars" != x; then
24487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24491      # Going to short mode and back again did indeed matter. Since short mode is
24492      # case insensitive, let's make it lowercase to improve readability.
24493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24494      # Now convert it back to Unix-style (cygpath)
24495      input_path=`$CYGPATH -u "$shortmode_path"`
24496      new_path="$input_path"
24497    fi
24498  fi
24499
24500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24501  if test "x$test_cygdrive_prefix" = x; then
24502    # As a simple fix, exclude /usr/bin since it's not a real path.
24503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24505      # a path prefixed by /cygdrive for fixpath to work.
24506      new_path="$CYGWIN_ROOT_PATH$input_path"
24507    fi
24508  fi
24509
24510
24511  if test "x$path" != "x$new_path"; then
24512    BOOT_JDK="$new_path"
24513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24515  fi
24516
24517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24518
24519  path="$BOOT_JDK"
24520  has_colon=`$ECHO $path | $GREP ^.:`
24521  new_path="$path"
24522  if test "x$has_colon" = x; then
24523    # Not in mixed or Windows style, start by that.
24524    new_path=`cmd //c echo $path`
24525  fi
24526
24527
24528  input_path="$new_path"
24529  # Check if we need to convert this using DOS-style short mode. If the path
24530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24531  # take no chances and rewrite it.
24532  # Note: m4 eats our [], so we need to use [ and ] instead.
24533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24534  if test "x$has_forbidden_chars" != x; then
24535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24537  fi
24538
24539
24540  windows_path="$new_path"
24541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24542    unix_path=`$CYGPATH -u "$windows_path"`
24543    new_path="$unix_path"
24544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24546    new_path="$unix_path"
24547  fi
24548
24549  if test "x$path" != "x$new_path"; then
24550    BOOT_JDK="$new_path"
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24553  fi
24554
24555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24557
24558    else
24559      # We're on a unix platform. Hooray! :)
24560      path="$BOOT_JDK"
24561      has_space=`$ECHO "$path" | $GREP " "`
24562      if test "x$has_space" != x; then
24563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24566      fi
24567
24568      # Use eval to expand a potential ~
24569      eval path="$path"
24570      if test ! -f "$path" && test ! -d "$path"; then
24571        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24572      fi
24573
24574      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24575    fi
24576  fi
24577
24578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24579$as_echo_n "checking for Boot JDK... " >&6; }
24580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24581$as_echo "$BOOT_JDK" >&6; }
24582            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24583$as_echo_n "checking Boot JDK version... " >&6; }
24584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24586$as_echo "$BOOT_JDK_VERSION" >&6; }
24587          fi # end check jdk version
24588        fi # end check javac
24589      fi # end check java
24590    fi # end check boot jdk found
24591  fi
24592
24593
24594  if test "x$BOOT_JDK_FOUND" = xno; then
24595    # Now execute the test
24596
24597  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24598  BOOT_JDK_SUFFIX="/Contents/Home"
24599  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24600  if test "x$ALL_JDKS_FOUND" != x; then
24601    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24602
24603  if test "x$BOOT_JDK_FOUND" = xno; then
24604    # Now execute the test
24605
24606        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24607        if test -d "$BOOT_JDK"; then
24608          BOOT_JDK_FOUND=maybe
24609          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24610$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24611        fi
24612
24613
24614    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24615    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24616      # Do we have a bin/java?
24617      if test ! -x "$BOOT_JDK/bin/java"; then
24618        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24620        BOOT_JDK_FOUND=no
24621      else
24622        # Do we have a bin/javac?
24623        if test ! -x "$BOOT_JDK/bin/javac"; then
24624          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24626          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24627$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24628          BOOT_JDK_FOUND=no
24629        else
24630          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24631          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24632
24633          # Extra M4 quote needed to protect [] in grep expression.
24634          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24635          if test "x$FOUND_CORRECT_VERSION" = x; then
24636            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24638            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24639$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24640            BOOT_JDK_FOUND=no
24641          else
24642            # We're done! :-)
24643            BOOT_JDK_FOUND=yes
24644
24645  # Only process if variable expands to non-empty
24646
24647  if test "x$BOOT_JDK" != x; then
24648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24649
24650  # Input might be given as Windows format, start by converting to
24651  # unix format.
24652  path="$BOOT_JDK"
24653  new_path=`$CYGPATH -u "$path"`
24654
24655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24658  # "foo.exe" is OK but "foo" is an error.
24659  #
24660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24661  # It is also a way to make sure we got the proper file name for the real test later on.
24662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24663  if test "x$test_shortpath" = x; then
24664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24666    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24667  fi
24668
24669  # Call helper function which possibly converts this using DOS-style short mode.
24670  # If so, the updated path is stored in $new_path.
24671
24672  input_path="$new_path"
24673  # Check if we need to convert this using DOS-style short mode. If the path
24674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24675  # take no chances and rewrite it.
24676  # Note: m4 eats our [], so we need to use [ and ] instead.
24677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24678  if test "x$has_forbidden_chars" != x; then
24679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24683      # Going to short mode and back again did indeed matter. Since short mode is
24684      # case insensitive, let's make it lowercase to improve readability.
24685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24686      # Now convert it back to Unix-style (cygpath)
24687      input_path=`$CYGPATH -u "$shortmode_path"`
24688      new_path="$input_path"
24689    fi
24690  fi
24691
24692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24693  if test "x$test_cygdrive_prefix" = x; then
24694    # As a simple fix, exclude /usr/bin since it's not a real path.
24695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24697      # a path prefixed by /cygdrive for fixpath to work.
24698      new_path="$CYGWIN_ROOT_PATH$input_path"
24699    fi
24700  fi
24701
24702
24703  if test "x$path" != "x$new_path"; then
24704    BOOT_JDK="$new_path"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24707  fi
24708
24709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24710
24711  path="$BOOT_JDK"
24712  has_colon=`$ECHO $path | $GREP ^.:`
24713  new_path="$path"
24714  if test "x$has_colon" = x; then
24715    # Not in mixed or Windows style, start by that.
24716    new_path=`cmd //c echo $path`
24717  fi
24718
24719
24720  input_path="$new_path"
24721  # Check if we need to convert this using DOS-style short mode. If the path
24722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24723  # take no chances and rewrite it.
24724  # Note: m4 eats our [], so we need to use [ and ] instead.
24725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24726  if test "x$has_forbidden_chars" != x; then
24727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24729  fi
24730
24731
24732  windows_path="$new_path"
24733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24734    unix_path=`$CYGPATH -u "$windows_path"`
24735    new_path="$unix_path"
24736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24738    new_path="$unix_path"
24739  fi
24740
24741  if test "x$path" != "x$new_path"; then
24742    BOOT_JDK="$new_path"
24743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24745  fi
24746
24747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24749
24750    else
24751      # We're on a unix platform. Hooray! :)
24752      path="$BOOT_JDK"
24753      has_space=`$ECHO "$path" | $GREP " "`
24754      if test "x$has_space" != x; then
24755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24758      fi
24759
24760      # Use eval to expand a potential ~
24761      eval path="$path"
24762      if test ! -f "$path" && test ! -d "$path"; then
24763        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24764      fi
24765
24766      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24767    fi
24768  fi
24769
24770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24771$as_echo_n "checking for Boot JDK... " >&6; }
24772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24773$as_echo "$BOOT_JDK" >&6; }
24774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24775$as_echo_n "checking Boot JDK version... " >&6; }
24776            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24778$as_echo "$BOOT_JDK_VERSION" >&6; }
24779          fi # end check jdk version
24780        fi # end check javac
24781      fi # end check java
24782    fi # end check boot jdk found
24783  fi
24784
24785    done
24786  fi
24787
24788
24789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24791      # Do we have a bin/java?
24792      if test ! -x "$BOOT_JDK/bin/java"; then
24793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24795        BOOT_JDK_FOUND=no
24796      else
24797        # Do we have a bin/javac?
24798        if test ! -x "$BOOT_JDK/bin/javac"; then
24799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24803          BOOT_JDK_FOUND=no
24804        else
24805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24807
24808          # Extra M4 quote needed to protect [] in grep expression.
24809          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24810          if test "x$FOUND_CORRECT_VERSION" = x; then
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24815            BOOT_JDK_FOUND=no
24816          else
24817            # We're done! :-)
24818            BOOT_JDK_FOUND=yes
24819
24820  # Only process if variable expands to non-empty
24821
24822  if test "x$BOOT_JDK" != x; then
24823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824
24825  # Input might be given as Windows format, start by converting to
24826  # unix format.
24827  path="$BOOT_JDK"
24828  new_path=`$CYGPATH -u "$path"`
24829
24830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24833  # "foo.exe" is OK but "foo" is an error.
24834  #
24835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24836  # It is also a way to make sure we got the proper file name for the real test later on.
24837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24838  if test "x$test_shortpath" = x; then
24839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24842  fi
24843
24844  # Call helper function which possibly converts this using DOS-style short mode.
24845  # If so, the updated path is stored in $new_path.
24846
24847  input_path="$new_path"
24848  # Check if we need to convert this using DOS-style short mode. If the path
24849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24850  # take no chances and rewrite it.
24851  # Note: m4 eats our [], so we need to use [ and ] instead.
24852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24853  if test "x$has_forbidden_chars" != x; then
24854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24858      # Going to short mode and back again did indeed matter. Since short mode is
24859      # case insensitive, let's make it lowercase to improve readability.
24860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24861      # Now convert it back to Unix-style (cygpath)
24862      input_path=`$CYGPATH -u "$shortmode_path"`
24863      new_path="$input_path"
24864    fi
24865  fi
24866
24867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24868  if test "x$test_cygdrive_prefix" = x; then
24869    # As a simple fix, exclude /usr/bin since it's not a real path.
24870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24872      # a path prefixed by /cygdrive for fixpath to work.
24873      new_path="$CYGWIN_ROOT_PATH$input_path"
24874    fi
24875  fi
24876
24877
24878  if test "x$path" != "x$new_path"; then
24879    BOOT_JDK="$new_path"
24880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24882  fi
24883
24884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24885
24886  path="$BOOT_JDK"
24887  has_colon=`$ECHO $path | $GREP ^.:`
24888  new_path="$path"
24889  if test "x$has_colon" = x; then
24890    # Not in mixed or Windows style, start by that.
24891    new_path=`cmd //c echo $path`
24892  fi
24893
24894
24895  input_path="$new_path"
24896  # Check if we need to convert this using DOS-style short mode. If the path
24897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898  # take no chances and rewrite it.
24899  # Note: m4 eats our [], so we need to use [ and ] instead.
24900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24901  if test "x$has_forbidden_chars" != x; then
24902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24904  fi
24905
24906
24907  windows_path="$new_path"
24908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24909    unix_path=`$CYGPATH -u "$windows_path"`
24910    new_path="$unix_path"
24911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24913    new_path="$unix_path"
24914  fi
24915
24916  if test "x$path" != "x$new_path"; then
24917    BOOT_JDK="$new_path"
24918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24920  fi
24921
24922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24924
24925    else
24926      # We're on a unix platform. Hooray! :)
24927      path="$BOOT_JDK"
24928      has_space=`$ECHO "$path" | $GREP " "`
24929      if test "x$has_space" != x; then
24930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24933      fi
24934
24935      # Use eval to expand a potential ~
24936      eval path="$path"
24937      if test ! -f "$path" && test ! -d "$path"; then
24938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24939      fi
24940
24941      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24942    fi
24943  fi
24944
24945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24946$as_echo_n "checking for Boot JDK... " >&6; }
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24948$as_echo "$BOOT_JDK" >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24950$as_echo_n "checking Boot JDK version... " >&6; }
24951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24953$as_echo "$BOOT_JDK_VERSION" >&6; }
24954          fi # end check jdk version
24955        fi # end check javac
24956      fi # end check java
24957    fi # end check boot jdk found
24958  fi
24959
24960  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24961
24962  if test "x$BOOT_JDK_FOUND" = xno; then
24963    # Now execute the test
24964
24965  BOOT_JDK_PREFIX="/usr/lib/jvm"
24966  BOOT_JDK_SUFFIX=""
24967  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24968  if test "x$ALL_JDKS_FOUND" != x; then
24969    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24970
24971  if test "x$BOOT_JDK_FOUND" = xno; then
24972    # Now execute the test
24973
24974        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24975        if test -d "$BOOT_JDK"; then
24976          BOOT_JDK_FOUND=maybe
24977          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24978$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24979        fi
24980
24981
24982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24984      # Do we have a bin/java?
24985      if test ! -x "$BOOT_JDK/bin/java"; then
24986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24988        BOOT_JDK_FOUND=no
24989      else
24990        # Do we have a bin/javac?
24991        if test ! -x "$BOOT_JDK/bin/javac"; then
24992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24996          BOOT_JDK_FOUND=no
24997        else
24998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25000
25001          # Extra M4 quote needed to protect [] in grep expression.
25002          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25003          if test "x$FOUND_CORRECT_VERSION" = x; then
25004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25008            BOOT_JDK_FOUND=no
25009          else
25010            # We're done! :-)
25011            BOOT_JDK_FOUND=yes
25012
25013  # Only process if variable expands to non-empty
25014
25015  if test "x$BOOT_JDK" != x; then
25016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25017
25018  # Input might be given as Windows format, start by converting to
25019  # unix format.
25020  path="$BOOT_JDK"
25021  new_path=`$CYGPATH -u "$path"`
25022
25023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25026  # "foo.exe" is OK but "foo" is an error.
25027  #
25028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25029  # It is also a way to make sure we got the proper file name for the real test later on.
25030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25031  if test "x$test_shortpath" = x; then
25032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25035  fi
25036
25037  # Call helper function which possibly converts this using DOS-style short mode.
25038  # If so, the updated path is stored in $new_path.
25039
25040  input_path="$new_path"
25041  # Check if we need to convert this using DOS-style short mode. If the path
25042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25043  # take no chances and rewrite it.
25044  # Note: m4 eats our [], so we need to use [ and ] instead.
25045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25046  if test "x$has_forbidden_chars" != x; then
25047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25051      # Going to short mode and back again did indeed matter. Since short mode is
25052      # case insensitive, let's make it lowercase to improve readability.
25053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25054      # Now convert it back to Unix-style (cygpath)
25055      input_path=`$CYGPATH -u "$shortmode_path"`
25056      new_path="$input_path"
25057    fi
25058  fi
25059
25060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25061  if test "x$test_cygdrive_prefix" = x; then
25062    # As a simple fix, exclude /usr/bin since it's not a real path.
25063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25065      # a path prefixed by /cygdrive for fixpath to work.
25066      new_path="$CYGWIN_ROOT_PATH$input_path"
25067    fi
25068  fi
25069
25070
25071  if test "x$path" != "x$new_path"; then
25072    BOOT_JDK="$new_path"
25073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25075  fi
25076
25077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25078
25079  path="$BOOT_JDK"
25080  has_colon=`$ECHO $path | $GREP ^.:`
25081  new_path="$path"
25082  if test "x$has_colon" = x; then
25083    # Not in mixed or Windows style, start by that.
25084    new_path=`cmd //c echo $path`
25085  fi
25086
25087
25088  input_path="$new_path"
25089  # Check if we need to convert this using DOS-style short mode. If the path
25090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25091  # take no chances and rewrite it.
25092  # Note: m4 eats our [], so we need to use [ and ] instead.
25093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25094  if test "x$has_forbidden_chars" != x; then
25095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25097  fi
25098
25099
25100  windows_path="$new_path"
25101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102    unix_path=`$CYGPATH -u "$windows_path"`
25103    new_path="$unix_path"
25104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25106    new_path="$unix_path"
25107  fi
25108
25109  if test "x$path" != "x$new_path"; then
25110    BOOT_JDK="$new_path"
25111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25113  fi
25114
25115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25117
25118    else
25119      # We're on a unix platform. Hooray! :)
25120      path="$BOOT_JDK"
25121      has_space=`$ECHO "$path" | $GREP " "`
25122      if test "x$has_space" != x; then
25123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25126      fi
25127
25128      # Use eval to expand a potential ~
25129      eval path="$path"
25130      if test ! -f "$path" && test ! -d "$path"; then
25131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25132      fi
25133
25134      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25135    fi
25136  fi
25137
25138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25139$as_echo_n "checking for Boot JDK... " >&6; }
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25141$as_echo "$BOOT_JDK" >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25143$as_echo_n "checking Boot JDK version... " >&6; }
25144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25146$as_echo "$BOOT_JDK_VERSION" >&6; }
25147          fi # end check jdk version
25148        fi # end check javac
25149      fi # end check java
25150    fi # end check boot jdk found
25151  fi
25152
25153    done
25154  fi
25155
25156
25157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25159      # Do we have a bin/java?
25160      if test ! -x "$BOOT_JDK/bin/java"; then
25161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25163        BOOT_JDK_FOUND=no
25164      else
25165        # Do we have a bin/javac?
25166        if test ! -x "$BOOT_JDK/bin/javac"; then
25167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25171          BOOT_JDK_FOUND=no
25172        else
25173          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25174          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25175
25176          # Extra M4 quote needed to protect [] in grep expression.
25177          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25178          if test "x$FOUND_CORRECT_VERSION" = x; then
25179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25181            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25183            BOOT_JDK_FOUND=no
25184          else
25185            # We're done! :-)
25186            BOOT_JDK_FOUND=yes
25187
25188  # Only process if variable expands to non-empty
25189
25190  if test "x$BOOT_JDK" != x; then
25191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25192
25193  # Input might be given as Windows format, start by converting to
25194  # unix format.
25195  path="$BOOT_JDK"
25196  new_path=`$CYGPATH -u "$path"`
25197
25198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25201  # "foo.exe" is OK but "foo" is an error.
25202  #
25203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25204  # It is also a way to make sure we got the proper file name for the real test later on.
25205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25206  if test "x$test_shortpath" = x; then
25207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25209    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25210  fi
25211
25212  # Call helper function which possibly converts this using DOS-style short mode.
25213  # If so, the updated path is stored in $new_path.
25214
25215  input_path="$new_path"
25216  # Check if we need to convert this using DOS-style short mode. If the path
25217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25218  # take no chances and rewrite it.
25219  # Note: m4 eats our [], so we need to use [ and ] instead.
25220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25221  if test "x$has_forbidden_chars" != x; then
25222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25226      # Going to short mode and back again did indeed matter. Since short mode is
25227      # case insensitive, let's make it lowercase to improve readability.
25228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25229      # Now convert it back to Unix-style (cygpath)
25230      input_path=`$CYGPATH -u "$shortmode_path"`
25231      new_path="$input_path"
25232    fi
25233  fi
25234
25235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25236  if test "x$test_cygdrive_prefix" = x; then
25237    # As a simple fix, exclude /usr/bin since it's not a real path.
25238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25240      # a path prefixed by /cygdrive for fixpath to work.
25241      new_path="$CYGWIN_ROOT_PATH$input_path"
25242    fi
25243  fi
25244
25245
25246  if test "x$path" != "x$new_path"; then
25247    BOOT_JDK="$new_path"
25248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25250  fi
25251
25252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25253
25254  path="$BOOT_JDK"
25255  has_colon=`$ECHO $path | $GREP ^.:`
25256  new_path="$path"
25257  if test "x$has_colon" = x; then
25258    # Not in mixed or Windows style, start by that.
25259    new_path=`cmd //c echo $path`
25260  fi
25261
25262
25263  input_path="$new_path"
25264  # Check if we need to convert this using DOS-style short mode. If the path
25265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25266  # take no chances and rewrite it.
25267  # Note: m4 eats our [], so we need to use [ and ] instead.
25268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25269  if test "x$has_forbidden_chars" != x; then
25270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25272  fi
25273
25274
25275  windows_path="$new_path"
25276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277    unix_path=`$CYGPATH -u "$windows_path"`
25278    new_path="$unix_path"
25279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25281    new_path="$unix_path"
25282  fi
25283
25284  if test "x$path" != "x$new_path"; then
25285    BOOT_JDK="$new_path"
25286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25288  fi
25289
25290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25292
25293    else
25294      # We're on a unix platform. Hooray! :)
25295      path="$BOOT_JDK"
25296      has_space=`$ECHO "$path" | $GREP " "`
25297      if test "x$has_space" != x; then
25298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25301      fi
25302
25303      # Use eval to expand a potential ~
25304      eval path="$path"
25305      if test ! -f "$path" && test ! -d "$path"; then
25306        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25307      fi
25308
25309      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25310    fi
25311  fi
25312
25313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25314$as_echo_n "checking for Boot JDK... " >&6; }
25315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25316$as_echo "$BOOT_JDK" >&6; }
25317            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25318$as_echo_n "checking Boot JDK version... " >&6; }
25319            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25321$as_echo "$BOOT_JDK_VERSION" >&6; }
25322          fi # end check jdk version
25323        fi # end check javac
25324      fi # end check java
25325    fi # end check boot jdk found
25326  fi
25327
25328  fi
25329
25330
25331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25333      # Do we have a bin/java?
25334      if test ! -x "$BOOT_JDK/bin/java"; then
25335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25337        BOOT_JDK_FOUND=no
25338      else
25339        # Do we have a bin/javac?
25340        if test ! -x "$BOOT_JDK/bin/javac"; then
25341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25345          BOOT_JDK_FOUND=no
25346        else
25347          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25348          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25349
25350          # Extra M4 quote needed to protect [] in grep expression.
25351          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25352          if test "x$FOUND_CORRECT_VERSION" = x; then
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25356$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25357            BOOT_JDK_FOUND=no
25358          else
25359            # We're done! :-)
25360            BOOT_JDK_FOUND=yes
25361
25362  # Only process if variable expands to non-empty
25363
25364  if test "x$BOOT_JDK" != x; then
25365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366
25367  # Input might be given as Windows format, start by converting to
25368  # unix format.
25369  path="$BOOT_JDK"
25370  new_path=`$CYGPATH -u "$path"`
25371
25372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25375  # "foo.exe" is OK but "foo" is an error.
25376  #
25377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25378  # It is also a way to make sure we got the proper file name for the real test later on.
25379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25380  if test "x$test_shortpath" = x; then
25381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25384  fi
25385
25386  # Call helper function which possibly converts this using DOS-style short mode.
25387  # If so, the updated path is stored in $new_path.
25388
25389  input_path="$new_path"
25390  # Check if we need to convert this using DOS-style short mode. If the path
25391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25392  # take no chances and rewrite it.
25393  # Note: m4 eats our [], so we need to use [ and ] instead.
25394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25395  if test "x$has_forbidden_chars" != x; then
25396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25400      # Going to short mode and back again did indeed matter. Since short mode is
25401      # case insensitive, let's make it lowercase to improve readability.
25402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25403      # Now convert it back to Unix-style (cygpath)
25404      input_path=`$CYGPATH -u "$shortmode_path"`
25405      new_path="$input_path"
25406    fi
25407  fi
25408
25409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25410  if test "x$test_cygdrive_prefix" = x; then
25411    # As a simple fix, exclude /usr/bin since it's not a real path.
25412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25414      # a path prefixed by /cygdrive for fixpath to work.
25415      new_path="$CYGWIN_ROOT_PATH$input_path"
25416    fi
25417  fi
25418
25419
25420  if test "x$path" != "x$new_path"; then
25421    BOOT_JDK="$new_path"
25422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25424  fi
25425
25426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427
25428  path="$BOOT_JDK"
25429  has_colon=`$ECHO $path | $GREP ^.:`
25430  new_path="$path"
25431  if test "x$has_colon" = x; then
25432    # Not in mixed or Windows style, start by that.
25433    new_path=`cmd //c echo $path`
25434  fi
25435
25436
25437  input_path="$new_path"
25438  # Check if we need to convert this using DOS-style short mode. If the path
25439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25440  # take no chances and rewrite it.
25441  # Note: m4 eats our [], so we need to use [ and ] instead.
25442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25443  if test "x$has_forbidden_chars" != x; then
25444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25446  fi
25447
25448
25449  windows_path="$new_path"
25450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25451    unix_path=`$CYGPATH -u "$windows_path"`
25452    new_path="$unix_path"
25453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25455    new_path="$unix_path"
25456  fi
25457
25458  if test "x$path" != "x$new_path"; then
25459    BOOT_JDK="$new_path"
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462  fi
25463
25464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25466
25467    else
25468      # We're on a unix platform. Hooray! :)
25469      path="$BOOT_JDK"
25470      has_space=`$ECHO "$path" | $GREP " "`
25471      if test "x$has_space" != x; then
25472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25475      fi
25476
25477      # Use eval to expand a potential ~
25478      eval path="$path"
25479      if test ! -f "$path" && test ! -d "$path"; then
25480        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25481      fi
25482
25483      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25484    fi
25485  fi
25486
25487            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25488$as_echo_n "checking for Boot JDK... " >&6; }
25489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25490$as_echo "$BOOT_JDK" >&6; }
25491            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25492$as_echo_n "checking Boot JDK version... " >&6; }
25493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25495$as_echo "$BOOT_JDK_VERSION" >&6; }
25496          fi # end check jdk version
25497        fi # end check javac
25498      fi # end check java
25499    fi # end check boot jdk found
25500  fi
25501
25502
25503  # If we haven't found anything yet, we've truly lost. Give up.
25504  if test "x$BOOT_JDK_FOUND" = xno; then
25505
25506  # Print a helpful message on how to acquire the necessary build dependency.
25507  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25508  MISSING_DEPENDENCY=openjdk
25509
25510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511    cygwin_help $MISSING_DEPENDENCY
25512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25513    msys_help $MISSING_DEPENDENCY
25514  else
25515    PKGHANDLER_COMMAND=
25516
25517    case $PKGHANDLER in
25518      apt-get)
25519        apt_help     $MISSING_DEPENDENCY ;;
25520      yum)
25521        yum_help     $MISSING_DEPENDENCY ;;
25522      port)
25523        port_help    $MISSING_DEPENDENCY ;;
25524      pkgutil)
25525        pkgutil_help $MISSING_DEPENDENCY ;;
25526      pkgadd)
25527        pkgadd_help  $MISSING_DEPENDENCY ;;
25528    esac
25529
25530    if test "x$PKGHANDLER_COMMAND" != x; then
25531      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25532    fi
25533  fi
25534
25535    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25536$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25537    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25538$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25539    as_fn_error $? "Cannot continue" "$LINENO" 5
25540  fi
25541
25542
25543
25544  # Setup tools from the Boot JDK.
25545
25546  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25547
25548  # Publish this variable in the help.
25549
25550
25551  if test "x$JAVA" = x; then
25552    # The variable is not set by user, try to locate tool using the code snippet
25553
25554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25555$as_echo_n "checking for java in Boot JDK... " >&6; }
25556      JAVA=$BOOT_JDK/bin/java
25557      if test ! -x $JAVA; then
25558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25559$as_echo "not found" >&6; }
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25561$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25562        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25563      fi
25564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25565$as_echo "ok" >&6; }
25566
25567
25568  else
25569    # The variable is set, but is it from the command line or the environment?
25570
25571    # Try to remove the string !JAVA! from our list.
25572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25574      # If it failed, the variable was not from the command line. Ignore it,
25575      # but warn the user (except for BASH, which is always set by the calling BASH).
25576      if test "xJAVA" != xBASH; then
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25578$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25579      fi
25580      # Try to locate tool using the code snippet
25581
25582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25583$as_echo_n "checking for java in Boot JDK... " >&6; }
25584      JAVA=$BOOT_JDK/bin/java
25585      if test ! -x $JAVA; then
25586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25587$as_echo "not found" >&6; }
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25589$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25590        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25591      fi
25592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25593$as_echo "ok" >&6; }
25594
25595
25596    else
25597      # If it succeeded, then it was overridden by the user. We will use it
25598      # for the tool.
25599
25600      # First remove it from the list of overridden variables, so we can test
25601      # for unknown variables in the end.
25602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25603
25604      # Check if the provided tool contains a complete path.
25605      tool_specified="$JAVA"
25606      tool_basename="${tool_specified##*/}"
25607      if test "x$tool_basename" = "x$tool_specified"; then
25608        # A command without a complete path is provided, search $PATH.
25609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25610$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25611        # Extract the first word of "$tool_basename", so it can be a program name with args.
25612set dummy $tool_basename; ac_word=$2
25613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25614$as_echo_n "checking for $ac_word... " >&6; }
25615if ${ac_cv_path_JAVA+:} false; then :
25616  $as_echo_n "(cached) " >&6
25617else
25618  case $JAVA in
25619  [\\/]* | ?:[\\/]*)
25620  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25621  ;;
25622  *)
25623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25624for as_dir in $PATH
25625do
25626  IFS=$as_save_IFS
25627  test -z "$as_dir" && as_dir=.
25628    for ac_exec_ext in '' $ac_executable_extensions; do
25629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25630    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25632    break 2
25633  fi
25634done
25635  done
25636IFS=$as_save_IFS
25637
25638  ;;
25639esac
25640fi
25641JAVA=$ac_cv_path_JAVA
25642if test -n "$JAVA"; then
25643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25644$as_echo "$JAVA" >&6; }
25645else
25646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25647$as_echo "no" >&6; }
25648fi
25649
25650
25651        if test "x$JAVA" = x; then
25652          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25653        fi
25654      else
25655        # Otherwise we believe it is a complete path. Use it as it is.
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25657$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25659$as_echo_n "checking for JAVA... " >&6; }
25660        if test ! -x "$tool_specified"; then
25661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25662$as_echo "not found" >&6; }
25663          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25664        fi
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25666$as_echo "$tool_specified" >&6; }
25667      fi
25668    fi
25669  fi
25670
25671
25672
25673  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25674
25675  # Publish this variable in the help.
25676
25677
25678  if test "x$JAVAC" = x; then
25679    # The variable is not set by user, try to locate tool using the code snippet
25680
25681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25682$as_echo_n "checking for javac in Boot JDK... " >&6; }
25683      JAVAC=$BOOT_JDK/bin/javac
25684      if test ! -x $JAVAC; then
25685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25686$as_echo "not found" >&6; }
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25688$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25689        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25690      fi
25691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25692$as_echo "ok" >&6; }
25693
25694
25695  else
25696    # The variable is set, but is it from the command line or the environment?
25697
25698    # Try to remove the string !JAVAC! from our list.
25699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25701      # If it failed, the variable was not from the command line. Ignore it,
25702      # but warn the user (except for BASH, which is always set by the calling BASH).
25703      if test "xJAVAC" != xBASH; then
25704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25705$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25706      fi
25707      # Try to locate tool using the code snippet
25708
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25710$as_echo_n "checking for javac in Boot JDK... " >&6; }
25711      JAVAC=$BOOT_JDK/bin/javac
25712      if test ! -x $JAVAC; then
25713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25714$as_echo "not found" >&6; }
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25716$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25717        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25718      fi
25719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25720$as_echo "ok" >&6; }
25721
25722
25723    else
25724      # If it succeeded, then it was overridden by the user. We will use it
25725      # for the tool.
25726
25727      # First remove it from the list of overridden variables, so we can test
25728      # for unknown variables in the end.
25729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25730
25731      # Check if the provided tool contains a complete path.
25732      tool_specified="$JAVAC"
25733      tool_basename="${tool_specified##*/}"
25734      if test "x$tool_basename" = "x$tool_specified"; then
25735        # A command without a complete path is provided, search $PATH.
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25737$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25738        # Extract the first word of "$tool_basename", so it can be a program name with args.
25739set dummy $tool_basename; ac_word=$2
25740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25741$as_echo_n "checking for $ac_word... " >&6; }
25742if ${ac_cv_path_JAVAC+:} false; then :
25743  $as_echo_n "(cached) " >&6
25744else
25745  case $JAVAC in
25746  [\\/]* | ?:[\\/]*)
25747  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25748  ;;
25749  *)
25750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25751for as_dir in $PATH
25752do
25753  IFS=$as_save_IFS
25754  test -z "$as_dir" && as_dir=.
25755    for ac_exec_ext in '' $ac_executable_extensions; do
25756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25757    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25759    break 2
25760  fi
25761done
25762  done
25763IFS=$as_save_IFS
25764
25765  ;;
25766esac
25767fi
25768JAVAC=$ac_cv_path_JAVAC
25769if test -n "$JAVAC"; then
25770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25771$as_echo "$JAVAC" >&6; }
25772else
25773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25774$as_echo "no" >&6; }
25775fi
25776
25777
25778        if test "x$JAVAC" = x; then
25779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25780        fi
25781      else
25782        # Otherwise we believe it is a complete path. Use it as it is.
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25784$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25786$as_echo_n "checking for JAVAC... " >&6; }
25787        if test ! -x "$tool_specified"; then
25788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25789$as_echo "not found" >&6; }
25790          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25791        fi
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25793$as_echo "$tool_specified" >&6; }
25794      fi
25795    fi
25796  fi
25797
25798
25799
25800  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25801
25802  # Publish this variable in the help.
25803
25804
25805  if test "x$JAVAH" = x; then
25806    # The variable is not set by user, try to locate tool using the code snippet
25807
25808      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25809$as_echo_n "checking for javah in Boot JDK... " >&6; }
25810      JAVAH=$BOOT_JDK/bin/javah
25811      if test ! -x $JAVAH; then
25812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25813$as_echo "not found" >&6; }
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25815$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25816        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25817      fi
25818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25819$as_echo "ok" >&6; }
25820
25821
25822  else
25823    # The variable is set, but is it from the command line or the environment?
25824
25825    # Try to remove the string !JAVAH! from our list.
25826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25828      # If it failed, the variable was not from the command line. Ignore it,
25829      # but warn the user (except for BASH, which is always set by the calling BASH).
25830      if test "xJAVAH" != xBASH; then
25831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25832$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25833      fi
25834      # Try to locate tool using the code snippet
25835
25836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25837$as_echo_n "checking for javah in Boot JDK... " >&6; }
25838      JAVAH=$BOOT_JDK/bin/javah
25839      if test ! -x $JAVAH; then
25840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25841$as_echo "not found" >&6; }
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25843$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25844        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25845      fi
25846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25847$as_echo "ok" >&6; }
25848
25849
25850    else
25851      # If it succeeded, then it was overridden by the user. We will use it
25852      # for the tool.
25853
25854      # First remove it from the list of overridden variables, so we can test
25855      # for unknown variables in the end.
25856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25857
25858      # Check if the provided tool contains a complete path.
25859      tool_specified="$JAVAH"
25860      tool_basename="${tool_specified##*/}"
25861      if test "x$tool_basename" = "x$tool_specified"; then
25862        # A command without a complete path is provided, search $PATH.
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25864$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25865        # Extract the first word of "$tool_basename", so it can be a program name with args.
25866set dummy $tool_basename; ac_word=$2
25867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25868$as_echo_n "checking for $ac_word... " >&6; }
25869if ${ac_cv_path_JAVAH+:} false; then :
25870  $as_echo_n "(cached) " >&6
25871else
25872  case $JAVAH in
25873  [\\/]* | ?:[\\/]*)
25874  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25875  ;;
25876  *)
25877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25878for as_dir in $PATH
25879do
25880  IFS=$as_save_IFS
25881  test -z "$as_dir" && as_dir=.
25882    for ac_exec_ext in '' $ac_executable_extensions; do
25883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25884    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25886    break 2
25887  fi
25888done
25889  done
25890IFS=$as_save_IFS
25891
25892  ;;
25893esac
25894fi
25895JAVAH=$ac_cv_path_JAVAH
25896if test -n "$JAVAH"; then
25897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25898$as_echo "$JAVAH" >&6; }
25899else
25900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25901$as_echo "no" >&6; }
25902fi
25903
25904
25905        if test "x$JAVAH" = x; then
25906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25907        fi
25908      else
25909        # Otherwise we believe it is a complete path. Use it as it is.
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25911$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25913$as_echo_n "checking for JAVAH... " >&6; }
25914        if test ! -x "$tool_specified"; then
25915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25916$as_echo "not found" >&6; }
25917          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25918        fi
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25920$as_echo "$tool_specified" >&6; }
25921      fi
25922    fi
25923  fi
25924
25925
25926
25927  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25928
25929  # Publish this variable in the help.
25930
25931
25932  if test "x$JAR" = x; then
25933    # The variable is not set by user, try to locate tool using the code snippet
25934
25935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25936$as_echo_n "checking for jar in Boot JDK... " >&6; }
25937      JAR=$BOOT_JDK/bin/jar
25938      if test ! -x $JAR; then
25939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25940$as_echo "not found" >&6; }
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25942$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25943        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25944      fi
25945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25946$as_echo "ok" >&6; }
25947
25948
25949  else
25950    # The variable is set, but is it from the command line or the environment?
25951
25952    # Try to remove the string !JAR! from our list.
25953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25955      # If it failed, the variable was not from the command line. Ignore it,
25956      # but warn the user (except for BASH, which is always set by the calling BASH).
25957      if test "xJAR" != xBASH; then
25958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25959$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25960      fi
25961      # Try to locate tool using the code snippet
25962
25963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25964$as_echo_n "checking for jar in Boot JDK... " >&6; }
25965      JAR=$BOOT_JDK/bin/jar
25966      if test ! -x $JAR; then
25967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25968$as_echo "not found" >&6; }
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25970$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25971        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25972      fi
25973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25974$as_echo "ok" >&6; }
25975
25976
25977    else
25978      # If it succeeded, then it was overridden by the user. We will use it
25979      # for the tool.
25980
25981      # First remove it from the list of overridden variables, so we can test
25982      # for unknown variables in the end.
25983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25984
25985      # Check if the provided tool contains a complete path.
25986      tool_specified="$JAR"
25987      tool_basename="${tool_specified##*/}"
25988      if test "x$tool_basename" = "x$tool_specified"; then
25989        # A command without a complete path is provided, search $PATH.
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25991$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25992        # Extract the first word of "$tool_basename", so it can be a program name with args.
25993set dummy $tool_basename; ac_word=$2
25994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25995$as_echo_n "checking for $ac_word... " >&6; }
25996if ${ac_cv_path_JAR+:} false; then :
25997  $as_echo_n "(cached) " >&6
25998else
25999  case $JAR in
26000  [\\/]* | ?:[\\/]*)
26001  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26002  ;;
26003  *)
26004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26005for as_dir in $PATH
26006do
26007  IFS=$as_save_IFS
26008  test -z "$as_dir" && as_dir=.
26009    for ac_exec_ext in '' $ac_executable_extensions; do
26010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26011    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26013    break 2
26014  fi
26015done
26016  done
26017IFS=$as_save_IFS
26018
26019  ;;
26020esac
26021fi
26022JAR=$ac_cv_path_JAR
26023if test -n "$JAR"; then
26024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26025$as_echo "$JAR" >&6; }
26026else
26027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26028$as_echo "no" >&6; }
26029fi
26030
26031
26032        if test "x$JAR" = x; then
26033          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26034        fi
26035      else
26036        # Otherwise we believe it is a complete path. Use it as it is.
26037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26038$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26040$as_echo_n "checking for JAR... " >&6; }
26041        if test ! -x "$tool_specified"; then
26042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26043$as_echo "not found" >&6; }
26044          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26045        fi
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26047$as_echo "$tool_specified" >&6; }
26048      fi
26049    fi
26050  fi
26051
26052
26053
26054  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26055
26056  # Publish this variable in the help.
26057
26058
26059  if test "x$JARSIGNER" = x; then
26060    # The variable is not set by user, try to locate tool using the code snippet
26061
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26063$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26064      JARSIGNER=$BOOT_JDK/bin/jarsigner
26065      if test ! -x $JARSIGNER; then
26066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26067$as_echo "not found" >&6; }
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26069$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26070        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26071      fi
26072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26073$as_echo "ok" >&6; }
26074
26075
26076  else
26077    # The variable is set, but is it from the command line or the environment?
26078
26079    # Try to remove the string !JARSIGNER! from our list.
26080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26082      # If it failed, the variable was not from the command line. Ignore it,
26083      # but warn the user (except for BASH, which is always set by the calling BASH).
26084      if test "xJARSIGNER" != xBASH; then
26085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26086$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26087      fi
26088      # Try to locate tool using the code snippet
26089
26090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26091$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26092      JARSIGNER=$BOOT_JDK/bin/jarsigner
26093      if test ! -x $JARSIGNER; then
26094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26095$as_echo "not found" >&6; }
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26097$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26098        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26099      fi
26100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26101$as_echo "ok" >&6; }
26102
26103
26104    else
26105      # If it succeeded, then it was overridden by the user. We will use it
26106      # for the tool.
26107
26108      # First remove it from the list of overridden variables, so we can test
26109      # for unknown variables in the end.
26110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26111
26112      # Check if the provided tool contains a complete path.
26113      tool_specified="$JARSIGNER"
26114      tool_basename="${tool_specified##*/}"
26115      if test "x$tool_basename" = "x$tool_specified"; then
26116        # A command without a complete path is provided, search $PATH.
26117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26118$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26119        # Extract the first word of "$tool_basename", so it can be a program name with args.
26120set dummy $tool_basename; ac_word=$2
26121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26122$as_echo_n "checking for $ac_word... " >&6; }
26123if ${ac_cv_path_JARSIGNER+:} false; then :
26124  $as_echo_n "(cached) " >&6
26125else
26126  case $JARSIGNER in
26127  [\\/]* | ?:[\\/]*)
26128  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26129  ;;
26130  *)
26131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26132for as_dir in $PATH
26133do
26134  IFS=$as_save_IFS
26135  test -z "$as_dir" && as_dir=.
26136    for ac_exec_ext in '' $ac_executable_extensions; do
26137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26138    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26140    break 2
26141  fi
26142done
26143  done
26144IFS=$as_save_IFS
26145
26146  ;;
26147esac
26148fi
26149JARSIGNER=$ac_cv_path_JARSIGNER
26150if test -n "$JARSIGNER"; then
26151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26152$as_echo "$JARSIGNER" >&6; }
26153else
26154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26155$as_echo "no" >&6; }
26156fi
26157
26158
26159        if test "x$JARSIGNER" = x; then
26160          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26161        fi
26162      else
26163        # Otherwise we believe it is a complete path. Use it as it is.
26164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26165$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26167$as_echo_n "checking for JARSIGNER... " >&6; }
26168        if test ! -x "$tool_specified"; then
26169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26170$as_echo "not found" >&6; }
26171          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26172        fi
26173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26174$as_echo "$tool_specified" >&6; }
26175      fi
26176    fi
26177  fi
26178
26179
26180
26181  # Finally, set some other options...
26182
26183  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26184  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26185
26186
26187
26188
26189###############################################################################
26190#
26191# Configure the sources to use. We can add or override individual directories.
26192#
26193###############################################################################
26194
26195
26196  # Where are the sources. Any of these can be overridden
26197  # using --with-override-corba and the likes.
26198  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26199  CORBA_TOPDIR="$SRC_ROOT/corba"
26200  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26201  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26202  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26203  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26204  JDK_TOPDIR="$SRC_ROOT/jdk"
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215  ###############################################################################
26216  #
26217  # Pickup additional source for a component from outside of the source root
26218  # or override source for a component.
26219  #
26220
26221# Check whether --with-add-source-root was given.
26222if test "${with_add_source_root+set}" = set; then :
26223  withval=$with_add_source_root;
26224fi
26225
26226
26227
26228# Check whether --with-override-source-root was given.
26229if test "${with_override_source_root+set}" = set; then :
26230  withval=$with_override_source_root;
26231fi
26232
26233
26234
26235# Check whether --with-adds-and-overrides was given.
26236if test "${with_adds_and_overrides+set}" = set; then :
26237  withval=$with_adds_and_overrides;
26238fi
26239
26240
26241  if test "x$with_adds_and_overrides" != x; then
26242    with_add_source_root="$with_adds_and_overrides/adds"
26243    with_override_source_root="$with_adds_and_overrides/overrides"
26244  fi
26245
26246  if test "x$with_add_source_root" != x; then
26247    if ! test -d $with_add_source_root; then
26248      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26249    fi
26250    CURDIR="$PWD"
26251    cd "$with_add_source_root"
26252    ADD_SRC_ROOT="`pwd`"
26253    cd "$CURDIR"
26254    # Verify that the addon source root does not have any root makefiles.
26255    # If it does, then it is usually an error, prevent this.
26256    if test -f $with_add_source_root/langtools/make/Makefile; then
26257      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26258    fi
26259    if test -f $with_add_source_root/corba/make/Makefile; then
26260      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26261    fi
26262    if test -f $with_add_source_root/jaxp/make/Makefile; then
26263      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26264    fi
26265    if test -f $with_add_source_root/jaxws/make/Makefile; then
26266      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26267    fi
26268    if test -f $with_add_source_root/hotspot/make/Makefile; then
26269      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26270    fi
26271    if test -f $with_add_source_root/nashorn/make/Makefile; then
26272      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26273    fi
26274    if test -f $with_add_source_root/jdk/make/Makefile; then
26275      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26276    fi
26277  fi
26278
26279
26280  if test "x$with_override_source_root" != x; then
26281    if ! test -d $with_override_source_root; then
26282      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26283    fi
26284    CURDIR="$PWD"
26285    cd "$with_override_source_root"
26286    OVERRIDE_SRC_ROOT="`pwd`"
26287    cd "$CURDIR"
26288    if test -f $with_override_source_root/langtools/make/Makefile; then
26289      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26290    fi
26291    if test -f $with_override_source_root/corba/make/Makefile; then
26292      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26293    fi
26294    if test -f $with_override_source_root/jaxp/make/Makefile; then
26295      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26296    fi
26297    if test -f $with_override_source_root/jaxws/make/Makefile; then
26298      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26299    fi
26300    if test -f $with_override_source_root/hotspot/make/Makefile; then
26301      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26302    fi
26303    if test -f $with_override_source_root/nashorn/make/Makefile; then
26304      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26305    fi
26306    if test -f $with_override_source_root/jdk/make/Makefile; then
26307      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26308    fi
26309  fi
26310
26311
26312  ###############################################################################
26313  #
26314  # Override a repo completely, this is used for example when you have 3 small
26315  # development sandboxes of the langtools sources and want to avoid having 3 full
26316  # OpenJDK sources checked out on disk.
26317  #
26318  # Assuming that the 3 langtools sandboxes are located here:
26319  # /home/fredrik/sandbox1/langtools
26320  # /home/fredrik/sandbox2/langtools
26321  # /home/fredrik/sandbox3/langtools
26322  #
26323  # From the source root you create build subdirs manually:
26324  #     mkdir -p build1 build2 build3
26325  # in each build directory run:
26326  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26327  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26328  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26329  #
26330
26331
26332# Check whether --with-override-langtools was given.
26333if test "${with_override_langtools+set}" = set; then :
26334  withval=$with_override_langtools;
26335fi
26336
26337
26338
26339# Check whether --with-override-corba was given.
26340if test "${with_override_corba+set}" = set; then :
26341  withval=$with_override_corba;
26342fi
26343
26344
26345
26346# Check whether --with-override-jaxp was given.
26347if test "${with_override_jaxp+set}" = set; then :
26348  withval=$with_override_jaxp;
26349fi
26350
26351
26352
26353# Check whether --with-override-jaxws was given.
26354if test "${with_override_jaxws+set}" = set; then :
26355  withval=$with_override_jaxws;
26356fi
26357
26358
26359
26360# Check whether --with-override-hotspot was given.
26361if test "${with_override_hotspot+set}" = set; then :
26362  withval=$with_override_hotspot;
26363fi
26364
26365
26366
26367# Check whether --with-override-nashorn was given.
26368if test "${with_override_nashorn+set}" = set; then :
26369  withval=$with_override_nashorn;
26370fi
26371
26372
26373
26374# Check whether --with-override-jdk was given.
26375if test "${with_override_jdk+set}" = set; then :
26376  withval=$with_override_jdk;
26377fi
26378
26379
26380  if test "x$with_override_langtools" != x; then
26381    CURDIR="$PWD"
26382    cd "$with_override_langtools"
26383    LANGTOOLS_TOPDIR="`pwd`"
26384    cd "$CURDIR"
26385    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26386      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26387    fi
26388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26389$as_echo_n "checking if langtools should be overridden... " >&6; }
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26391$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26392  fi
26393  if test "x$with_override_corba" != x; then
26394    CURDIR="$PWD"
26395    cd "$with_override_corba"
26396    CORBA_TOPDIR="`pwd`"
26397    cd "$CURDIR"
26398    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26399      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26400    fi
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26402$as_echo_n "checking if corba should be overridden... " >&6; }
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26404$as_echo "yes with $CORBA_TOPDIR" >&6; }
26405  fi
26406  if test "x$with_override_jaxp" != x; then
26407    CURDIR="$PWD"
26408    cd "$with_override_jaxp"
26409    JAXP_TOPDIR="`pwd`"
26410    cd "$CURDIR"
26411    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26412      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26413    fi
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26415$as_echo_n "checking if jaxp should be overridden... " >&6; }
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26417$as_echo "yes with $JAXP_TOPDIR" >&6; }
26418  fi
26419  if test "x$with_override_jaxws" != x; then
26420    CURDIR="$PWD"
26421    cd "$with_override_jaxws"
26422    JAXWS_TOPDIR="`pwd`"
26423    cd "$CURDIR"
26424    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26425      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26426    fi
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26428$as_echo_n "checking if jaxws should be overridden... " >&6; }
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26430$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26431  fi
26432  if test "x$with_override_hotspot" != x; then
26433    CURDIR="$PWD"
26434    cd "$with_override_hotspot"
26435    HOTSPOT_TOPDIR="`pwd`"
26436    cd "$CURDIR"
26437    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26438      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26439    fi
26440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26441$as_echo_n "checking if hotspot should be overridden... " >&6; }
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26443$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26444  fi
26445  if test "x$with_override_nashorn" != x; then
26446    CURDIR="$PWD"
26447    cd "$with_override_nashorn"
26448    NASHORN_TOPDIR="`pwd`"
26449    cd "$CURDIR"
26450    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26451      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26452    fi
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26454$as_echo_n "checking if nashorn should be overridden... " >&6; }
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26456$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26457  fi
26458  if test "x$with_override_jdk" != x; then
26459    CURDIR="$PWD"
26460    cd "$with_override_jdk"
26461    JDK_TOPDIR="`pwd`"
26462    cd "$CURDIR"
26463    if ! test -f $JDK_TOPDIR/make/Makefile; then
26464      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26465    fi
26466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26467$as_echo_n "checking if JDK should be overridden... " >&6; }
26468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26469$as_echo "yes with $JDK_TOPDIR" >&6; }
26470  fi
26471
26472
26473  BUILD_OUTPUT="$OUTPUT_ROOT"
26474
26475
26476  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26477  BUILD_HOTSPOT=true
26478
26479
26480
26481# Check whether --with-import-hotspot was given.
26482if test "${with_import_hotspot+set}" = set; then :
26483  withval=$with_import_hotspot;
26484fi
26485
26486  if test "x$with_import_hotspot" != x; then
26487    CURDIR="$PWD"
26488    cd "$with_import_hotspot"
26489    HOTSPOT_DIST="`pwd`"
26490    cd "$CURDIR"
26491    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26492      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26493    fi
26494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26495$as_echo_n "checking if hotspot should be imported... " >&6; }
26496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26497$as_echo "yes from $HOTSPOT_DIST" >&6; }
26498    BUILD_HOTSPOT=false
26499  fi
26500
26501  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26502
26503
26504###############################################################################
26505#
26506# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26507# native code.
26508#
26509###############################################################################
26510
26511# First determine the toolchain type (compiler family)
26512
26513
26514# Check whether --with-toolchain-type was given.
26515if test "${with_toolchain_type+set}" = set; then :
26516  withval=$with_toolchain_type;
26517fi
26518
26519
26520  # Use indirect variable referencing
26521  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26522  VALID_TOOLCHAINS=${!toolchain_var_name}
26523
26524  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26525    if test -n "$XCODEBUILD"; then
26526      # On Mac OS X, default toolchain to clang after Xcode 5
26527      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26528      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26529      if test $? -ne 0; then
26530        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26531      fi
26532      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26533          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26534          $CUT -f 1 -d .`
26535      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26536$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26537      if test $XCODE_MAJOR_VERSION -ge 5; then
26538          DEFAULT_TOOLCHAIN="clang"
26539      else
26540          DEFAULT_TOOLCHAIN="gcc"
26541      fi
26542    else
26543      # If Xcode is not installed, but the command line tools are
26544      # then we can't run xcodebuild. On these systems we should
26545      # default to clang
26546      DEFAULT_TOOLCHAIN="clang"
26547    fi
26548  else
26549    # First toolchain type in the list is the default
26550    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26551  fi
26552
26553  if test "x$with_toolchain_type" = xlist; then
26554    # List all toolchains
26555    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26556$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26557    for toolchain in $VALID_TOOLCHAINS; do
26558      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26559      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26560      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26561    done
26562
26563    exit 0
26564  elif test "x$with_toolchain_type" != x; then
26565    # User override; check that it is valid
26566    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26567      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26568$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26569      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26570$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26571      as_fn_error $? "Cannot continue." "$LINENO" 5
26572    fi
26573    TOOLCHAIN_TYPE=$with_toolchain_type
26574  else
26575    # No flag given, use default
26576    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26577  fi
26578
26579
26580  TOOLCHAIN_CC_BINARY_clang="clang"
26581  TOOLCHAIN_CC_BINARY_gcc="gcc"
26582  TOOLCHAIN_CC_BINARY_microsoft="cl"
26583  TOOLCHAIN_CC_BINARY_solstudio="cc"
26584  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26585
26586  TOOLCHAIN_CXX_BINARY_clang="clang++"
26587  TOOLCHAIN_CXX_BINARY_gcc="g++"
26588  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26589  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26590  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26591
26592  # Use indirect variable referencing
26593  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26594  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26595  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26596  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26597  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26598  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26599
26600
26601  # Define filename patterns
26602  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26603    LIBRARY_PREFIX=
26604    SHARED_LIBRARY_SUFFIX='.dll'
26605    STATIC_LIBRARY_SUFFIX='.lib'
26606    SHARED_LIBRARY='$1.dll'
26607    STATIC_LIBRARY='$1.lib'
26608    OBJ_SUFFIX='.obj'
26609    EXE_SUFFIX='.exe'
26610  else
26611    LIBRARY_PREFIX=lib
26612    SHARED_LIBRARY_SUFFIX='.so'
26613    STATIC_LIBRARY_SUFFIX='.a'
26614    SHARED_LIBRARY='lib$1.so'
26615    STATIC_LIBRARY='lib$1.a'
26616    OBJ_SUFFIX='.o'
26617    EXE_SUFFIX=''
26618    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26619      SHARED_LIBRARY='lib$1.dylib'
26620      SHARED_LIBRARY_SUFFIX='.dylib'
26621    fi
26622  fi
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26635$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26636  else
26637    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26638$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26639  fi
26640
26641
26642# Then detect the actual binaries needed
26643
26644  # FIXME: Is this needed?
26645  ac_ext=cpp
26646ac_cpp='$CXXCPP $CPPFLAGS'
26647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26650
26651
26652  # Store the CFLAGS etc passed to the configure script.
26653  ORG_CFLAGS="$CFLAGS"
26654  ORG_CXXFLAGS="$CXXFLAGS"
26655
26656  # autoconf magic only relies on PATH, so update it if tools dir is specified
26657  OLD_PATH="$PATH"
26658
26659  # On Windows, we need to detect the visual studio installation first.
26660  # This will change the PATH, but we need to keep that new PATH even
26661  # after toolchain detection is done, since the compiler (on x86) uses
26662  # it for DLL resolution in runtime.
26663  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26664      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26665
26666  # Store path to cygwin link.exe to help excluding it when searching for
26667  # VS linker. This must be done before changing the PATH when looking for VS.
26668  # Extract the first word of "link", so it can be a program name with args.
26669set dummy link; ac_word=$2
26670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26671$as_echo_n "checking for $ac_word... " >&6; }
26672if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26673  $as_echo_n "(cached) " >&6
26674else
26675  case $CYGWIN_LINK in
26676  [\\/]* | ?:[\\/]*)
26677  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26678  ;;
26679  *)
26680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26681for as_dir in $PATH
26682do
26683  IFS=$as_save_IFS
26684  test -z "$as_dir" && as_dir=.
26685    for ac_exec_ext in '' $ac_executable_extensions; do
26686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26687    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26689    break 2
26690  fi
26691done
26692  done
26693IFS=$as_save_IFS
26694
26695  ;;
26696esac
26697fi
26698CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26699if test -n "$CYGWIN_LINK"; then
26700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26701$as_echo "$CYGWIN_LINK" >&6; }
26702else
26703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26704$as_echo "no" >&6; }
26705fi
26706
26707
26708  if test "x$CYGWIN_LINK" != x; then
26709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26710$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26711    "$CYGWIN_LINK" --version > /dev/null
26712    if test $? -eq 0 ; then
26713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26714$as_echo "yes" >&6; }
26715    else
26716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26717$as_echo "no" >&6; }
26718      # This might be the VS linker. Don't exclude it later on.
26719      CYGWIN_LINK=""
26720    fi
26721  fi
26722
26723  # First-hand choice is to locate and run the vsvars bat file.
26724
26725
26726# Check whether --with-toolchain-version was given.
26727if test "${with_toolchain_version+set}" = set; then :
26728  withval=$with_toolchain_version;
26729fi
26730
26731
26732  if test "x$with_toolchain_version" = xlist; then
26733    # List all toolchains
26734    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26735$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26736    for version in $VALID_VS_VERSIONS; do
26737      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26738      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26739    done
26740
26741    exit 0
26742  elif test "x$DEVKIT_VS_VERSION" != x; then
26743    VS_VERSION=$DEVKIT_VS_VERSION
26744    TOOLCHAIN_VERSION=$VS_VERSION
26745    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26746    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26747    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26748    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26749    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26750    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26751
26752    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26753    # can still be exported as INCLUDE for compiler invocations without
26754    # SYSROOT_CFLAGS
26755    OLDIFS="$IFS"
26756    IFS=";"
26757    for i in $DEVKIT_VS_INCLUDE; do
26758      ipath=$i
26759
26760  unix_path="$ipath"
26761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26762    windows_path=`$CYGPATH -m "$unix_path"`
26763    ipath="$windows_path"
26764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26765    windows_path=`cmd //c echo $unix_path`
26766    ipath="$windows_path"
26767  fi
26768
26769      VS_INCLUDE="$VS_INCLUDE;$ipath"
26770    done
26771    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26772    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26773    for i in $DEVKIT_VS_LIB; do
26774      libpath=$i
26775
26776  unix_path="$libpath"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    windows_path=`$CYGPATH -m "$unix_path"`
26779    libpath="$windows_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    windows_path=`cmd //c echo $unix_path`
26782    libpath="$windows_path"
26783  fi
26784
26785      VS_LIB="$VS_LIB;$libpath"
26786    done
26787    IFS="$OLDIFS"
26788
26789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26790$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26791
26792  elif test "x$with_toolchain_version" != x; then
26793    # User override; check that it is valid
26794    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26795      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26796$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26797      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26798$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26799      as_fn_error $? "Cannot continue." "$LINENO" 5
26800    fi
26801    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26802  else
26803    # No flag given, use default
26804    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26805  fi
26806
26807  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26808
26809  VS_VERSION="$VS_VERSION"
26810  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26811  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26812  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26813  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26814
26815  # When using --with-tools-dir, assume it points to the correct and default
26816  # version of Visual Studio or that --with-toolchain-version was also set.
26817  if test "x$with_tools_dir" != x; then
26818
26819  if test "x$VS_ENV_CMD" = x; then
26820    VS_VERSION="${VS_VERSION}"
26821    VS_BASE="$with_tools_dir/../.."
26822    METHOD="--with-tools-dir"
26823
26824    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26825      VCVARSFILE="vc/bin/vcvars32.bat"
26826    else
26827      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26828    fi
26829
26830
26831  windows_path="$VS_BASE"
26832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26833    unix_path=`$CYGPATH -u "$windows_path"`
26834    VS_BASE="$unix_path"
26835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26837    VS_BASE="$unix_path"
26838  fi
26839
26840    if test -d "$VS_BASE"; then
26841      if test -f "$VS_BASE/$VCVARSFILE"; then
26842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26843$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26844        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26845        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26846        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26847        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26848      else
26849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26850$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26852$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26853      fi
26854    fi
26855  fi
26856
26857
26858  if test "x$VS_ENV_CMD" = x; then
26859    VS_VERSION="${VS_VERSION}"
26860    VS_BASE="$with_tools_dir/../../.."
26861    METHOD="--with-tools-dir"
26862
26863    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26864      VCVARSFILE="vc/bin/vcvars32.bat"
26865    else
26866      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26867    fi
26868
26869
26870  windows_path="$VS_BASE"
26871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26872    unix_path=`$CYGPATH -u "$windows_path"`
26873    VS_BASE="$unix_path"
26874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26876    VS_BASE="$unix_path"
26877  fi
26878
26879    if test -d "$VS_BASE"; then
26880      if test -f "$VS_BASE/$VCVARSFILE"; then
26881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26882$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26883        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26886        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26887      else
26888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26892      fi
26893    fi
26894  fi
26895
26896    if test "x$VS_ENV_CMD" = x; then
26897      # Having specified an argument which is incorrect will produce an instant failure;
26898      # we should not go on looking
26899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26900$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26901      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26902$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26904$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26905      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26906    fi
26907  fi
26908
26909  VS_ENV_CMD=""
26910  VS_ENV_ARGS=""
26911
26912  if test "x$VS_COMNTOOLS" != x; then
26913
26914  if test "x$VS_ENV_CMD" = x; then
26915    VS_VERSION="${VS_VERSION}"
26916    VS_BASE="$VS_COMNTOOLS/../.."
26917    METHOD="$VS_COMNTOOLS_VAR variable"
26918
26919    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26920      VCVARSFILE="vc/bin/vcvars32.bat"
26921    else
26922      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26923    fi
26924
26925
26926  windows_path="$VS_BASE"
26927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928    unix_path=`$CYGPATH -u "$windows_path"`
26929    VS_BASE="$unix_path"
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26932    VS_BASE="$unix_path"
26933  fi
26934
26935    if test -d "$VS_BASE"; then
26936      if test -f "$VS_BASE/$VCVARSFILE"; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26938$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26939        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26940        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26941        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26942        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26943      else
26944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26945$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26947$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26948      fi
26949    fi
26950  fi
26951
26952  fi
26953  if test "x$PROGRAMFILES" != x; then
26954
26955  if test "x$VS_ENV_CMD" = x; then
26956    VS_VERSION="${VS_VERSION}"
26957    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26958    METHOD="well-known name"
26959
26960    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26961      VCVARSFILE="vc/bin/vcvars32.bat"
26962    else
26963      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26964    fi
26965
26966
26967  windows_path="$VS_BASE"
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969    unix_path=`$CYGPATH -u "$windows_path"`
26970    VS_BASE="$unix_path"
26971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26973    VS_BASE="$unix_path"
26974  fi
26975
26976    if test -d "$VS_BASE"; then
26977      if test -f "$VS_BASE/$VCVARSFILE"; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26980        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26981        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26982        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26983        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26984      else
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26988$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26989      fi
26990    fi
26991  fi
26992
26993  fi
26994  # Work around the insanely named ProgramFiles(x86) env variable
26995  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26996  if test "x$PROGRAMFILES_X86" != x; then
26997
26998  if test "x$VS_ENV_CMD" = x; then
26999    VS_VERSION="${VS_VERSION}"
27000    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27001    METHOD="well-known name"
27002
27003    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27004      VCVARSFILE="vc/bin/vcvars32.bat"
27005    else
27006      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27007    fi
27008
27009
27010  windows_path="$VS_BASE"
27011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27012    unix_path=`$CYGPATH -u "$windows_path"`
27013    VS_BASE="$unix_path"
27014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27016    VS_BASE="$unix_path"
27017  fi
27018
27019    if test -d "$VS_BASE"; then
27020      if test -f "$VS_BASE/$VCVARSFILE"; then
27021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27022$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27023        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27024        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27025        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27026        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27027      else
27028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27029$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27031$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27032      fi
27033    fi
27034  fi
27035
27036  fi
27037
27038  if test "x$VS_ENV_CMD" = x; then
27039    VS_VERSION="${VS_VERSION}"
27040    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27041    METHOD="well-known name"
27042
27043    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27044      VCVARSFILE="vc/bin/vcvars32.bat"
27045    else
27046      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27047    fi
27048
27049
27050  windows_path="$VS_BASE"
27051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27052    unix_path=`$CYGPATH -u "$windows_path"`
27053    VS_BASE="$unix_path"
27054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27056    VS_BASE="$unix_path"
27057  fi
27058
27059    if test -d "$VS_BASE"; then
27060      if test -f "$VS_BASE/$VCVARSFILE"; then
27061        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27062$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27063        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27064        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27065        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27066        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27067      else
27068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27069$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27071$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27072      fi
27073    fi
27074  fi
27075
27076
27077  if test "x$VS_ENV_CMD" = x; then
27078    VS_VERSION="${VS_VERSION}"
27079    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27080    METHOD="well-known name"
27081
27082    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27083      VCVARSFILE="vc/bin/vcvars32.bat"
27084    else
27085      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27086    fi
27087
27088
27089  windows_path="$VS_BASE"
27090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27091    unix_path=`$CYGPATH -u "$windows_path"`
27092    VS_BASE="$unix_path"
27093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27095    VS_BASE="$unix_path"
27096  fi
27097
27098    if test -d "$VS_BASE"; then
27099      if test -f "$VS_BASE/$VCVARSFILE"; then
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27101$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27102        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27103        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27104        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27105        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27106      else
27107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27108$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27110$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27111      fi
27112    fi
27113  fi
27114
27115
27116  if test "x$SDK_INSTALL_DIR" != x; then
27117    if test "x$ProgramW6432" != x; then
27118
27119  if test "x$VS_ENV_CMD" = x; then
27120    VS_VERSION="${VS_VERSION}"
27121    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27122    METHOD="well-known name"
27123
27124  windows_path="$WIN_SDK_BASE"
27125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27126    unix_path=`$CYGPATH -u "$windows_path"`
27127    WIN_SDK_BASE="$unix_path"
27128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27130    WIN_SDK_BASE="$unix_path"
27131  fi
27132
27133    if test -d "$WIN_SDK_BASE"; then
27134      # There have been cases of partial or broken SDK installations. A missing
27135      # lib dir is not going to work.
27136      if test ! -d "$WIN_SDK_BASE/lib"; then
27137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27140$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27141      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27144        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27145        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27146          VS_ENV_ARGS="/x86"
27147        else
27148          VS_ENV_ARGS="/x64"
27149        fi
27150        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27151        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27152        # TODO: improve detection for other versions of SDK
27153        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27154      else
27155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27158$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27159      fi
27160    fi
27161  fi
27162
27163    fi
27164    if test "x$PROGRAMW6432" != x; then
27165
27166  if test "x$VS_ENV_CMD" = x; then
27167    VS_VERSION="${VS_VERSION}"
27168    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27169    METHOD="well-known name"
27170
27171  windows_path="$WIN_SDK_BASE"
27172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27173    unix_path=`$CYGPATH -u "$windows_path"`
27174    WIN_SDK_BASE="$unix_path"
27175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27177    WIN_SDK_BASE="$unix_path"
27178  fi
27179
27180    if test -d "$WIN_SDK_BASE"; then
27181      # There have been cases of partial or broken SDK installations. A missing
27182      # lib dir is not going to work.
27183      if test ! -d "$WIN_SDK_BASE/lib"; then
27184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27187$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27188      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27191        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27192        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27193          VS_ENV_ARGS="/x86"
27194        else
27195          VS_ENV_ARGS="/x64"
27196        fi
27197        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27198        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27199        # TODO: improve detection for other versions of SDK
27200        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27201      else
27202        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27203$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27204        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27205$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27206      fi
27207    fi
27208  fi
27209
27210    fi
27211    if test "x$PROGRAMFILES" != x; then
27212
27213  if test "x$VS_ENV_CMD" = x; then
27214    VS_VERSION="${VS_VERSION}"
27215    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27216    METHOD="well-known name"
27217
27218  windows_path="$WIN_SDK_BASE"
27219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27220    unix_path=`$CYGPATH -u "$windows_path"`
27221    WIN_SDK_BASE="$unix_path"
27222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27224    WIN_SDK_BASE="$unix_path"
27225  fi
27226
27227    if test -d "$WIN_SDK_BASE"; then
27228      # There have been cases of partial or broken SDK installations. A missing
27229      # lib dir is not going to work.
27230      if test ! -d "$WIN_SDK_BASE/lib"; then
27231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27232$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27233        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27234$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27235      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27238        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27239        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27240          VS_ENV_ARGS="/x86"
27241        else
27242          VS_ENV_ARGS="/x64"
27243        fi
27244        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27245        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27246        # TODO: improve detection for other versions of SDK
27247        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27248      else
27249        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27250$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27251        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27252$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27253      fi
27254    fi
27255  fi
27256
27257    fi
27258
27259  if test "x$VS_ENV_CMD" = x; then
27260    VS_VERSION="${VS_VERSION}"
27261    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27262    METHOD="well-known name"
27263
27264  windows_path="$WIN_SDK_BASE"
27265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27266    unix_path=`$CYGPATH -u "$windows_path"`
27267    WIN_SDK_BASE="$unix_path"
27268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27270    WIN_SDK_BASE="$unix_path"
27271  fi
27272
27273    if test -d "$WIN_SDK_BASE"; then
27274      # There have been cases of partial or broken SDK installations. A missing
27275      # lib dir is not going to work.
27276      if test ! -d "$WIN_SDK_BASE/lib"; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27280$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27281      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27283$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27284        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27285        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27286          VS_ENV_ARGS="/x86"
27287        else
27288          VS_ENV_ARGS="/x64"
27289        fi
27290        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27291        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27292        # TODO: improve detection for other versions of SDK
27293        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27294      else
27295        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27296$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27297        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27298$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27299      fi
27300    fi
27301  fi
27302
27303
27304  if test "x$VS_ENV_CMD" = x; then
27305    VS_VERSION="${VS_VERSION}"
27306    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27307    METHOD="well-known name"
27308
27309  windows_path="$WIN_SDK_BASE"
27310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27311    unix_path=`$CYGPATH -u "$windows_path"`
27312    WIN_SDK_BASE="$unix_path"
27313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27315    WIN_SDK_BASE="$unix_path"
27316  fi
27317
27318    if test -d "$WIN_SDK_BASE"; then
27319      # There have been cases of partial or broken SDK installations. A missing
27320      # lib dir is not going to work.
27321      if test ! -d "$WIN_SDK_BASE/lib"; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27323$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27324        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27325$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27326      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27327        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27328$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27329        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27330        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27331          VS_ENV_ARGS="/x86"
27332        else
27333          VS_ENV_ARGS="/x64"
27334        fi
27335        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27336        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27337        # TODO: improve detection for other versions of SDK
27338        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27339      else
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27341$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27342        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27343$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27344      fi
27345    fi
27346  fi
27347
27348  fi
27349
27350    if test "x$VS_ENV_CMD" != x; then
27351      TOOLCHAIN_VERSION=$VS_VERSION
27352      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27353      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27354      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27355      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27356      # The rest of the variables are already evaled while probing
27357      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27358$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27359      break
27360    fi
27361  done
27362
27363
27364  # If we have a devkit, skip all of the below.
27365  if test "x$DEVKIT_VS_VERSION" = x; then
27366    if test "x$VS_ENV_CMD" != x; then
27367      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27368
27369  # Only process if variable expands to non-empty
27370
27371  if test "x$VS_ENV_CMD" != x; then
27372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27373
27374  # First separate the path from the arguments. This will split at the first
27375  # space.
27376  complete="$VS_ENV_CMD"
27377  path="${complete%% *}"
27378  tmp="$complete EOL"
27379  arguments="${tmp#* }"
27380
27381  # Input might be given as Windows format, start by converting to
27382  # unix format.
27383  new_path=`$CYGPATH -u "$path"`
27384
27385  # Now try to locate executable using which
27386  new_path=`$WHICH "$new_path" 2> /dev/null`
27387  # bat and cmd files are not always considered executable in cygwin causing which
27388  # to not find them
27389  if test "x$new_path" = x \
27390      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27391      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27392    new_path=`$CYGPATH -u "$path"`
27393  fi
27394  if test "x$new_path" = x; then
27395    # Oops. Which didn't find the executable.
27396    # The splitting of arguments from the executable at a space might have been incorrect,
27397    # since paths with space are more likely in Windows. Give it another try with the whole
27398    # argument.
27399    path="$complete"
27400    arguments="EOL"
27401    new_path=`$CYGPATH -u "$path"`
27402    new_path=`$WHICH "$new_path" 2> /dev/null`
27403    # bat and cmd files are not always considered executable in cygwin causing which
27404    # to not find them
27405    if test "x$new_path" = x \
27406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27408      new_path=`$CYGPATH -u "$path"`
27409    fi
27410    if test "x$new_path" = x; then
27411      # It's still not found. Now this is an unrecoverable error.
27412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27413$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27414      has_space=`$ECHO "$complete" | $GREP " "`
27415      if test "x$has_space" != x; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27418      fi
27419      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27420    fi
27421  fi
27422
27423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27426  # "foo.exe" is OK but "foo" is an error.
27427  #
27428  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27429  # It is also a way to make sure we got the proper file name for the real test later on.
27430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27431  if test "x$test_shortpath" = x; then
27432    # Short path failed, file does not exist as specified.
27433    # Try adding .exe or .cmd
27434    if test -f "${new_path}.exe"; then
27435      input_to_shortpath="${new_path}.exe"
27436    elif test -f "${new_path}.cmd"; then
27437      input_to_shortpath="${new_path}.cmd"
27438    else
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27440$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27442$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27443      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27444    fi
27445  else
27446    input_to_shortpath="$new_path"
27447  fi
27448
27449  # Call helper function which possibly converts this using DOS-style short mode.
27450  # If so, the updated path is stored in $new_path.
27451  new_path="$input_to_shortpath"
27452
27453  input_path="$input_to_shortpath"
27454  # Check if we need to convert this using DOS-style short mode. If the path
27455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27456  # take no chances and rewrite it.
27457  # Note: m4 eats our [], so we need to use [ and ] instead.
27458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27459  if test "x$has_forbidden_chars" != x; then
27460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27464      # Going to short mode and back again did indeed matter. Since short mode is
27465      # case insensitive, let's make it lowercase to improve readability.
27466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27467      # Now convert it back to Unix-style (cygpath)
27468      input_path=`$CYGPATH -u "$shortmode_path"`
27469      new_path="$input_path"
27470    fi
27471  fi
27472
27473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27474  if test "x$test_cygdrive_prefix" = x; then
27475    # As a simple fix, exclude /usr/bin since it's not a real path.
27476    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27478      # a path prefixed by /cygdrive for fixpath to work.
27479      new_path="$CYGWIN_ROOT_PATH$input_path"
27480    fi
27481  fi
27482
27483  # remove trailing .exe if any
27484  new_path="${new_path/%.exe/}"
27485
27486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27487
27488  # First separate the path from the arguments. This will split at the first
27489  # space.
27490  complete="$VS_ENV_CMD"
27491  path="${complete%% *}"
27492  tmp="$complete EOL"
27493  arguments="${tmp#* }"
27494
27495  # Input might be given as Windows format, start by converting to
27496  # unix format.
27497  new_path="$path"
27498
27499  windows_path="$new_path"
27500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27501    unix_path=`$CYGPATH -u "$windows_path"`
27502    new_path="$unix_path"
27503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27505    new_path="$unix_path"
27506  fi
27507
27508
27509  # Now try to locate executable using which
27510  new_path=`$WHICH "$new_path" 2> /dev/null`
27511
27512  if test "x$new_path" = x; then
27513    # Oops. Which didn't find the executable.
27514    # The splitting of arguments from the executable at a space might have been incorrect,
27515    # since paths with space are more likely in Windows. Give it another try with the whole
27516    # argument.
27517    path="$complete"
27518    arguments="EOL"
27519    new_path="$path"
27520
27521  windows_path="$new_path"
27522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523    unix_path=`$CYGPATH -u "$windows_path"`
27524    new_path="$unix_path"
27525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27527    new_path="$unix_path"
27528  fi
27529
27530
27531    new_path=`$WHICH "$new_path" 2> /dev/null`
27532    # bat and cmd files are not always considered executable in MSYS causing which
27533    # to not find them
27534    if test "x$new_path" = x \
27535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27537      new_path="$path"
27538
27539  windows_path="$new_path"
27540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27541    unix_path=`$CYGPATH -u "$windows_path"`
27542    new_path="$unix_path"
27543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27545    new_path="$unix_path"
27546  fi
27547
27548    fi
27549
27550    if test "x$new_path" = x; then
27551      # It's still not found. Now this is an unrecoverable error.
27552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27553$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27554      has_space=`$ECHO "$complete" | $GREP " "`
27555      if test "x$has_space" != x; then
27556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27558      fi
27559      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27560    fi
27561  fi
27562
27563  # Now new_path has a complete unix path to the binary
27564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27565    # Keep paths in /bin as-is, but remove trailing .exe if any
27566    new_path="${new_path/%.exe/}"
27567    # Do not save /bin paths to all_fixpath_prefixes!
27568  else
27569    # Not in mixed or Windows style, start by that.
27570    new_path=`cmd //c echo $new_path`
27571
27572  input_path="$new_path"
27573  # Check if we need to convert this using DOS-style short mode. If the path
27574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27575  # take no chances and rewrite it.
27576  # Note: m4 eats our [], so we need to use [ and ] instead.
27577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27578  if test "x$has_forbidden_chars" != x; then
27579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27581  fi
27582
27583    # Output is in $new_path
27584
27585  windows_path="$new_path"
27586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27587    unix_path=`$CYGPATH -u "$windows_path"`
27588    new_path="$unix_path"
27589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27591    new_path="$unix_path"
27592  fi
27593
27594    # remove trailing .exe if any
27595    new_path="${new_path/%.exe/}"
27596
27597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27599  fi
27600
27601    else
27602      # We're on a unix platform. Hooray! :)
27603      # First separate the path from the arguments. This will split at the first
27604      # space.
27605      complete="$VS_ENV_CMD"
27606      path="${complete%% *}"
27607      tmp="$complete EOL"
27608      arguments="${tmp#* }"
27609
27610      # Cannot rely on the command "which" here since it doesn't always work.
27611      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27612      if test -z "$is_absolute_path"; then
27613        # Path to executable is not absolute. Find it.
27614        IFS_save="$IFS"
27615        IFS=:
27616        for p in $PATH; do
27617          if test -f "$p/$path" && test -x "$p/$path"; then
27618            new_path="$p/$path"
27619            break
27620          fi
27621        done
27622        IFS="$IFS_save"
27623      else
27624        # This is an absolute path, we can use it without further modifications.
27625        new_path="$path"
27626      fi
27627
27628      if test "x$new_path" = x; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27630$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27631        has_space=`$ECHO "$complete" | $GREP " "`
27632        if test "x$has_space" != x; then
27633          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27634$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27635        fi
27636        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27637      fi
27638    fi
27639
27640    # Now join together the path and the arguments once again
27641    if test "x$arguments" != xEOL; then
27642      new_complete="$new_path ${arguments% *}"
27643    else
27644      new_complete="$new_path"
27645    fi
27646
27647    if test "x$complete" != "x$new_complete"; then
27648      VS_ENV_CMD="$new_complete"
27649      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27650$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27651    fi
27652  fi
27653
27654
27655      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27656      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27657$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27658
27659      # We need to create a couple of temporary files.
27660      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27661      $MKDIR -p $VS_ENV_TMP_DIR
27662
27663      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27664      # Instead create a shell script which will set the relevant variables when run.
27665      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27666
27667  unix_path="$WINPATH_VS_ENV_CMD"
27668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27669    windows_path=`$CYGPATH -m "$unix_path"`
27670    WINPATH_VS_ENV_CMD="$windows_path"
27671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27672    windows_path=`cmd //c echo $unix_path`
27673    WINPATH_VS_ENV_CMD="$windows_path"
27674  fi
27675
27676      WINPATH_BASH="$BASH"
27677
27678  unix_path="$WINPATH_BASH"
27679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27680    windows_path=`$CYGPATH -m "$unix_path"`
27681    WINPATH_BASH="$windows_path"
27682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27683    windows_path=`cmd //c echo $unix_path`
27684    WINPATH_BASH="$windows_path"
27685  fi
27686
27687
27688      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27689      # script (executable by bash) that will setup the important variables.
27690      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27691      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27692      # This will end up something like:
27693      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27694      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27695      # These will end up something like:
27696      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27697      # The trailing space for everyone except PATH is no typo, but is needed due
27698      # to trailing \ in the Windows paths. These will be stripped later.
27699      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27700          >> $EXTRACT_VC_ENV_BAT_FILE
27701      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27702          >> $EXTRACT_VC_ENV_BAT_FILE
27703      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27704          >> $EXTRACT_VC_ENV_BAT_FILE
27705      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27706          >> $EXTRACT_VC_ENV_BAT_FILE
27707      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27708          >> $EXTRACT_VC_ENV_BAT_FILE
27709      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27710          >> $EXTRACT_VC_ENV_BAT_FILE
27711
27712      # Now execute the newly created bat file.
27713      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27714      # Change directory so we don't need to mess with Windows paths in redirects.
27715      cd $VS_ENV_TMP_DIR
27716      cmd /c extract-vs-env.bat | $CAT
27717      cd $CURDIR
27718
27719      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27721$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27722        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27723$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27724        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27725$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27726        as_fn_error $? "Cannot continue" "$LINENO" 5
27727      fi
27728
27729      # Now set all paths and other env variables. This will allow the rest of
27730      # the configure script to find and run the compiler in the proper way.
27731      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27732$as_echo "$as_me: Setting extracted environment variables" >&6;}
27733      . $VS_ENV_TMP_DIR/set-vs-env.sh
27734      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27735      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27736    else
27737      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27738      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27739$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27740    fi
27741  fi
27742
27743  # At this point, we should have correct variables in the environment, or we can't continue.
27744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27745$as_echo_n "checking for Visual Studio variables... " >&6; }
27746
27747  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27748      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27749    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27751$as_echo "present but broken" >&6; }
27752      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27753    else
27754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27755$as_echo "ok" >&6; }
27756      # Remove any trailing "\" ";" and " " from the variables.
27757      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27758      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27759      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27760      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27761      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27762      # Remove any paths containing # (typically F#) as that messes up make. This
27763      # is needed if visual studio was installed with F# support.
27764      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27765
27766
27767
27768
27769
27770      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27771      OLDIFS="$IFS"
27772      IFS=";"
27773      for i in $VS_INCLUDE; do
27774        ipath=$i
27775        # Only process non-empty elements
27776        if test "x$ipath" != x; then
27777          IFS="$OLDIFS"
27778          # Check that directory exists before calling fixup_path
27779          testpath=$ipath
27780
27781  windows_path="$testpath"
27782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783    unix_path=`$CYGPATH -u "$windows_path"`
27784    testpath="$unix_path"
27785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27787    testpath="$unix_path"
27788  fi
27789
27790          if test -d "$testpath"; then
27791
27792  # Only process if variable expands to non-empty
27793
27794  if test "x$ipath" != x; then
27795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27796
27797  # Input might be given as Windows format, start by converting to
27798  # unix format.
27799  path="$ipath"
27800  new_path=`$CYGPATH -u "$path"`
27801
27802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27805  # "foo.exe" is OK but "foo" is an error.
27806  #
27807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27808  # It is also a way to make sure we got the proper file name for the real test later on.
27809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27810  if test "x$test_shortpath" = x; then
27811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27812$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27813    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27814  fi
27815
27816  # Call helper function which possibly converts this using DOS-style short mode.
27817  # If so, the updated path is stored in $new_path.
27818
27819  input_path="$new_path"
27820  # Check if we need to convert this using DOS-style short mode. If the path
27821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27822  # take no chances and rewrite it.
27823  # Note: m4 eats our [], so we need to use [ and ] instead.
27824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27825  if test "x$has_forbidden_chars" != x; then
27826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27830      # Going to short mode and back again did indeed matter. Since short mode is
27831      # case insensitive, let's make it lowercase to improve readability.
27832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27833      # Now convert it back to Unix-style (cygpath)
27834      input_path=`$CYGPATH -u "$shortmode_path"`
27835      new_path="$input_path"
27836    fi
27837  fi
27838
27839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27840  if test "x$test_cygdrive_prefix" = x; then
27841    # As a simple fix, exclude /usr/bin since it's not a real path.
27842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27844      # a path prefixed by /cygdrive for fixpath to work.
27845      new_path="$CYGWIN_ROOT_PATH$input_path"
27846    fi
27847  fi
27848
27849
27850  if test "x$path" != "x$new_path"; then
27851    ipath="$new_path"
27852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27853$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27854  fi
27855
27856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27857
27858  path="$ipath"
27859  has_colon=`$ECHO $path | $GREP ^.:`
27860  new_path="$path"
27861  if test "x$has_colon" = x; then
27862    # Not in mixed or Windows style, start by that.
27863    new_path=`cmd //c echo $path`
27864  fi
27865
27866
27867  input_path="$new_path"
27868  # Check if we need to convert this using DOS-style short mode. If the path
27869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27870  # take no chances and rewrite it.
27871  # Note: m4 eats our [], so we need to use [ and ] instead.
27872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27873  if test "x$has_forbidden_chars" != x; then
27874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27876  fi
27877
27878
27879  windows_path="$new_path"
27880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27881    unix_path=`$CYGPATH -u "$windows_path"`
27882    new_path="$unix_path"
27883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27885    new_path="$unix_path"
27886  fi
27887
27888  if test "x$path" != "x$new_path"; then
27889    ipath="$new_path"
27890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27891$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27892  fi
27893
27894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27896
27897    else
27898      # We're on a unix platform. Hooray! :)
27899      path="$ipath"
27900      has_space=`$ECHO "$path" | $GREP " "`
27901      if test "x$has_space" != x; then
27902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27903$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27905      fi
27906
27907      # Use eval to expand a potential ~
27908      eval path="$path"
27909      if test ! -f "$path" && test ! -d "$path"; then
27910        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27911      fi
27912
27913      ipath="`cd "$path"; $THEPWDCMD -L`"
27914    fi
27915  fi
27916
27917            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27918          fi
27919          IFS=";"
27920        fi
27921      done
27922      # Convert VS_LIB into SYSROOT_LDFLAGS
27923      for i in $VS_LIB; do
27924        libpath=$i
27925        # Only process non-empty elements
27926        if test "x$libpath" != x; then
27927          IFS="$OLDIFS"
27928          # Check that directory exists before calling fixup_path
27929          testpath=$libpath
27930
27931  windows_path="$testpath"
27932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933    unix_path=`$CYGPATH -u "$windows_path"`
27934    testpath="$unix_path"
27935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27937    testpath="$unix_path"
27938  fi
27939
27940          if test -d "$testpath"; then
27941
27942  # Only process if variable expands to non-empty
27943
27944  if test "x$libpath" != x; then
27945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27946
27947  # Input might be given as Windows format, start by converting to
27948  # unix format.
27949  path="$libpath"
27950  new_path=`$CYGPATH -u "$path"`
27951
27952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27955  # "foo.exe" is OK but "foo" is an error.
27956  #
27957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27958  # It is also a way to make sure we got the proper file name for the real test later on.
27959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27960  if test "x$test_shortpath" = x; then
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27962$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27963    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27964  fi
27965
27966  # Call helper function which possibly converts this using DOS-style short mode.
27967  # If so, the updated path is stored in $new_path.
27968
27969  input_path="$new_path"
27970  # Check if we need to convert this using DOS-style short mode. If the path
27971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27972  # take no chances and rewrite it.
27973  # Note: m4 eats our [], so we need to use [ and ] instead.
27974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27975  if test "x$has_forbidden_chars" != x; then
27976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27980      # Going to short mode and back again did indeed matter. Since short mode is
27981      # case insensitive, let's make it lowercase to improve readability.
27982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27983      # Now convert it back to Unix-style (cygpath)
27984      input_path=`$CYGPATH -u "$shortmode_path"`
27985      new_path="$input_path"
27986    fi
27987  fi
27988
27989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27990  if test "x$test_cygdrive_prefix" = x; then
27991    # As a simple fix, exclude /usr/bin since it's not a real path.
27992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27994      # a path prefixed by /cygdrive for fixpath to work.
27995      new_path="$CYGWIN_ROOT_PATH$input_path"
27996    fi
27997  fi
27998
27999
28000  if test "x$path" != "x$new_path"; then
28001    libpath="$new_path"
28002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28003$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28004  fi
28005
28006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28007
28008  path="$libpath"
28009  has_colon=`$ECHO $path | $GREP ^.:`
28010  new_path="$path"
28011  if test "x$has_colon" = x; then
28012    # Not in mixed or Windows style, start by that.
28013    new_path=`cmd //c echo $path`
28014  fi
28015
28016
28017  input_path="$new_path"
28018  # Check if we need to convert this using DOS-style short mode. If the path
28019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28020  # take no chances and rewrite it.
28021  # Note: m4 eats our [], so we need to use [ and ] instead.
28022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28023  if test "x$has_forbidden_chars" != x; then
28024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28026  fi
28027
28028
28029  windows_path="$new_path"
28030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28031    unix_path=`$CYGPATH -u "$windows_path"`
28032    new_path="$unix_path"
28033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28035    new_path="$unix_path"
28036  fi
28037
28038  if test "x$path" != "x$new_path"; then
28039    libpath="$new_path"
28040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28041$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28042  fi
28043
28044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28046
28047    else
28048      # We're on a unix platform. Hooray! :)
28049      path="$libpath"
28050      has_space=`$ECHO "$path" | $GREP " "`
28051      if test "x$has_space" != x; then
28052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28053$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28055      fi
28056
28057      # Use eval to expand a potential ~
28058      eval path="$path"
28059      if test ! -f "$path" && test ! -d "$path"; then
28060        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28061      fi
28062
28063      libpath="`cd "$path"; $THEPWDCMD -L`"
28064    fi
28065  fi
28066
28067            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28068          fi
28069          IFS=";"
28070        fi
28071      done
28072      IFS="$OLDIFS"
28073    fi
28074  else
28075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28076$as_echo "not found" >&6; }
28077
28078    if test "x$VS_ENV_CMD" = x; then
28079      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28080$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28081      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28082$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28083    else
28084      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28085$as_echo "$as_me: Running the extraction script failed." >&6;}
28086    fi
28087    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28088$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28090$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28091    as_fn_error $? "Cannot continue" "$LINENO" 5
28092  fi
28093
28094    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28095    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28096    PATH="$VS_PATH"
28097    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28098    export INCLUDE="$VS_INCLUDE"
28099    export LIB="$VS_LIB"
28100  fi
28101
28102  # For solaris we really need solaris tools, and not the GNU equivalent.
28103  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28104  # so add that to path before starting to probe.
28105  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28106  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28107    PATH="/usr/ccs/bin:$PATH"
28108  fi
28109
28110  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28111  # override all other locations.
28112  if test "x$TOOLCHAIN_PATH" != x; then
28113    PATH=$TOOLCHAIN_PATH:$PATH
28114  fi
28115
28116
28117  #
28118  # Setup the compilers (CC and CXX)
28119  #
28120
28121  COMPILER_NAME=C
28122  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28123
28124  if test "x$CC" != x; then
28125    # User has supplied compiler name already, always let that override.
28126    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28127$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28128    if test "x`basename $CC`" = "x$CC"; then
28129      # A command without a complete path is provided, search $PATH.
28130
28131      for ac_prog in $CC
28132do
28133  # Extract the first word of "$ac_prog", so it can be a program name with args.
28134set dummy $ac_prog; ac_word=$2
28135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28136$as_echo_n "checking for $ac_word... " >&6; }
28137if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28138  $as_echo_n "(cached) " >&6
28139else
28140  case $POTENTIAL_CC in
28141  [\\/]* | ?:[\\/]*)
28142  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28143  ;;
28144  *)
28145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28146for as_dir in $PATH
28147do
28148  IFS=$as_save_IFS
28149  test -z "$as_dir" && as_dir=.
28150    for ac_exec_ext in '' $ac_executable_extensions; do
28151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28152    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28154    break 2
28155  fi
28156done
28157  done
28158IFS=$as_save_IFS
28159
28160  ;;
28161esac
28162fi
28163POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28164if test -n "$POTENTIAL_CC"; then
28165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28166$as_echo "$POTENTIAL_CC" >&6; }
28167else
28168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28169$as_echo "no" >&6; }
28170fi
28171
28172
28173  test -n "$POTENTIAL_CC" && break
28174done
28175
28176      if test "x$POTENTIAL_CC" != x; then
28177        CC=$POTENTIAL_CC
28178      else
28179        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28180      fi
28181    else
28182      # Otherwise it might already be a complete path
28183      if test ! -x "$CC"; then
28184        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28185      fi
28186    fi
28187  else
28188    # No user supplied value. Locate compiler ourselves.
28189
28190    # If we are cross compiling, assume cross compilation tools follows the
28191    # cross compilation standard where they are prefixed with the autoconf
28192    # standard name for the target. For example the binary
28193    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28194    # If we are not cross compiling, then the default compiler name will be
28195    # used.
28196
28197    CC=
28198    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28199    # before checking the rest of the PATH.
28200    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28201    # step, this should not be necessary.
28202    if test -n "$TOOLCHAIN_PATH"; then
28203      PATH_save="$PATH"
28204      PATH="$TOOLCHAIN_PATH"
28205      for ac_prog in $SEARCH_LIST
28206do
28207  # Extract the first word of "$ac_prog", so it can be a program name with args.
28208set dummy $ac_prog; ac_word=$2
28209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28210$as_echo_n "checking for $ac_word... " >&6; }
28211if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28212  $as_echo_n "(cached) " >&6
28213else
28214  case $TOOLCHAIN_PATH_CC in
28215  [\\/]* | ?:[\\/]*)
28216  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28217  ;;
28218  *)
28219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28220for as_dir in $PATH
28221do
28222  IFS=$as_save_IFS
28223  test -z "$as_dir" && as_dir=.
28224    for ac_exec_ext in '' $ac_executable_extensions; do
28225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28226    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28228    break 2
28229  fi
28230done
28231  done
28232IFS=$as_save_IFS
28233
28234  ;;
28235esac
28236fi
28237TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28238if test -n "$TOOLCHAIN_PATH_CC"; then
28239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28240$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28241else
28242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28243$as_echo "no" >&6; }
28244fi
28245
28246
28247  test -n "$TOOLCHAIN_PATH_CC" && break
28248done
28249
28250      CC=$TOOLCHAIN_PATH_CC
28251      PATH="$PATH_save"
28252    fi
28253
28254    # AC_PATH_PROGS can't be run multiple times with the same variable,
28255    # so create a new name for this run.
28256    if test "x$CC" = x; then
28257      for ac_prog in $SEARCH_LIST
28258do
28259  # Extract the first word of "$ac_prog", so it can be a program name with args.
28260set dummy $ac_prog; ac_word=$2
28261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28262$as_echo_n "checking for $ac_word... " >&6; }
28263if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28264  $as_echo_n "(cached) " >&6
28265else
28266  case $POTENTIAL_CC in
28267  [\\/]* | ?:[\\/]*)
28268  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28269  ;;
28270  *)
28271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28272for as_dir in $PATH
28273do
28274  IFS=$as_save_IFS
28275  test -z "$as_dir" && as_dir=.
28276    for ac_exec_ext in '' $ac_executable_extensions; do
28277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28278    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28280    break 2
28281  fi
28282done
28283  done
28284IFS=$as_save_IFS
28285
28286  ;;
28287esac
28288fi
28289POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28290if test -n "$POTENTIAL_CC"; then
28291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28292$as_echo "$POTENTIAL_CC" >&6; }
28293else
28294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28295$as_echo "no" >&6; }
28296fi
28297
28298
28299  test -n "$POTENTIAL_CC" && break
28300done
28301
28302      CC=$POTENTIAL_CC
28303    fi
28304
28305    if test "x$CC" = x; then
28306
28307  # Print a helpful message on how to acquire the necessary build dependency.
28308  # devkit is the help tag: freetype, cups, pulse, alsa etc
28309  MISSING_DEPENDENCY=devkit
28310
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    cygwin_help $MISSING_DEPENDENCY
28313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28314    msys_help $MISSING_DEPENDENCY
28315  else
28316    PKGHANDLER_COMMAND=
28317
28318    case $PKGHANDLER in
28319      apt-get)
28320        apt_help     $MISSING_DEPENDENCY ;;
28321      yum)
28322        yum_help     $MISSING_DEPENDENCY ;;
28323      port)
28324        port_help    $MISSING_DEPENDENCY ;;
28325      pkgutil)
28326        pkgutil_help $MISSING_DEPENDENCY ;;
28327      pkgadd)
28328        pkgadd_help  $MISSING_DEPENDENCY ;;
28329    esac
28330
28331    if test "x$PKGHANDLER_COMMAND" != x; then
28332      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28333    fi
28334  fi
28335
28336      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28337    fi
28338  fi
28339
28340  # Now we have a compiler binary in CC. Make sure it's okay.
28341
28342  # Only process if variable expands to non-empty
28343
28344  if test "x$CC" != x; then
28345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28346
28347  # First separate the path from the arguments. This will split at the first
28348  # space.
28349  complete="$CC"
28350  path="${complete%% *}"
28351  tmp="$complete EOL"
28352  arguments="${tmp#* }"
28353
28354  # Input might be given as Windows format, start by converting to
28355  # unix format.
28356  new_path=`$CYGPATH -u "$path"`
28357
28358  # Now try to locate executable using which
28359  new_path=`$WHICH "$new_path" 2> /dev/null`
28360  # bat and cmd files are not always considered executable in cygwin causing which
28361  # to not find them
28362  if test "x$new_path" = x \
28363      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28364      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28365    new_path=`$CYGPATH -u "$path"`
28366  fi
28367  if test "x$new_path" = x; then
28368    # Oops. Which didn't find the executable.
28369    # The splitting of arguments from the executable at a space might have been incorrect,
28370    # since paths with space are more likely in Windows. Give it another try with the whole
28371    # argument.
28372    path="$complete"
28373    arguments="EOL"
28374    new_path=`$CYGPATH -u "$path"`
28375    new_path=`$WHICH "$new_path" 2> /dev/null`
28376    # bat and cmd files are not always considered executable in cygwin causing which
28377    # to not find them
28378    if test "x$new_path" = x \
28379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28381      new_path=`$CYGPATH -u "$path"`
28382    fi
28383    if test "x$new_path" = x; then
28384      # It's still not found. Now this is an unrecoverable error.
28385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28386$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28387      has_space=`$ECHO "$complete" | $GREP " "`
28388      if test "x$has_space" != x; then
28389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28391      fi
28392      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28393    fi
28394  fi
28395
28396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28399  # "foo.exe" is OK but "foo" is an error.
28400  #
28401  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28402  # It is also a way to make sure we got the proper file name for the real test later on.
28403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28404  if test "x$test_shortpath" = x; then
28405    # Short path failed, file does not exist as specified.
28406    # Try adding .exe or .cmd
28407    if test -f "${new_path}.exe"; then
28408      input_to_shortpath="${new_path}.exe"
28409    elif test -f "${new_path}.cmd"; then
28410      input_to_shortpath="${new_path}.cmd"
28411    else
28412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28413$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28414      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28415$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28416      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28417    fi
28418  else
28419    input_to_shortpath="$new_path"
28420  fi
28421
28422  # Call helper function which possibly converts this using DOS-style short mode.
28423  # If so, the updated path is stored in $new_path.
28424  new_path="$input_to_shortpath"
28425
28426  input_path="$input_to_shortpath"
28427  # Check if we need to convert this using DOS-style short mode. If the path
28428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28429  # take no chances and rewrite it.
28430  # Note: m4 eats our [], so we need to use [ and ] instead.
28431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28432  if test "x$has_forbidden_chars" != x; then
28433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28437      # Going to short mode and back again did indeed matter. Since short mode is
28438      # case insensitive, let's make it lowercase to improve readability.
28439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28440      # Now convert it back to Unix-style (cygpath)
28441      input_path=`$CYGPATH -u "$shortmode_path"`
28442      new_path="$input_path"
28443    fi
28444  fi
28445
28446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28447  if test "x$test_cygdrive_prefix" = x; then
28448    # As a simple fix, exclude /usr/bin since it's not a real path.
28449    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28451      # a path prefixed by /cygdrive for fixpath to work.
28452      new_path="$CYGWIN_ROOT_PATH$input_path"
28453    fi
28454  fi
28455
28456  # remove trailing .exe if any
28457  new_path="${new_path/%.exe/}"
28458
28459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28460
28461  # First separate the path from the arguments. This will split at the first
28462  # space.
28463  complete="$CC"
28464  path="${complete%% *}"
28465  tmp="$complete EOL"
28466  arguments="${tmp#* }"
28467
28468  # Input might be given as Windows format, start by converting to
28469  # unix format.
28470  new_path="$path"
28471
28472  windows_path="$new_path"
28473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28474    unix_path=`$CYGPATH -u "$windows_path"`
28475    new_path="$unix_path"
28476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28478    new_path="$unix_path"
28479  fi
28480
28481
28482  # Now try to locate executable using which
28483  new_path=`$WHICH "$new_path" 2> /dev/null`
28484
28485  if test "x$new_path" = x; then
28486    # Oops. Which didn't find the executable.
28487    # The splitting of arguments from the executable at a space might have been incorrect,
28488    # since paths with space are more likely in Windows. Give it another try with the whole
28489    # argument.
28490    path="$complete"
28491    arguments="EOL"
28492    new_path="$path"
28493
28494  windows_path="$new_path"
28495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28496    unix_path=`$CYGPATH -u "$windows_path"`
28497    new_path="$unix_path"
28498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28500    new_path="$unix_path"
28501  fi
28502
28503
28504    new_path=`$WHICH "$new_path" 2> /dev/null`
28505    # bat and cmd files are not always considered executable in MSYS causing which
28506    # to not find them
28507    if test "x$new_path" = x \
28508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28510      new_path="$path"
28511
28512  windows_path="$new_path"
28513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28514    unix_path=`$CYGPATH -u "$windows_path"`
28515    new_path="$unix_path"
28516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28518    new_path="$unix_path"
28519  fi
28520
28521    fi
28522
28523    if test "x$new_path" = x; then
28524      # It's still not found. Now this is an unrecoverable error.
28525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28526$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28527      has_space=`$ECHO "$complete" | $GREP " "`
28528      if test "x$has_space" != x; then
28529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28531      fi
28532      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28533    fi
28534  fi
28535
28536  # Now new_path has a complete unix path to the binary
28537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28538    # Keep paths in /bin as-is, but remove trailing .exe if any
28539    new_path="${new_path/%.exe/}"
28540    # Do not save /bin paths to all_fixpath_prefixes!
28541  else
28542    # Not in mixed or Windows style, start by that.
28543    new_path=`cmd //c echo $new_path`
28544
28545  input_path="$new_path"
28546  # Check if we need to convert this using DOS-style short mode. If the path
28547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28548  # take no chances and rewrite it.
28549  # Note: m4 eats our [], so we need to use [ and ] instead.
28550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28551  if test "x$has_forbidden_chars" != x; then
28552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28554  fi
28555
28556    # Output is in $new_path
28557
28558  windows_path="$new_path"
28559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28560    unix_path=`$CYGPATH -u "$windows_path"`
28561    new_path="$unix_path"
28562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28564    new_path="$unix_path"
28565  fi
28566
28567    # remove trailing .exe if any
28568    new_path="${new_path/%.exe/}"
28569
28570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28572  fi
28573
28574    else
28575      # We're on a unix platform. Hooray! :)
28576      # First separate the path from the arguments. This will split at the first
28577      # space.
28578      complete="$CC"
28579      path="${complete%% *}"
28580      tmp="$complete EOL"
28581      arguments="${tmp#* }"
28582
28583      # Cannot rely on the command "which" here since it doesn't always work.
28584      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28585      if test -z "$is_absolute_path"; then
28586        # Path to executable is not absolute. Find it.
28587        IFS_save="$IFS"
28588        IFS=:
28589        for p in $PATH; do
28590          if test -f "$p/$path" && test -x "$p/$path"; then
28591            new_path="$p/$path"
28592            break
28593          fi
28594        done
28595        IFS="$IFS_save"
28596      else
28597        # This is an absolute path, we can use it without further modifications.
28598        new_path="$path"
28599      fi
28600
28601      if test "x$new_path" = x; then
28602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28603$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28604        has_space=`$ECHO "$complete" | $GREP " "`
28605        if test "x$has_space" != x; then
28606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28608        fi
28609        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28610      fi
28611    fi
28612
28613    # Now join together the path and the arguments once again
28614    if test "x$arguments" != xEOL; then
28615      new_complete="$new_path ${arguments% *}"
28616    else
28617      new_complete="$new_path"
28618    fi
28619
28620    if test "x$complete" != "x$new_complete"; then
28621      CC="$new_complete"
28622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28623$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28624    fi
28625  fi
28626
28627  TEST_COMPILER="$CC"
28628  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28629  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28630  if test "x$OPENJDK_BUILD_OS" != xaix; then
28631    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28633$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28634
28635  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28636    # Follow a chain of symbolic links. Use readlink
28637    # where it exists, else fall back to horribly
28638    # complicated shell code.
28639    if test "x$READLINK_TESTED" != yes; then
28640      # On MacOSX there is a readlink tool with a different
28641      # purpose than the GNU readlink tool. Check the found readlink.
28642      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28643      if test "x$ISGNU" = x; then
28644        # A readlink that we do not know how to use.
28645        # Are there other non-GNU readlinks out there?
28646        READLINK_TESTED=yes
28647        READLINK=
28648      fi
28649    fi
28650
28651    if test "x$READLINK" != x; then
28652      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28653    else
28654      # Save the current directory for restoring afterwards
28655      STARTDIR=$PWD
28656      COUNTER=0
28657      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28658      sym_link_file=`$BASENAME $TEST_COMPILER`
28659      cd $sym_link_dir
28660      # Use -P flag to resolve symlinks in directories.
28661      cd `$THEPWDCMD -P`
28662      sym_link_dir=`$THEPWDCMD -P`
28663      # Resolve file symlinks
28664      while test $COUNTER -lt 20; do
28665        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28666        if test "x$ISLINK" == x; then
28667          # This is not a symbolic link! We are done!
28668          break
28669        fi
28670        # Again resolve directory symlinks since the target of the just found
28671        # link could be in a different directory
28672        cd `$DIRNAME $ISLINK`
28673        sym_link_dir=`$THEPWDCMD -P`
28674        sym_link_file=`$BASENAME $ISLINK`
28675        let COUNTER=COUNTER+1
28676      done
28677      cd $STARTDIR
28678      TEST_COMPILER=$sym_link_dir/$sym_link_file
28679    fi
28680  fi
28681
28682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28683$as_echo "$TEST_COMPILER" >&6; }
28684  fi
28685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28686$as_echo_n "checking if CC is disguised ccache... " >&6; }
28687
28688  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28689  if test "x$COMPILER_BASENAME" = "xccache"; then
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28691$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28692    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28693    # We want to control ccache invocation ourselves, so ignore this cc and try
28694    # searching again.
28695
28696    # Remove the path to the fake ccache cc from the PATH
28697    RETRY_COMPILER_SAVED_PATH="$PATH"
28698    COMPILER_DIRNAME=`$DIRNAME $CC`
28699    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28700
28701    # Try again looking for our compiler
28702    if test -n "$ac_tool_prefix"; then
28703  for ac_prog in $TOOLCHAIN_CC_BINARY
28704  do
28705    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28706set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28708$as_echo_n "checking for $ac_word... " >&6; }
28709if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28710  $as_echo_n "(cached) " >&6
28711else
28712  if test -n "$PROPER_COMPILER_CC"; then
28713  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28714else
28715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28716for as_dir in $PATH
28717do
28718  IFS=$as_save_IFS
28719  test -z "$as_dir" && as_dir=.
28720    for ac_exec_ext in '' $ac_executable_extensions; do
28721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28722    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28724    break 2
28725  fi
28726done
28727  done
28728IFS=$as_save_IFS
28729
28730fi
28731fi
28732PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28733if test -n "$PROPER_COMPILER_CC"; then
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28735$as_echo "$PROPER_COMPILER_CC" >&6; }
28736else
28737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28738$as_echo "no" >&6; }
28739fi
28740
28741
28742    test -n "$PROPER_COMPILER_CC" && break
28743  done
28744fi
28745if test -z "$PROPER_COMPILER_CC"; then
28746  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28747  for ac_prog in $TOOLCHAIN_CC_BINARY
28748do
28749  # Extract the first word of "$ac_prog", so it can be a program name with args.
28750set dummy $ac_prog; ac_word=$2
28751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28752$as_echo_n "checking for $ac_word... " >&6; }
28753if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28754  $as_echo_n "(cached) " >&6
28755else
28756  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28757  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28758else
28759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28760for as_dir in $PATH
28761do
28762  IFS=$as_save_IFS
28763  test -z "$as_dir" && as_dir=.
28764    for ac_exec_ext in '' $ac_executable_extensions; do
28765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28766    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28768    break 2
28769  fi
28770done
28771  done
28772IFS=$as_save_IFS
28773
28774fi
28775fi
28776ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28777if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28779$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28780else
28781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28782$as_echo "no" >&6; }
28783fi
28784
28785
28786  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28787done
28788
28789  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28790    PROPER_COMPILER_CC=""
28791  else
28792    case $cross_compiling:$ac_tool_warned in
28793yes:)
28794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28796ac_tool_warned=yes ;;
28797esac
28798    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28799  fi
28800fi
28801
28802
28803  # Only process if variable expands to non-empty
28804
28805  if test "x$PROPER_COMPILER_CC" != x; then
28806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28807
28808  # First separate the path from the arguments. This will split at the first
28809  # space.
28810  complete="$PROPER_COMPILER_CC"
28811  path="${complete%% *}"
28812  tmp="$complete EOL"
28813  arguments="${tmp#* }"
28814
28815  # Input might be given as Windows format, start by converting to
28816  # unix format.
28817  new_path=`$CYGPATH -u "$path"`
28818
28819  # Now try to locate executable using which
28820  new_path=`$WHICH "$new_path" 2> /dev/null`
28821  # bat and cmd files are not always considered executable in cygwin causing which
28822  # to not find them
28823  if test "x$new_path" = x \
28824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28826    new_path=`$CYGPATH -u "$path"`
28827  fi
28828  if test "x$new_path" = x; then
28829    # Oops. Which didn't find the executable.
28830    # The splitting of arguments from the executable at a space might have been incorrect,
28831    # since paths with space are more likely in Windows. Give it another try with the whole
28832    # argument.
28833    path="$complete"
28834    arguments="EOL"
28835    new_path=`$CYGPATH -u "$path"`
28836    new_path=`$WHICH "$new_path" 2> /dev/null`
28837    # bat and cmd files are not always considered executable in cygwin causing which
28838    # to not find them
28839    if test "x$new_path" = x \
28840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28842      new_path=`$CYGPATH -u "$path"`
28843    fi
28844    if test "x$new_path" = x; then
28845      # It's still not found. Now this is an unrecoverable error.
28846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28847$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28848      has_space=`$ECHO "$complete" | $GREP " "`
28849      if test "x$has_space" != x; then
28850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28852      fi
28853      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28854    fi
28855  fi
28856
28857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28860  # "foo.exe" is OK but "foo" is an error.
28861  #
28862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28863  # It is also a way to make sure we got the proper file name for the real test later on.
28864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28865  if test "x$test_shortpath" = x; then
28866    # Short path failed, file does not exist as specified.
28867    # Try adding .exe or .cmd
28868    if test -f "${new_path}.exe"; then
28869      input_to_shortpath="${new_path}.exe"
28870    elif test -f "${new_path}.cmd"; then
28871      input_to_shortpath="${new_path}.cmd"
28872    else
28873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28874$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28877      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28878    fi
28879  else
28880    input_to_shortpath="$new_path"
28881  fi
28882
28883  # Call helper function which possibly converts this using DOS-style short mode.
28884  # If so, the updated path is stored in $new_path.
28885  new_path="$input_to_shortpath"
28886
28887  input_path="$input_to_shortpath"
28888  # Check if we need to convert this using DOS-style short mode. If the path
28889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28890  # take no chances and rewrite it.
28891  # Note: m4 eats our [], so we need to use [ and ] instead.
28892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28893  if test "x$has_forbidden_chars" != x; then
28894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28898      # Going to short mode and back again did indeed matter. Since short mode is
28899      # case insensitive, let's make it lowercase to improve readability.
28900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28901      # Now convert it back to Unix-style (cygpath)
28902      input_path=`$CYGPATH -u "$shortmode_path"`
28903      new_path="$input_path"
28904    fi
28905  fi
28906
28907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28908  if test "x$test_cygdrive_prefix" = x; then
28909    # As a simple fix, exclude /usr/bin since it's not a real path.
28910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28912      # a path prefixed by /cygdrive for fixpath to work.
28913      new_path="$CYGWIN_ROOT_PATH$input_path"
28914    fi
28915  fi
28916
28917  # remove trailing .exe if any
28918  new_path="${new_path/%.exe/}"
28919
28920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28921
28922  # First separate the path from the arguments. This will split at the first
28923  # space.
28924  complete="$PROPER_COMPILER_CC"
28925  path="${complete%% *}"
28926  tmp="$complete EOL"
28927  arguments="${tmp#* }"
28928
28929  # Input might be given as Windows format, start by converting to
28930  # unix format.
28931  new_path="$path"
28932
28933  windows_path="$new_path"
28934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28935    unix_path=`$CYGPATH -u "$windows_path"`
28936    new_path="$unix_path"
28937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28939    new_path="$unix_path"
28940  fi
28941
28942
28943  # Now try to locate executable using which
28944  new_path=`$WHICH "$new_path" 2> /dev/null`
28945
28946  if test "x$new_path" = x; then
28947    # Oops. Which didn't find the executable.
28948    # The splitting of arguments from the executable at a space might have been incorrect,
28949    # since paths with space are more likely in Windows. Give it another try with the whole
28950    # argument.
28951    path="$complete"
28952    arguments="EOL"
28953    new_path="$path"
28954
28955  windows_path="$new_path"
28956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28957    unix_path=`$CYGPATH -u "$windows_path"`
28958    new_path="$unix_path"
28959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28961    new_path="$unix_path"
28962  fi
28963
28964
28965    new_path=`$WHICH "$new_path" 2> /dev/null`
28966    # bat and cmd files are not always considered executable in MSYS causing which
28967    # to not find them
28968    if test "x$new_path" = x \
28969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28971      new_path="$path"
28972
28973  windows_path="$new_path"
28974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975    unix_path=`$CYGPATH -u "$windows_path"`
28976    new_path="$unix_path"
28977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28979    new_path="$unix_path"
28980  fi
28981
28982    fi
28983
28984    if test "x$new_path" = x; then
28985      # It's still not found. Now this is an unrecoverable error.
28986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28987$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28988      has_space=`$ECHO "$complete" | $GREP " "`
28989      if test "x$has_space" != x; then
28990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28992      fi
28993      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28994    fi
28995  fi
28996
28997  # Now new_path has a complete unix path to the binary
28998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28999    # Keep paths in /bin as-is, but remove trailing .exe if any
29000    new_path="${new_path/%.exe/}"
29001    # Do not save /bin paths to all_fixpath_prefixes!
29002  else
29003    # Not in mixed or Windows style, start by that.
29004    new_path=`cmd //c echo $new_path`
29005
29006  input_path="$new_path"
29007  # Check if we need to convert this using DOS-style short mode. If the path
29008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29009  # take no chances and rewrite it.
29010  # Note: m4 eats our [], so we need to use [ and ] instead.
29011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29012  if test "x$has_forbidden_chars" != x; then
29013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29015  fi
29016
29017    # Output is in $new_path
29018
29019  windows_path="$new_path"
29020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29021    unix_path=`$CYGPATH -u "$windows_path"`
29022    new_path="$unix_path"
29023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29025    new_path="$unix_path"
29026  fi
29027
29028    # remove trailing .exe if any
29029    new_path="${new_path/%.exe/}"
29030
29031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29033  fi
29034
29035    else
29036      # We're on a unix platform. Hooray! :)
29037      # First separate the path from the arguments. This will split at the first
29038      # space.
29039      complete="$PROPER_COMPILER_CC"
29040      path="${complete%% *}"
29041      tmp="$complete EOL"
29042      arguments="${tmp#* }"
29043
29044      # Cannot rely on the command "which" here since it doesn't always work.
29045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29046      if test -z "$is_absolute_path"; then
29047        # Path to executable is not absolute. Find it.
29048        IFS_save="$IFS"
29049        IFS=:
29050        for p in $PATH; do
29051          if test -f "$p/$path" && test -x "$p/$path"; then
29052            new_path="$p/$path"
29053            break
29054          fi
29055        done
29056        IFS="$IFS_save"
29057      else
29058        # This is an absolute path, we can use it without further modifications.
29059        new_path="$path"
29060      fi
29061
29062      if test "x$new_path" = x; then
29063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29064$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29065        has_space=`$ECHO "$complete" | $GREP " "`
29066        if test "x$has_space" != x; then
29067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29069        fi
29070        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29071      fi
29072    fi
29073
29074    # Now join together the path and the arguments once again
29075    if test "x$arguments" != xEOL; then
29076      new_complete="$new_path ${arguments% *}"
29077    else
29078      new_complete="$new_path"
29079    fi
29080
29081    if test "x$complete" != "x$new_complete"; then
29082      PROPER_COMPILER_CC="$new_complete"
29083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29084$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29085    fi
29086  fi
29087
29088    PATH="$RETRY_COMPILER_SAVED_PATH"
29089
29090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29091$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29092
29093  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29094    # Follow a chain of symbolic links. Use readlink
29095    # where it exists, else fall back to horribly
29096    # complicated shell code.
29097    if test "x$READLINK_TESTED" != yes; then
29098      # On MacOSX there is a readlink tool with a different
29099      # purpose than the GNU readlink tool. Check the found readlink.
29100      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29101      if test "x$ISGNU" = x; then
29102        # A readlink that we do not know how to use.
29103        # Are there other non-GNU readlinks out there?
29104        READLINK_TESTED=yes
29105        READLINK=
29106      fi
29107    fi
29108
29109    if test "x$READLINK" != x; then
29110      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29111    else
29112      # Save the current directory for restoring afterwards
29113      STARTDIR=$PWD
29114      COUNTER=0
29115      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29116      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29117      cd $sym_link_dir
29118      # Use -P flag to resolve symlinks in directories.
29119      cd `$THEPWDCMD -P`
29120      sym_link_dir=`$THEPWDCMD -P`
29121      # Resolve file symlinks
29122      while test $COUNTER -lt 20; do
29123        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29124        if test "x$ISLINK" == x; then
29125          # This is not a symbolic link! We are done!
29126          break
29127        fi
29128        # Again resolve directory symlinks since the target of the just found
29129        # link could be in a different directory
29130        cd `$DIRNAME $ISLINK`
29131        sym_link_dir=`$THEPWDCMD -P`
29132        sym_link_file=`$BASENAME $ISLINK`
29133        let COUNTER=COUNTER+1
29134      done
29135      cd $STARTDIR
29136      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29137    fi
29138  fi
29139
29140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29141$as_echo "$PROPER_COMPILER_CC" >&6; }
29142    CC="$PROPER_COMPILER_CC"
29143  else
29144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29145$as_echo "no, keeping CC" >&6; }
29146  fi
29147
29148
29149  COMPILER=$CC
29150  COMPILER_NAME=$COMPILER_NAME
29151
29152  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29153    # cc -V output typically looks like
29154    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29155    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29156    # Check that this is likely to be the Solaris Studio cc.
29157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29158    if test $? -ne 0; then
29159      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29160      { $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
29161$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29163$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29165$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29166      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29167    fi
29168    # Remove usage instructions (if present), and
29169    # collapse compiler output into a single line
29170    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29171        $SED -e 's/ *[Uu]sage:.*//'`
29172    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29173        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29174  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29175    # xlc -qversion output typically looks like
29176    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29177    #     Version: 11.01.0000.0015
29178    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29179    # Check that this is likely to be the IBM XL C compiler.
29180    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29181    if test $? -ne 0; then
29182      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29183      { $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
29184$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29185      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29186$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29187      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29188$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29189      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29190    fi
29191    # Collapse compiler output into a single line
29192    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29193    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29194        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29195  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29196    # There is no specific version flag, but all output starts with a version string.
29197    # First line typically looks something like:
29198    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29199    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29200    # Check that this is likely to be Microsoft CL.EXE.
29201    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29202    if test $? -ne 0; then
29203      { $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
29204$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29205      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29206$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29207      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29208    fi
29209    # Collapse compiler output into a single line
29210    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29211    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29212        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29213  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29214    # gcc --version output typically looks like
29215    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29216    #     Copyright (C) 2013 Free Software Foundation, Inc.
29217    #     This is free software; see the source for copying conditions.  There is NO
29218    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29219    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29220    # Check that this is likely to be GCC.
29221    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29222    if test $? -ne 0; then
29223      { $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
29224$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29225      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29226$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29227      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29228    fi
29229    # Remove Copyright and legalese from version string, and
29230    # collapse into a single line
29231    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29232        $SED -e 's/ *Copyright .*//'`
29233    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29234        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29235  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29236    # clang --version output typically looks like
29237    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29238    #    clang version 3.3 (tags/RELEASE_33/final)
29239    # or
29240    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29241    #    Target: x86_64-pc-linux-gnu
29242    #    Thread model: posix
29243    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29244    # Check that this is likely to be clang
29245    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29246    if test $? -ne 0; then
29247      { $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
29248$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29249      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29250$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29251      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29252    fi
29253    # Collapse compiler output into a single line
29254    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29255    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29256        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29257  else
29258      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29259  fi
29260  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29261  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29262  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29263  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29264
29265  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29266$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29267
29268
29269  # Now that we have resolved CC ourself, let autoconf have its go at it
29270  ac_ext=c
29271ac_cpp='$CPP $CPPFLAGS'
29272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29274ac_compiler_gnu=$ac_cv_c_compiler_gnu
29275if test -n "$ac_tool_prefix"; then
29276  for ac_prog in $CC
29277  do
29278    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29279set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29281$as_echo_n "checking for $ac_word... " >&6; }
29282if ${ac_cv_prog_CC+:} false; then :
29283  $as_echo_n "(cached) " >&6
29284else
29285  if test -n "$CC"; then
29286  ac_cv_prog_CC="$CC" # Let the user override the test.
29287else
29288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29289for as_dir in $PATH
29290do
29291  IFS=$as_save_IFS
29292  test -z "$as_dir" && as_dir=.
29293    for ac_exec_ext in '' $ac_executable_extensions; do
29294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29295    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29297    break 2
29298  fi
29299done
29300  done
29301IFS=$as_save_IFS
29302
29303fi
29304fi
29305CC=$ac_cv_prog_CC
29306if test -n "$CC"; then
29307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29308$as_echo "$CC" >&6; }
29309else
29310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29311$as_echo "no" >&6; }
29312fi
29313
29314
29315    test -n "$CC" && break
29316  done
29317fi
29318if test -z "$CC"; then
29319  ac_ct_CC=$CC
29320  for ac_prog in $CC
29321do
29322  # Extract the first word of "$ac_prog", so it can be a program name with args.
29323set dummy $ac_prog; ac_word=$2
29324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29325$as_echo_n "checking for $ac_word... " >&6; }
29326if ${ac_cv_prog_ac_ct_CC+:} false; then :
29327  $as_echo_n "(cached) " >&6
29328else
29329  if test -n "$ac_ct_CC"; then
29330  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29331else
29332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29333for as_dir in $PATH
29334do
29335  IFS=$as_save_IFS
29336  test -z "$as_dir" && as_dir=.
29337    for ac_exec_ext in '' $ac_executable_extensions; do
29338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29339    ac_cv_prog_ac_ct_CC="$ac_prog"
29340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29341    break 2
29342  fi
29343done
29344  done
29345IFS=$as_save_IFS
29346
29347fi
29348fi
29349ac_ct_CC=$ac_cv_prog_ac_ct_CC
29350if test -n "$ac_ct_CC"; then
29351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29352$as_echo "$ac_ct_CC" >&6; }
29353else
29354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29355$as_echo "no" >&6; }
29356fi
29357
29358
29359  test -n "$ac_ct_CC" && break
29360done
29361
29362  if test "x$ac_ct_CC" = x; then
29363    CC=""
29364  else
29365    case $cross_compiling:$ac_tool_warned in
29366yes:)
29367{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29368$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29369ac_tool_warned=yes ;;
29370esac
29371    CC=$ac_ct_CC
29372  fi
29373fi
29374
29375
29376test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29378as_fn_error $? "no acceptable C compiler found in \$PATH
29379See \`config.log' for more details" "$LINENO" 5; }
29380
29381# Provide some information about the compiler.
29382$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29383set X $ac_compile
29384ac_compiler=$2
29385for ac_option in --version -v -V -qversion; do
29386  { { ac_try="$ac_compiler $ac_option >&5"
29387case "(($ac_try" in
29388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29389  *) ac_try_echo=$ac_try;;
29390esac
29391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29392$as_echo "$ac_try_echo"; } >&5
29393  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29394  ac_status=$?
29395  if test -s conftest.err; then
29396    sed '10a\
29397... rest of stderr output deleted ...
29398         10q' conftest.err >conftest.er1
29399    cat conftest.er1 >&5
29400  fi
29401  rm -f conftest.er1 conftest.err
29402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29403  test $ac_status = 0; }
29404done
29405
29406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29407/* end confdefs.h.  */
29408
29409int
29410main ()
29411{
29412
29413  ;
29414  return 0;
29415}
29416_ACEOF
29417ac_clean_files_save=$ac_clean_files
29418ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29419# Try to create an executable without -o first, disregard a.out.
29420# It will help us diagnose broken compilers, and finding out an intuition
29421# of exeext.
29422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29423$as_echo_n "checking whether the C compiler works... " >&6; }
29424ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29425
29426# The possible output files:
29427ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29428
29429ac_rmfiles=
29430for ac_file in $ac_files
29431do
29432  case $ac_file in
29433    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29434    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29435  esac
29436done
29437rm -f $ac_rmfiles
29438
29439if { { ac_try="$ac_link_default"
29440case "(($ac_try" in
29441  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29442  *) ac_try_echo=$ac_try;;
29443esac
29444eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29445$as_echo "$ac_try_echo"; } >&5
29446  (eval "$ac_link_default") 2>&5
29447  ac_status=$?
29448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29449  test $ac_status = 0; }; then :
29450  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29451# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29452# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29453# so that the user can short-circuit this test for compilers unknown to
29454# Autoconf.
29455for ac_file in $ac_files ''
29456do
29457  test -f "$ac_file" || continue
29458  case $ac_file in
29459    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29460	;;
29461    [ab].out )
29462	# We found the default executable, but exeext='' is most
29463	# certainly right.
29464	break;;
29465    *.* )
29466	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29467	then :; else
29468	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29469	fi
29470	# We set ac_cv_exeext here because the later test for it is not
29471	# safe: cross compilers may not add the suffix if given an `-o'
29472	# argument, so we may need to know it at that point already.
29473	# Even if this section looks crufty: it has the advantage of
29474	# actually working.
29475	break;;
29476    * )
29477	break;;
29478  esac
29479done
29480test "$ac_cv_exeext" = no && ac_cv_exeext=
29481
29482else
29483  ac_file=''
29484fi
29485if test -z "$ac_file"; then :
29486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29487$as_echo "no" >&6; }
29488$as_echo "$as_me: failed program was:" >&5
29489sed 's/^/| /' conftest.$ac_ext >&5
29490
29491{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29493as_fn_error 77 "C compiler cannot create executables
29494See \`config.log' for more details" "$LINENO" 5; }
29495else
29496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29497$as_echo "yes" >&6; }
29498fi
29499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29500$as_echo_n "checking for C compiler default output file name... " >&6; }
29501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29502$as_echo "$ac_file" >&6; }
29503ac_exeext=$ac_cv_exeext
29504
29505rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29506ac_clean_files=$ac_clean_files_save
29507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29508$as_echo_n "checking for suffix of executables... " >&6; }
29509if { { ac_try="$ac_link"
29510case "(($ac_try" in
29511  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29512  *) ac_try_echo=$ac_try;;
29513esac
29514eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29515$as_echo "$ac_try_echo"; } >&5
29516  (eval "$ac_link") 2>&5
29517  ac_status=$?
29518  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29519  test $ac_status = 0; }; then :
29520  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29521# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29522# work properly (i.e., refer to `conftest.exe'), while it won't with
29523# `rm'.
29524for ac_file in conftest.exe conftest conftest.*; do
29525  test -f "$ac_file" || continue
29526  case $ac_file in
29527    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29528    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29529	  break;;
29530    * ) break;;
29531  esac
29532done
29533else
29534  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29536as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29537See \`config.log' for more details" "$LINENO" 5; }
29538fi
29539rm -f conftest conftest$ac_cv_exeext
29540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29541$as_echo "$ac_cv_exeext" >&6; }
29542
29543rm -f conftest.$ac_ext
29544EXEEXT=$ac_cv_exeext
29545ac_exeext=$EXEEXT
29546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29547/* end confdefs.h.  */
29548#include <stdio.h>
29549int
29550main ()
29551{
29552FILE *f = fopen ("conftest.out", "w");
29553 return ferror (f) || fclose (f) != 0;
29554
29555  ;
29556  return 0;
29557}
29558_ACEOF
29559ac_clean_files="$ac_clean_files conftest.out"
29560# Check that the compiler produces executables we can run.  If not, either
29561# the compiler is broken, or we cross compile.
29562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29563$as_echo_n "checking whether we are cross compiling... " >&6; }
29564if test "$cross_compiling" != yes; then
29565  { { ac_try="$ac_link"
29566case "(($ac_try" in
29567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29568  *) ac_try_echo=$ac_try;;
29569esac
29570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29571$as_echo "$ac_try_echo"; } >&5
29572  (eval "$ac_link") 2>&5
29573  ac_status=$?
29574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29575  test $ac_status = 0; }
29576  if { ac_try='./conftest$ac_cv_exeext'
29577  { { case "(($ac_try" in
29578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29579  *) ac_try_echo=$ac_try;;
29580esac
29581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29582$as_echo "$ac_try_echo"; } >&5
29583  (eval "$ac_try") 2>&5
29584  ac_status=$?
29585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29586  test $ac_status = 0; }; }; then
29587    cross_compiling=no
29588  else
29589    if test "$cross_compiling" = maybe; then
29590	cross_compiling=yes
29591    else
29592	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29594as_fn_error $? "cannot run C compiled programs.
29595If you meant to cross compile, use \`--host'.
29596See \`config.log' for more details" "$LINENO" 5; }
29597    fi
29598  fi
29599fi
29600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29601$as_echo "$cross_compiling" >&6; }
29602
29603rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29604ac_clean_files=$ac_clean_files_save
29605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29606$as_echo_n "checking for suffix of object files... " >&6; }
29607if ${ac_cv_objext+:} false; then :
29608  $as_echo_n "(cached) " >&6
29609else
29610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29611/* end confdefs.h.  */
29612
29613int
29614main ()
29615{
29616
29617  ;
29618  return 0;
29619}
29620_ACEOF
29621rm -f conftest.o conftest.obj
29622if { { ac_try="$ac_compile"
29623case "(($ac_try" in
29624  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29625  *) ac_try_echo=$ac_try;;
29626esac
29627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29628$as_echo "$ac_try_echo"; } >&5
29629  (eval "$ac_compile") 2>&5
29630  ac_status=$?
29631  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29632  test $ac_status = 0; }; then :
29633  for ac_file in conftest.o conftest.obj conftest.*; do
29634  test -f "$ac_file" || continue;
29635  case $ac_file in
29636    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29637    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29638       break;;
29639  esac
29640done
29641else
29642  $as_echo "$as_me: failed program was:" >&5
29643sed 's/^/| /' conftest.$ac_ext >&5
29644
29645{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29647as_fn_error $? "cannot compute suffix of object files: cannot compile
29648See \`config.log' for more details" "$LINENO" 5; }
29649fi
29650rm -f conftest.$ac_cv_objext conftest.$ac_ext
29651fi
29652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29653$as_echo "$ac_cv_objext" >&6; }
29654OBJEXT=$ac_cv_objext
29655ac_objext=$OBJEXT
29656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29657$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29658if ${ac_cv_c_compiler_gnu+:} false; then :
29659  $as_echo_n "(cached) " >&6
29660else
29661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29662/* end confdefs.h.  */
29663
29664int
29665main ()
29666{
29667#ifndef __GNUC__
29668       choke me
29669#endif
29670
29671  ;
29672  return 0;
29673}
29674_ACEOF
29675if ac_fn_c_try_compile "$LINENO"; then :
29676  ac_compiler_gnu=yes
29677else
29678  ac_compiler_gnu=no
29679fi
29680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29681ac_cv_c_compiler_gnu=$ac_compiler_gnu
29682
29683fi
29684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29685$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29686if test $ac_compiler_gnu = yes; then
29687  GCC=yes
29688else
29689  GCC=
29690fi
29691ac_test_CFLAGS=${CFLAGS+set}
29692ac_save_CFLAGS=$CFLAGS
29693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29694$as_echo_n "checking whether $CC accepts -g... " >&6; }
29695if ${ac_cv_prog_cc_g+:} false; then :
29696  $as_echo_n "(cached) " >&6
29697else
29698  ac_save_c_werror_flag=$ac_c_werror_flag
29699   ac_c_werror_flag=yes
29700   ac_cv_prog_cc_g=no
29701   CFLAGS="-g"
29702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29703/* end confdefs.h.  */
29704
29705int
29706main ()
29707{
29708
29709  ;
29710  return 0;
29711}
29712_ACEOF
29713if ac_fn_c_try_compile "$LINENO"; then :
29714  ac_cv_prog_cc_g=yes
29715else
29716  CFLAGS=""
29717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29718/* end confdefs.h.  */
29719
29720int
29721main ()
29722{
29723
29724  ;
29725  return 0;
29726}
29727_ACEOF
29728if ac_fn_c_try_compile "$LINENO"; then :
29729
29730else
29731  ac_c_werror_flag=$ac_save_c_werror_flag
29732	 CFLAGS="-g"
29733	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29734/* end confdefs.h.  */
29735
29736int
29737main ()
29738{
29739
29740  ;
29741  return 0;
29742}
29743_ACEOF
29744if ac_fn_c_try_compile "$LINENO"; then :
29745  ac_cv_prog_cc_g=yes
29746fi
29747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29748fi
29749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29750fi
29751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29752   ac_c_werror_flag=$ac_save_c_werror_flag
29753fi
29754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29755$as_echo "$ac_cv_prog_cc_g" >&6; }
29756if test "$ac_test_CFLAGS" = set; then
29757  CFLAGS=$ac_save_CFLAGS
29758elif test $ac_cv_prog_cc_g = yes; then
29759  if test "$GCC" = yes; then
29760    CFLAGS="-g -O2"
29761  else
29762    CFLAGS="-g"
29763  fi
29764else
29765  if test "$GCC" = yes; then
29766    CFLAGS="-O2"
29767  else
29768    CFLAGS=
29769  fi
29770fi
29771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29772$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29773if ${ac_cv_prog_cc_c89+:} false; then :
29774  $as_echo_n "(cached) " >&6
29775else
29776  ac_cv_prog_cc_c89=no
29777ac_save_CC=$CC
29778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29779/* end confdefs.h.  */
29780#include <stdarg.h>
29781#include <stdio.h>
29782struct stat;
29783/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29784struct buf { int x; };
29785FILE * (*rcsopen) (struct buf *, struct stat *, int);
29786static char *e (p, i)
29787     char **p;
29788     int i;
29789{
29790  return p[i];
29791}
29792static char *f (char * (*g) (char **, int), char **p, ...)
29793{
29794  char *s;
29795  va_list v;
29796  va_start (v,p);
29797  s = g (p, va_arg (v,int));
29798  va_end (v);
29799  return s;
29800}
29801
29802/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29803   function prototypes and stuff, but not '\xHH' hex character constants.
29804   These don't provoke an error unfortunately, instead are silently treated
29805   as 'x'.  The following induces an error, until -std is added to get
29806   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29807   array size at least.  It's necessary to write '\x00'==0 to get something
29808   that's true only with -std.  */
29809int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29810
29811/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29812   inside strings and character constants.  */
29813#define FOO(x) 'x'
29814int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29815
29816int test (int i, double x);
29817struct s1 {int (*f) (int a);};
29818struct s2 {int (*f) (double a);};
29819int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29820int argc;
29821char **argv;
29822int
29823main ()
29824{
29825return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29826  ;
29827  return 0;
29828}
29829_ACEOF
29830for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29831	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29832do
29833  CC="$ac_save_CC $ac_arg"
29834  if ac_fn_c_try_compile "$LINENO"; then :
29835  ac_cv_prog_cc_c89=$ac_arg
29836fi
29837rm -f core conftest.err conftest.$ac_objext
29838  test "x$ac_cv_prog_cc_c89" != "xno" && break
29839done
29840rm -f conftest.$ac_ext
29841CC=$ac_save_CC
29842
29843fi
29844# AC_CACHE_VAL
29845case "x$ac_cv_prog_cc_c89" in
29846  x)
29847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29848$as_echo "none needed" >&6; } ;;
29849  xno)
29850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29851$as_echo "unsupported" >&6; } ;;
29852  *)
29853    CC="$CC $ac_cv_prog_cc_c89"
29854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29855$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29856esac
29857if test "x$ac_cv_prog_cc_c89" != xno; then :
29858
29859fi
29860
29861ac_ext=cpp
29862ac_cpp='$CXXCPP $CPPFLAGS'
29863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29866
29867
29868
29869  COMPILER_NAME=C++
29870  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29871
29872  if test "x$CXX" != x; then
29873    # User has supplied compiler name already, always let that override.
29874    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29875$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29876    if test "x`basename $CXX`" = "x$CXX"; then
29877      # A command without a complete path is provided, search $PATH.
29878
29879      for ac_prog in $CXX
29880do
29881  # Extract the first word of "$ac_prog", so it can be a program name with args.
29882set dummy $ac_prog; ac_word=$2
29883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29884$as_echo_n "checking for $ac_word... " >&6; }
29885if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29886  $as_echo_n "(cached) " >&6
29887else
29888  case $POTENTIAL_CXX in
29889  [\\/]* | ?:[\\/]*)
29890  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29891  ;;
29892  *)
29893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29894for as_dir in $PATH
29895do
29896  IFS=$as_save_IFS
29897  test -z "$as_dir" && as_dir=.
29898    for ac_exec_ext in '' $ac_executable_extensions; do
29899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29900    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29902    break 2
29903  fi
29904done
29905  done
29906IFS=$as_save_IFS
29907
29908  ;;
29909esac
29910fi
29911POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29912if test -n "$POTENTIAL_CXX"; then
29913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29914$as_echo "$POTENTIAL_CXX" >&6; }
29915else
29916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29917$as_echo "no" >&6; }
29918fi
29919
29920
29921  test -n "$POTENTIAL_CXX" && break
29922done
29923
29924      if test "x$POTENTIAL_CXX" != x; then
29925        CXX=$POTENTIAL_CXX
29926      else
29927        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29928      fi
29929    else
29930      # Otherwise it might already be a complete path
29931      if test ! -x "$CXX"; then
29932        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29933      fi
29934    fi
29935  else
29936    # No user supplied value. Locate compiler ourselves.
29937
29938    # If we are cross compiling, assume cross compilation tools follows the
29939    # cross compilation standard where they are prefixed with the autoconf
29940    # standard name for the target. For example the binary
29941    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29942    # If we are not cross compiling, then the default compiler name will be
29943    # used.
29944
29945    CXX=
29946    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29947    # before checking the rest of the PATH.
29948    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29949    # step, this should not be necessary.
29950    if test -n "$TOOLCHAIN_PATH"; then
29951      PATH_save="$PATH"
29952      PATH="$TOOLCHAIN_PATH"
29953      for ac_prog in $SEARCH_LIST
29954do
29955  # Extract the first word of "$ac_prog", so it can be a program name with args.
29956set dummy $ac_prog; ac_word=$2
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29958$as_echo_n "checking for $ac_word... " >&6; }
29959if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  case $TOOLCHAIN_PATH_CXX in
29963  [\\/]* | ?:[\\/]*)
29964  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29965  ;;
29966  *)
29967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29968for as_dir in $PATH
29969do
29970  IFS=$as_save_IFS
29971  test -z "$as_dir" && as_dir=.
29972    for ac_exec_ext in '' $ac_executable_extensions; do
29973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29974    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29976    break 2
29977  fi
29978done
29979  done
29980IFS=$as_save_IFS
29981
29982  ;;
29983esac
29984fi
29985TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29986if test -n "$TOOLCHAIN_PATH_CXX"; then
29987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29988$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29989else
29990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29991$as_echo "no" >&6; }
29992fi
29993
29994
29995  test -n "$TOOLCHAIN_PATH_CXX" && break
29996done
29997
29998      CXX=$TOOLCHAIN_PATH_CXX
29999      PATH="$PATH_save"
30000    fi
30001
30002    # AC_PATH_PROGS can't be run multiple times with the same variable,
30003    # so create a new name for this run.
30004    if test "x$CXX" = x; then
30005      for ac_prog in $SEARCH_LIST
30006do
30007  # Extract the first word of "$ac_prog", so it can be a program name with args.
30008set dummy $ac_prog; ac_word=$2
30009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30010$as_echo_n "checking for $ac_word... " >&6; }
30011if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30012  $as_echo_n "(cached) " >&6
30013else
30014  case $POTENTIAL_CXX in
30015  [\\/]* | ?:[\\/]*)
30016  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30017  ;;
30018  *)
30019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30020for as_dir in $PATH
30021do
30022  IFS=$as_save_IFS
30023  test -z "$as_dir" && as_dir=.
30024    for ac_exec_ext in '' $ac_executable_extensions; do
30025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30026    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30028    break 2
30029  fi
30030done
30031  done
30032IFS=$as_save_IFS
30033
30034  ;;
30035esac
30036fi
30037POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30038if test -n "$POTENTIAL_CXX"; then
30039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30040$as_echo "$POTENTIAL_CXX" >&6; }
30041else
30042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30043$as_echo "no" >&6; }
30044fi
30045
30046
30047  test -n "$POTENTIAL_CXX" && break
30048done
30049
30050      CXX=$POTENTIAL_CXX
30051    fi
30052
30053    if test "x$CXX" = x; then
30054
30055  # Print a helpful message on how to acquire the necessary build dependency.
30056  # devkit is the help tag: freetype, cups, pulse, alsa etc
30057  MISSING_DEPENDENCY=devkit
30058
30059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30060    cygwin_help $MISSING_DEPENDENCY
30061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30062    msys_help $MISSING_DEPENDENCY
30063  else
30064    PKGHANDLER_COMMAND=
30065
30066    case $PKGHANDLER in
30067      apt-get)
30068        apt_help     $MISSING_DEPENDENCY ;;
30069      yum)
30070        yum_help     $MISSING_DEPENDENCY ;;
30071      port)
30072        port_help    $MISSING_DEPENDENCY ;;
30073      pkgutil)
30074        pkgutil_help $MISSING_DEPENDENCY ;;
30075      pkgadd)
30076        pkgadd_help  $MISSING_DEPENDENCY ;;
30077    esac
30078
30079    if test "x$PKGHANDLER_COMMAND" != x; then
30080      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30081    fi
30082  fi
30083
30084      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30085    fi
30086  fi
30087
30088  # Now we have a compiler binary in CXX. Make sure it's okay.
30089
30090  # Only process if variable expands to non-empty
30091
30092  if test "x$CXX" != x; then
30093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30094
30095  # First separate the path from the arguments. This will split at the first
30096  # space.
30097  complete="$CXX"
30098  path="${complete%% *}"
30099  tmp="$complete EOL"
30100  arguments="${tmp#* }"
30101
30102  # Input might be given as Windows format, start by converting to
30103  # unix format.
30104  new_path=`$CYGPATH -u "$path"`
30105
30106  # Now try to locate executable using which
30107  new_path=`$WHICH "$new_path" 2> /dev/null`
30108  # bat and cmd files are not always considered executable in cygwin causing which
30109  # to not find them
30110  if test "x$new_path" = x \
30111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30113    new_path=`$CYGPATH -u "$path"`
30114  fi
30115  if test "x$new_path" = x; then
30116    # Oops. Which didn't find the executable.
30117    # The splitting of arguments from the executable at a space might have been incorrect,
30118    # since paths with space are more likely in Windows. Give it another try with the whole
30119    # argument.
30120    path="$complete"
30121    arguments="EOL"
30122    new_path=`$CYGPATH -u "$path"`
30123    new_path=`$WHICH "$new_path" 2> /dev/null`
30124    # bat and cmd files are not always considered executable in cygwin causing which
30125    # to not find them
30126    if test "x$new_path" = x \
30127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30129      new_path=`$CYGPATH -u "$path"`
30130    fi
30131    if test "x$new_path" = x; then
30132      # It's still not found. Now this is an unrecoverable error.
30133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30134$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30135      has_space=`$ECHO "$complete" | $GREP " "`
30136      if test "x$has_space" != x; then
30137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30139      fi
30140      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30141    fi
30142  fi
30143
30144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30147  # "foo.exe" is OK but "foo" is an error.
30148  #
30149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30150  # It is also a way to make sure we got the proper file name for the real test later on.
30151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30152  if test "x$test_shortpath" = x; then
30153    # Short path failed, file does not exist as specified.
30154    # Try adding .exe or .cmd
30155    if test -f "${new_path}.exe"; then
30156      input_to_shortpath="${new_path}.exe"
30157    elif test -f "${new_path}.cmd"; then
30158      input_to_shortpath="${new_path}.cmd"
30159    else
30160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30161$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30164      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30165    fi
30166  else
30167    input_to_shortpath="$new_path"
30168  fi
30169
30170  # Call helper function which possibly converts this using DOS-style short mode.
30171  # If so, the updated path is stored in $new_path.
30172  new_path="$input_to_shortpath"
30173
30174  input_path="$input_to_shortpath"
30175  # Check if we need to convert this using DOS-style short mode. If the path
30176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30177  # take no chances and rewrite it.
30178  # Note: m4 eats our [], so we need to use [ and ] instead.
30179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30180  if test "x$has_forbidden_chars" != x; then
30181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30185      # Going to short mode and back again did indeed matter. Since short mode is
30186      # case insensitive, let's make it lowercase to improve readability.
30187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30188      # Now convert it back to Unix-style (cygpath)
30189      input_path=`$CYGPATH -u "$shortmode_path"`
30190      new_path="$input_path"
30191    fi
30192  fi
30193
30194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30195  if test "x$test_cygdrive_prefix" = x; then
30196    # As a simple fix, exclude /usr/bin since it's not a real path.
30197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30199      # a path prefixed by /cygdrive for fixpath to work.
30200      new_path="$CYGWIN_ROOT_PATH$input_path"
30201    fi
30202  fi
30203
30204  # remove trailing .exe if any
30205  new_path="${new_path/%.exe/}"
30206
30207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208
30209  # First separate the path from the arguments. This will split at the first
30210  # space.
30211  complete="$CXX"
30212  path="${complete%% *}"
30213  tmp="$complete EOL"
30214  arguments="${tmp#* }"
30215
30216  # Input might be given as Windows format, start by converting to
30217  # unix format.
30218  new_path="$path"
30219
30220  windows_path="$new_path"
30221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30222    unix_path=`$CYGPATH -u "$windows_path"`
30223    new_path="$unix_path"
30224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30226    new_path="$unix_path"
30227  fi
30228
30229
30230  # Now try to locate executable using which
30231  new_path=`$WHICH "$new_path" 2> /dev/null`
30232
30233  if test "x$new_path" = x; then
30234    # Oops. Which didn't find the executable.
30235    # The splitting of arguments from the executable at a space might have been incorrect,
30236    # since paths with space are more likely in Windows. Give it another try with the whole
30237    # argument.
30238    path="$complete"
30239    arguments="EOL"
30240    new_path="$path"
30241
30242  windows_path="$new_path"
30243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30244    unix_path=`$CYGPATH -u "$windows_path"`
30245    new_path="$unix_path"
30246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30248    new_path="$unix_path"
30249  fi
30250
30251
30252    new_path=`$WHICH "$new_path" 2> /dev/null`
30253    # bat and cmd files are not always considered executable in MSYS causing which
30254    # to not find them
30255    if test "x$new_path" = x \
30256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30258      new_path="$path"
30259
30260  windows_path="$new_path"
30261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30262    unix_path=`$CYGPATH -u "$windows_path"`
30263    new_path="$unix_path"
30264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30266    new_path="$unix_path"
30267  fi
30268
30269    fi
30270
30271    if test "x$new_path" = x; then
30272      # It's still not found. Now this is an unrecoverable error.
30273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30274$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30275      has_space=`$ECHO "$complete" | $GREP " "`
30276      if test "x$has_space" != x; then
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30279      fi
30280      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30281    fi
30282  fi
30283
30284  # Now new_path has a complete unix path to the binary
30285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30286    # Keep paths in /bin as-is, but remove trailing .exe if any
30287    new_path="${new_path/%.exe/}"
30288    # Do not save /bin paths to all_fixpath_prefixes!
30289  else
30290    # Not in mixed or Windows style, start by that.
30291    new_path=`cmd //c echo $new_path`
30292
30293  input_path="$new_path"
30294  # Check if we need to convert this using DOS-style short mode. If the path
30295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30296  # take no chances and rewrite it.
30297  # Note: m4 eats our [], so we need to use [ and ] instead.
30298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30299  if test "x$has_forbidden_chars" != x; then
30300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30302  fi
30303
30304    # Output is in $new_path
30305
30306  windows_path="$new_path"
30307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30308    unix_path=`$CYGPATH -u "$windows_path"`
30309    new_path="$unix_path"
30310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30312    new_path="$unix_path"
30313  fi
30314
30315    # remove trailing .exe if any
30316    new_path="${new_path/%.exe/}"
30317
30318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30320  fi
30321
30322    else
30323      # We're on a unix platform. Hooray! :)
30324      # First separate the path from the arguments. This will split at the first
30325      # space.
30326      complete="$CXX"
30327      path="${complete%% *}"
30328      tmp="$complete EOL"
30329      arguments="${tmp#* }"
30330
30331      # Cannot rely on the command "which" here since it doesn't always work.
30332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30333      if test -z "$is_absolute_path"; then
30334        # Path to executable is not absolute. Find it.
30335        IFS_save="$IFS"
30336        IFS=:
30337        for p in $PATH; do
30338          if test -f "$p/$path" && test -x "$p/$path"; then
30339            new_path="$p/$path"
30340            break
30341          fi
30342        done
30343        IFS="$IFS_save"
30344      else
30345        # This is an absolute path, we can use it without further modifications.
30346        new_path="$path"
30347      fi
30348
30349      if test "x$new_path" = x; then
30350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30351$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30352        has_space=`$ECHO "$complete" | $GREP " "`
30353        if test "x$has_space" != x; then
30354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30356        fi
30357        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30358      fi
30359    fi
30360
30361    # Now join together the path and the arguments once again
30362    if test "x$arguments" != xEOL; then
30363      new_complete="$new_path ${arguments% *}"
30364    else
30365      new_complete="$new_path"
30366    fi
30367
30368    if test "x$complete" != "x$new_complete"; then
30369      CXX="$new_complete"
30370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30371$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30372    fi
30373  fi
30374
30375  TEST_COMPILER="$CXX"
30376  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30377  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30378  if test "x$OPENJDK_BUILD_OS" != xaix; then
30379    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30381$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30382
30383  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30384    # Follow a chain of symbolic links. Use readlink
30385    # where it exists, else fall back to horribly
30386    # complicated shell code.
30387    if test "x$READLINK_TESTED" != yes; then
30388      # On MacOSX there is a readlink tool with a different
30389      # purpose than the GNU readlink tool. Check the found readlink.
30390      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30391      if test "x$ISGNU" = x; then
30392        # A readlink that we do not know how to use.
30393        # Are there other non-GNU readlinks out there?
30394        READLINK_TESTED=yes
30395        READLINK=
30396      fi
30397    fi
30398
30399    if test "x$READLINK" != x; then
30400      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30401    else
30402      # Save the current directory for restoring afterwards
30403      STARTDIR=$PWD
30404      COUNTER=0
30405      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30406      sym_link_file=`$BASENAME $TEST_COMPILER`
30407      cd $sym_link_dir
30408      # Use -P flag to resolve symlinks in directories.
30409      cd `$THEPWDCMD -P`
30410      sym_link_dir=`$THEPWDCMD -P`
30411      # Resolve file symlinks
30412      while test $COUNTER -lt 20; do
30413        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30414        if test "x$ISLINK" == x; then
30415          # This is not a symbolic link! We are done!
30416          break
30417        fi
30418        # Again resolve directory symlinks since the target of the just found
30419        # link could be in a different directory
30420        cd `$DIRNAME $ISLINK`
30421        sym_link_dir=`$THEPWDCMD -P`
30422        sym_link_file=`$BASENAME $ISLINK`
30423        let COUNTER=COUNTER+1
30424      done
30425      cd $STARTDIR
30426      TEST_COMPILER=$sym_link_dir/$sym_link_file
30427    fi
30428  fi
30429
30430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30431$as_echo "$TEST_COMPILER" >&6; }
30432  fi
30433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30434$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30435
30436  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30437  if test "x$COMPILER_BASENAME" = "xccache"; then
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30439$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30440    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30441    # We want to control ccache invocation ourselves, so ignore this cc and try
30442    # searching again.
30443
30444    # Remove the path to the fake ccache cc from the PATH
30445    RETRY_COMPILER_SAVED_PATH="$PATH"
30446    COMPILER_DIRNAME=`$DIRNAME $CXX`
30447    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30448
30449    # Try again looking for our compiler
30450    if test -n "$ac_tool_prefix"; then
30451  for ac_prog in $TOOLCHAIN_CXX_BINARY
30452  do
30453    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30454set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30456$as_echo_n "checking for $ac_word... " >&6; }
30457if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30458  $as_echo_n "(cached) " >&6
30459else
30460  if test -n "$PROPER_COMPILER_CXX"; then
30461  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30462else
30463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30464for as_dir in $PATH
30465do
30466  IFS=$as_save_IFS
30467  test -z "$as_dir" && as_dir=.
30468    for ac_exec_ext in '' $ac_executable_extensions; do
30469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30470    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30472    break 2
30473  fi
30474done
30475  done
30476IFS=$as_save_IFS
30477
30478fi
30479fi
30480PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30481if test -n "$PROPER_COMPILER_CXX"; then
30482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30483$as_echo "$PROPER_COMPILER_CXX" >&6; }
30484else
30485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30486$as_echo "no" >&6; }
30487fi
30488
30489
30490    test -n "$PROPER_COMPILER_CXX" && break
30491  done
30492fi
30493if test -z "$PROPER_COMPILER_CXX"; then
30494  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30495  for ac_prog in $TOOLCHAIN_CXX_BINARY
30496do
30497  # Extract the first word of "$ac_prog", so it can be a program name with args.
30498set dummy $ac_prog; ac_word=$2
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30500$as_echo_n "checking for $ac_word... " >&6; }
30501if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30502  $as_echo_n "(cached) " >&6
30503else
30504  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30505  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30506else
30507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30508for as_dir in $PATH
30509do
30510  IFS=$as_save_IFS
30511  test -z "$as_dir" && as_dir=.
30512    for ac_exec_ext in '' $ac_executable_extensions; do
30513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30514    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30516    break 2
30517  fi
30518done
30519  done
30520IFS=$as_save_IFS
30521
30522fi
30523fi
30524ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30525if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30527$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30528else
30529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30530$as_echo "no" >&6; }
30531fi
30532
30533
30534  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30535done
30536
30537  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30538    PROPER_COMPILER_CXX=""
30539  else
30540    case $cross_compiling:$ac_tool_warned in
30541yes:)
30542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30544ac_tool_warned=yes ;;
30545esac
30546    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30547  fi
30548fi
30549
30550
30551  # Only process if variable expands to non-empty
30552
30553  if test "x$PROPER_COMPILER_CXX" != x; then
30554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30555
30556  # First separate the path from the arguments. This will split at the first
30557  # space.
30558  complete="$PROPER_COMPILER_CXX"
30559  path="${complete%% *}"
30560  tmp="$complete EOL"
30561  arguments="${tmp#* }"
30562
30563  # Input might be given as Windows format, start by converting to
30564  # unix format.
30565  new_path=`$CYGPATH -u "$path"`
30566
30567  # Now try to locate executable using which
30568  new_path=`$WHICH "$new_path" 2> /dev/null`
30569  # bat and cmd files are not always considered executable in cygwin causing which
30570  # to not find them
30571  if test "x$new_path" = x \
30572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30574    new_path=`$CYGPATH -u "$path"`
30575  fi
30576  if test "x$new_path" = x; then
30577    # Oops. Which didn't find the executable.
30578    # The splitting of arguments from the executable at a space might have been incorrect,
30579    # since paths with space are more likely in Windows. Give it another try with the whole
30580    # argument.
30581    path="$complete"
30582    arguments="EOL"
30583    new_path=`$CYGPATH -u "$path"`
30584    new_path=`$WHICH "$new_path" 2> /dev/null`
30585    # bat and cmd files are not always considered executable in cygwin causing which
30586    # to not find them
30587    if test "x$new_path" = x \
30588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30590      new_path=`$CYGPATH -u "$path"`
30591    fi
30592    if test "x$new_path" = x; then
30593      # It's still not found. Now this is an unrecoverable error.
30594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30595$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30596      has_space=`$ECHO "$complete" | $GREP " "`
30597      if test "x$has_space" != x; then
30598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30600      fi
30601      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30602    fi
30603  fi
30604
30605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30608  # "foo.exe" is OK but "foo" is an error.
30609  #
30610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30611  # It is also a way to make sure we got the proper file name for the real test later on.
30612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30613  if test "x$test_shortpath" = x; then
30614    # Short path failed, file does not exist as specified.
30615    # Try adding .exe or .cmd
30616    if test -f "${new_path}.exe"; then
30617      input_to_shortpath="${new_path}.exe"
30618    elif test -f "${new_path}.cmd"; then
30619      input_to_shortpath="${new_path}.cmd"
30620    else
30621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30622$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30625      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30626    fi
30627  else
30628    input_to_shortpath="$new_path"
30629  fi
30630
30631  # Call helper function which possibly converts this using DOS-style short mode.
30632  # If so, the updated path is stored in $new_path.
30633  new_path="$input_to_shortpath"
30634
30635  input_path="$input_to_shortpath"
30636  # Check if we need to convert this using DOS-style short mode. If the path
30637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30638  # take no chances and rewrite it.
30639  # Note: m4 eats our [], so we need to use [ and ] instead.
30640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30641  if test "x$has_forbidden_chars" != x; then
30642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30646      # Going to short mode and back again did indeed matter. Since short mode is
30647      # case insensitive, let's make it lowercase to improve readability.
30648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30649      # Now convert it back to Unix-style (cygpath)
30650      input_path=`$CYGPATH -u "$shortmode_path"`
30651      new_path="$input_path"
30652    fi
30653  fi
30654
30655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30656  if test "x$test_cygdrive_prefix" = x; then
30657    # As a simple fix, exclude /usr/bin since it's not a real path.
30658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30660      # a path prefixed by /cygdrive for fixpath to work.
30661      new_path="$CYGWIN_ROOT_PATH$input_path"
30662    fi
30663  fi
30664
30665  # remove trailing .exe if any
30666  new_path="${new_path/%.exe/}"
30667
30668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30669
30670  # First separate the path from the arguments. This will split at the first
30671  # space.
30672  complete="$PROPER_COMPILER_CXX"
30673  path="${complete%% *}"
30674  tmp="$complete EOL"
30675  arguments="${tmp#* }"
30676
30677  # Input might be given as Windows format, start by converting to
30678  # unix format.
30679  new_path="$path"
30680
30681  windows_path="$new_path"
30682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30683    unix_path=`$CYGPATH -u "$windows_path"`
30684    new_path="$unix_path"
30685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30687    new_path="$unix_path"
30688  fi
30689
30690
30691  # Now try to locate executable using which
30692  new_path=`$WHICH "$new_path" 2> /dev/null`
30693
30694  if test "x$new_path" = x; then
30695    # Oops. Which didn't find the executable.
30696    # The splitting of arguments from the executable at a space might have been incorrect,
30697    # since paths with space are more likely in Windows. Give it another try with the whole
30698    # argument.
30699    path="$complete"
30700    arguments="EOL"
30701    new_path="$path"
30702
30703  windows_path="$new_path"
30704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30705    unix_path=`$CYGPATH -u "$windows_path"`
30706    new_path="$unix_path"
30707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30709    new_path="$unix_path"
30710  fi
30711
30712
30713    new_path=`$WHICH "$new_path" 2> /dev/null`
30714    # bat and cmd files are not always considered executable in MSYS causing which
30715    # to not find them
30716    if test "x$new_path" = x \
30717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30719      new_path="$path"
30720
30721  windows_path="$new_path"
30722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30723    unix_path=`$CYGPATH -u "$windows_path"`
30724    new_path="$unix_path"
30725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30727    new_path="$unix_path"
30728  fi
30729
30730    fi
30731
30732    if test "x$new_path" = x; then
30733      # It's still not found. Now this is an unrecoverable error.
30734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30735$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30736      has_space=`$ECHO "$complete" | $GREP " "`
30737      if test "x$has_space" != x; then
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30740      fi
30741      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30742    fi
30743  fi
30744
30745  # Now new_path has a complete unix path to the binary
30746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30747    # Keep paths in /bin as-is, but remove trailing .exe if any
30748    new_path="${new_path/%.exe/}"
30749    # Do not save /bin paths to all_fixpath_prefixes!
30750  else
30751    # Not in mixed or Windows style, start by that.
30752    new_path=`cmd //c echo $new_path`
30753
30754  input_path="$new_path"
30755  # Check if we need to convert this using DOS-style short mode. If the path
30756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30757  # take no chances and rewrite it.
30758  # Note: m4 eats our [], so we need to use [ and ] instead.
30759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30760  if test "x$has_forbidden_chars" != x; then
30761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30763  fi
30764
30765    # Output is in $new_path
30766
30767  windows_path="$new_path"
30768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30769    unix_path=`$CYGPATH -u "$windows_path"`
30770    new_path="$unix_path"
30771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30773    new_path="$unix_path"
30774  fi
30775
30776    # remove trailing .exe if any
30777    new_path="${new_path/%.exe/}"
30778
30779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30781  fi
30782
30783    else
30784      # We're on a unix platform. Hooray! :)
30785      # First separate the path from the arguments. This will split at the first
30786      # space.
30787      complete="$PROPER_COMPILER_CXX"
30788      path="${complete%% *}"
30789      tmp="$complete EOL"
30790      arguments="${tmp#* }"
30791
30792      # Cannot rely on the command "which" here since it doesn't always work.
30793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30794      if test -z "$is_absolute_path"; then
30795        # Path to executable is not absolute. Find it.
30796        IFS_save="$IFS"
30797        IFS=:
30798        for p in $PATH; do
30799          if test -f "$p/$path" && test -x "$p/$path"; then
30800            new_path="$p/$path"
30801            break
30802          fi
30803        done
30804        IFS="$IFS_save"
30805      else
30806        # This is an absolute path, we can use it without further modifications.
30807        new_path="$path"
30808      fi
30809
30810      if test "x$new_path" = x; then
30811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30812$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30813        has_space=`$ECHO "$complete" | $GREP " "`
30814        if test "x$has_space" != x; then
30815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30817        fi
30818        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30819      fi
30820    fi
30821
30822    # Now join together the path and the arguments once again
30823    if test "x$arguments" != xEOL; then
30824      new_complete="$new_path ${arguments% *}"
30825    else
30826      new_complete="$new_path"
30827    fi
30828
30829    if test "x$complete" != "x$new_complete"; then
30830      PROPER_COMPILER_CXX="$new_complete"
30831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30832$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30833    fi
30834  fi
30835
30836    PATH="$RETRY_COMPILER_SAVED_PATH"
30837
30838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30839$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30840
30841  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30842    # Follow a chain of symbolic links. Use readlink
30843    # where it exists, else fall back to horribly
30844    # complicated shell code.
30845    if test "x$READLINK_TESTED" != yes; then
30846      # On MacOSX there is a readlink tool with a different
30847      # purpose than the GNU readlink tool. Check the found readlink.
30848      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30849      if test "x$ISGNU" = x; then
30850        # A readlink that we do not know how to use.
30851        # Are there other non-GNU readlinks out there?
30852        READLINK_TESTED=yes
30853        READLINK=
30854      fi
30855    fi
30856
30857    if test "x$READLINK" != x; then
30858      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30859    else
30860      # Save the current directory for restoring afterwards
30861      STARTDIR=$PWD
30862      COUNTER=0
30863      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30864      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30865      cd $sym_link_dir
30866      # Use -P flag to resolve symlinks in directories.
30867      cd `$THEPWDCMD -P`
30868      sym_link_dir=`$THEPWDCMD -P`
30869      # Resolve file symlinks
30870      while test $COUNTER -lt 20; do
30871        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30872        if test "x$ISLINK" == x; then
30873          # This is not a symbolic link! We are done!
30874          break
30875        fi
30876        # Again resolve directory symlinks since the target of the just found
30877        # link could be in a different directory
30878        cd `$DIRNAME $ISLINK`
30879        sym_link_dir=`$THEPWDCMD -P`
30880        sym_link_file=`$BASENAME $ISLINK`
30881        let COUNTER=COUNTER+1
30882      done
30883      cd $STARTDIR
30884      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30885    fi
30886  fi
30887
30888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30889$as_echo "$PROPER_COMPILER_CXX" >&6; }
30890    CXX="$PROPER_COMPILER_CXX"
30891  else
30892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30893$as_echo "no, keeping CXX" >&6; }
30894  fi
30895
30896
30897  COMPILER=$CXX
30898  COMPILER_NAME=$COMPILER_NAME
30899
30900  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30901    # cc -V output typically looks like
30902    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30903    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30904    # Check that this is likely to be the Solaris Studio cc.
30905    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30906    if test $? -ne 0; then
30907      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30908      { $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
30909$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30910      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30911$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30913$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30914      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30915    fi
30916    # Remove usage instructions (if present), and
30917    # collapse compiler output into a single line
30918    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30919        $SED -e 's/ *[Uu]sage:.*//'`
30920    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30921        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30922  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30923    # xlc -qversion output typically looks like
30924    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30925    #     Version: 11.01.0000.0015
30926    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30927    # Check that this is likely to be the IBM XL C compiler.
30928    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30929    if test $? -ne 0; then
30930      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30931      { $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
30932$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30933      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30934$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30936$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30937      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30938    fi
30939    # Collapse compiler output into a single line
30940    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30941    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30942        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30943  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30944    # There is no specific version flag, but all output starts with a version string.
30945    # First line typically looks something like:
30946    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30947    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30948    # Check that this is likely to be Microsoft CL.EXE.
30949    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30950    if test $? -ne 0; then
30951      { $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
30952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30954$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30955      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30956    fi
30957    # Collapse compiler output into a single line
30958    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30959    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30960        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30961  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30962    # gcc --version output typically looks like
30963    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30964    #     Copyright (C) 2013 Free Software Foundation, Inc.
30965    #     This is free software; see the source for copying conditions.  There is NO
30966    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30967    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30968    # Check that this is likely to be GCC.
30969    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30970    if test $? -ne 0; then
30971      { $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
30972$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30974$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30976    fi
30977    # Remove Copyright and legalese from version string, and
30978    # collapse into a single line
30979    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30980        $SED -e 's/ *Copyright .*//'`
30981    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30982        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30983  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30984    # clang --version output typically looks like
30985    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30986    #    clang version 3.3 (tags/RELEASE_33/final)
30987    # or
30988    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30989    #    Target: x86_64-pc-linux-gnu
30990    #    Thread model: posix
30991    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30992    # Check that this is likely to be clang
30993    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30994    if test $? -ne 0; then
30995      { $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
30996$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30997      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30998$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30999      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31000    fi
31001    # Collapse compiler output into a single line
31002    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31003    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31004        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31005  else
31006      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31007  fi
31008  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31009  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31010  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31011  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31012
31013  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31014$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31015
31016
31017  # Now that we have resolved CXX ourself, let autoconf have its go at it
31018  ac_ext=cpp
31019ac_cpp='$CXXCPP $CPPFLAGS'
31020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31023if test -z "$CXX"; then
31024  if test -n "$CCC"; then
31025    CXX=$CCC
31026  else
31027    if test -n "$ac_tool_prefix"; then
31028  for ac_prog in $CXX
31029  do
31030    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31033$as_echo_n "checking for $ac_word... " >&6; }
31034if ${ac_cv_prog_CXX+:} false; then :
31035  $as_echo_n "(cached) " >&6
31036else
31037  if test -n "$CXX"; then
31038  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31039else
31040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31041for as_dir in $PATH
31042do
31043  IFS=$as_save_IFS
31044  test -z "$as_dir" && as_dir=.
31045    for ac_exec_ext in '' $ac_executable_extensions; do
31046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31047    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31049    break 2
31050  fi
31051done
31052  done
31053IFS=$as_save_IFS
31054
31055fi
31056fi
31057CXX=$ac_cv_prog_CXX
31058if test -n "$CXX"; then
31059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31060$as_echo "$CXX" >&6; }
31061else
31062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31063$as_echo "no" >&6; }
31064fi
31065
31066
31067    test -n "$CXX" && break
31068  done
31069fi
31070if test -z "$CXX"; then
31071  ac_ct_CXX=$CXX
31072  for ac_prog in $CXX
31073do
31074  # Extract the first word of "$ac_prog", so it can be a program name with args.
31075set dummy $ac_prog; ac_word=$2
31076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31077$as_echo_n "checking for $ac_word... " >&6; }
31078if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31079  $as_echo_n "(cached) " >&6
31080else
31081  if test -n "$ac_ct_CXX"; then
31082  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31083else
31084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31085for as_dir in $PATH
31086do
31087  IFS=$as_save_IFS
31088  test -z "$as_dir" && as_dir=.
31089    for ac_exec_ext in '' $ac_executable_extensions; do
31090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31091    ac_cv_prog_ac_ct_CXX="$ac_prog"
31092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31093    break 2
31094  fi
31095done
31096  done
31097IFS=$as_save_IFS
31098
31099fi
31100fi
31101ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31102if test -n "$ac_ct_CXX"; then
31103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31104$as_echo "$ac_ct_CXX" >&6; }
31105else
31106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31107$as_echo "no" >&6; }
31108fi
31109
31110
31111  test -n "$ac_ct_CXX" && break
31112done
31113
31114  if test "x$ac_ct_CXX" = x; then
31115    CXX="g++"
31116  else
31117    case $cross_compiling:$ac_tool_warned in
31118yes:)
31119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31121ac_tool_warned=yes ;;
31122esac
31123    CXX=$ac_ct_CXX
31124  fi
31125fi
31126
31127  fi
31128fi
31129# Provide some information about the compiler.
31130$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31131set X $ac_compile
31132ac_compiler=$2
31133for ac_option in --version -v -V -qversion; do
31134  { { ac_try="$ac_compiler $ac_option >&5"
31135case "(($ac_try" in
31136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31137  *) ac_try_echo=$ac_try;;
31138esac
31139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31140$as_echo "$ac_try_echo"; } >&5
31141  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31142  ac_status=$?
31143  if test -s conftest.err; then
31144    sed '10a\
31145... rest of stderr output deleted ...
31146         10q' conftest.err >conftest.er1
31147    cat conftest.er1 >&5
31148  fi
31149  rm -f conftest.er1 conftest.err
31150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31151  test $ac_status = 0; }
31152done
31153
31154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31155$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31156if ${ac_cv_cxx_compiler_gnu+:} false; then :
31157  $as_echo_n "(cached) " >&6
31158else
31159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31160/* end confdefs.h.  */
31161
31162int
31163main ()
31164{
31165#ifndef __GNUC__
31166       choke me
31167#endif
31168
31169  ;
31170  return 0;
31171}
31172_ACEOF
31173if ac_fn_cxx_try_compile "$LINENO"; then :
31174  ac_compiler_gnu=yes
31175else
31176  ac_compiler_gnu=no
31177fi
31178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31179ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31180
31181fi
31182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31183$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31184if test $ac_compiler_gnu = yes; then
31185  GXX=yes
31186else
31187  GXX=
31188fi
31189ac_test_CXXFLAGS=${CXXFLAGS+set}
31190ac_save_CXXFLAGS=$CXXFLAGS
31191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31192$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31193if ${ac_cv_prog_cxx_g+:} false; then :
31194  $as_echo_n "(cached) " >&6
31195else
31196  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31197   ac_cxx_werror_flag=yes
31198   ac_cv_prog_cxx_g=no
31199   CXXFLAGS="-g"
31200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31201/* end confdefs.h.  */
31202
31203int
31204main ()
31205{
31206
31207  ;
31208  return 0;
31209}
31210_ACEOF
31211if ac_fn_cxx_try_compile "$LINENO"; then :
31212  ac_cv_prog_cxx_g=yes
31213else
31214  CXXFLAGS=""
31215      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31216/* end confdefs.h.  */
31217
31218int
31219main ()
31220{
31221
31222  ;
31223  return 0;
31224}
31225_ACEOF
31226if ac_fn_cxx_try_compile "$LINENO"; then :
31227
31228else
31229  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31230	 CXXFLAGS="-g"
31231	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31232/* end confdefs.h.  */
31233
31234int
31235main ()
31236{
31237
31238  ;
31239  return 0;
31240}
31241_ACEOF
31242if ac_fn_cxx_try_compile "$LINENO"; then :
31243  ac_cv_prog_cxx_g=yes
31244fi
31245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31246fi
31247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31248fi
31249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31250   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31251fi
31252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31253$as_echo "$ac_cv_prog_cxx_g" >&6; }
31254if test "$ac_test_CXXFLAGS" = set; then
31255  CXXFLAGS=$ac_save_CXXFLAGS
31256elif test $ac_cv_prog_cxx_g = yes; then
31257  if test "$GXX" = yes; then
31258    CXXFLAGS="-g -O2"
31259  else
31260    CXXFLAGS="-g"
31261  fi
31262else
31263  if test "$GXX" = yes; then
31264    CXXFLAGS="-O2"
31265  else
31266    CXXFLAGS=
31267  fi
31268fi
31269ac_ext=cpp
31270ac_cpp='$CXXCPP $CPPFLAGS'
31271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31274
31275
31276  #
31277  # Setup the preprocessor (CPP and CXXCPP)
31278  #
31279  ac_ext=c
31280ac_cpp='$CPP $CPPFLAGS'
31281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31283ac_compiler_gnu=$ac_cv_c_compiler_gnu
31284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31285$as_echo_n "checking how to run the C preprocessor... " >&6; }
31286# On Suns, sometimes $CPP names a directory.
31287if test -n "$CPP" && test -d "$CPP"; then
31288  CPP=
31289fi
31290if test -z "$CPP"; then
31291  if ${ac_cv_prog_CPP+:} false; then :
31292  $as_echo_n "(cached) " >&6
31293else
31294      # Double quotes because CPP needs to be expanded
31295    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31296    do
31297      ac_preproc_ok=false
31298for ac_c_preproc_warn_flag in '' yes
31299do
31300  # Use a header file that comes with gcc, so configuring glibc
31301  # with a fresh cross-compiler works.
31302  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31303  # <limits.h> exists even on freestanding compilers.
31304  # On the NeXT, cc -E runs the code through the compiler's parser,
31305  # not just through cpp. "Syntax error" is here to catch this case.
31306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31307/* end confdefs.h.  */
31308#ifdef __STDC__
31309# include <limits.h>
31310#else
31311# include <assert.h>
31312#endif
31313		     Syntax error
31314_ACEOF
31315if ac_fn_c_try_cpp "$LINENO"; then :
31316
31317else
31318  # Broken: fails on valid input.
31319continue
31320fi
31321rm -f conftest.err conftest.i conftest.$ac_ext
31322
31323  # OK, works on sane cases.  Now check whether nonexistent headers
31324  # can be detected and how.
31325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31326/* end confdefs.h.  */
31327#include <ac_nonexistent.h>
31328_ACEOF
31329if ac_fn_c_try_cpp "$LINENO"; then :
31330  # Broken: success on invalid input.
31331continue
31332else
31333  # Passes both tests.
31334ac_preproc_ok=:
31335break
31336fi
31337rm -f conftest.err conftest.i conftest.$ac_ext
31338
31339done
31340# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31341rm -f conftest.i conftest.err conftest.$ac_ext
31342if $ac_preproc_ok; then :
31343  break
31344fi
31345
31346    done
31347    ac_cv_prog_CPP=$CPP
31348
31349fi
31350  CPP=$ac_cv_prog_CPP
31351else
31352  ac_cv_prog_CPP=$CPP
31353fi
31354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31355$as_echo "$CPP" >&6; }
31356ac_preproc_ok=false
31357for ac_c_preproc_warn_flag in '' yes
31358do
31359  # Use a header file that comes with gcc, so configuring glibc
31360  # with a fresh cross-compiler works.
31361  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31362  # <limits.h> exists even on freestanding compilers.
31363  # On the NeXT, cc -E runs the code through the compiler's parser,
31364  # not just through cpp. "Syntax error" is here to catch this case.
31365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31366/* end confdefs.h.  */
31367#ifdef __STDC__
31368# include <limits.h>
31369#else
31370# include <assert.h>
31371#endif
31372		     Syntax error
31373_ACEOF
31374if ac_fn_c_try_cpp "$LINENO"; then :
31375
31376else
31377  # Broken: fails on valid input.
31378continue
31379fi
31380rm -f conftest.err conftest.i conftest.$ac_ext
31381
31382  # OK, works on sane cases.  Now check whether nonexistent headers
31383  # can be detected and how.
31384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31385/* end confdefs.h.  */
31386#include <ac_nonexistent.h>
31387_ACEOF
31388if ac_fn_c_try_cpp "$LINENO"; then :
31389  # Broken: success on invalid input.
31390continue
31391else
31392  # Passes both tests.
31393ac_preproc_ok=:
31394break
31395fi
31396rm -f conftest.err conftest.i conftest.$ac_ext
31397
31398done
31399# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31400rm -f conftest.i conftest.err conftest.$ac_ext
31401if $ac_preproc_ok; then :
31402
31403else
31404  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31406as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31407See \`config.log' for more details" "$LINENO" 5; }
31408fi
31409
31410ac_ext=cpp
31411ac_cpp='$CXXCPP $CPPFLAGS'
31412ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31413ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31414ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31415
31416
31417  # Only process if variable expands to non-empty
31418
31419  if test "x$CPP" != x; then
31420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31421
31422  # First separate the path from the arguments. This will split at the first
31423  # space.
31424  complete="$CPP"
31425  path="${complete%% *}"
31426  tmp="$complete EOL"
31427  arguments="${tmp#* }"
31428
31429  # Input might be given as Windows format, start by converting to
31430  # unix format.
31431  new_path=`$CYGPATH -u "$path"`
31432
31433  # Now try to locate executable using which
31434  new_path=`$WHICH "$new_path" 2> /dev/null`
31435  # bat and cmd files are not always considered executable in cygwin causing which
31436  # to not find them
31437  if test "x$new_path" = x \
31438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31440    new_path=`$CYGPATH -u "$path"`
31441  fi
31442  if test "x$new_path" = x; then
31443    # Oops. Which didn't find the executable.
31444    # The splitting of arguments from the executable at a space might have been incorrect,
31445    # since paths with space are more likely in Windows. Give it another try with the whole
31446    # argument.
31447    path="$complete"
31448    arguments="EOL"
31449    new_path=`$CYGPATH -u "$path"`
31450    new_path=`$WHICH "$new_path" 2> /dev/null`
31451    # bat and cmd files are not always considered executable in cygwin causing which
31452    # to not find them
31453    if test "x$new_path" = x \
31454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31456      new_path=`$CYGPATH -u "$path"`
31457    fi
31458    if test "x$new_path" = x; then
31459      # It's still not found. Now this is an unrecoverable error.
31460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31461$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31462      has_space=`$ECHO "$complete" | $GREP " "`
31463      if test "x$has_space" != x; then
31464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31466      fi
31467      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31468    fi
31469  fi
31470
31471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31474  # "foo.exe" is OK but "foo" is an error.
31475  #
31476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31477  # It is also a way to make sure we got the proper file name for the real test later on.
31478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31479  if test "x$test_shortpath" = x; then
31480    # Short path failed, file does not exist as specified.
31481    # Try adding .exe or .cmd
31482    if test -f "${new_path}.exe"; then
31483      input_to_shortpath="${new_path}.exe"
31484    elif test -f "${new_path}.cmd"; then
31485      input_to_shortpath="${new_path}.cmd"
31486    else
31487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31488$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31491      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31492    fi
31493  else
31494    input_to_shortpath="$new_path"
31495  fi
31496
31497  # Call helper function which possibly converts this using DOS-style short mode.
31498  # If so, the updated path is stored in $new_path.
31499  new_path="$input_to_shortpath"
31500
31501  input_path="$input_to_shortpath"
31502  # Check if we need to convert this using DOS-style short mode. If the path
31503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31504  # take no chances and rewrite it.
31505  # Note: m4 eats our [], so we need to use [ and ] instead.
31506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31507  if test "x$has_forbidden_chars" != x; then
31508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31512      # Going to short mode and back again did indeed matter. Since short mode is
31513      # case insensitive, let's make it lowercase to improve readability.
31514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31515      # Now convert it back to Unix-style (cygpath)
31516      input_path=`$CYGPATH -u "$shortmode_path"`
31517      new_path="$input_path"
31518    fi
31519  fi
31520
31521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31522  if test "x$test_cygdrive_prefix" = x; then
31523    # As a simple fix, exclude /usr/bin since it's not a real path.
31524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31526      # a path prefixed by /cygdrive for fixpath to work.
31527      new_path="$CYGWIN_ROOT_PATH$input_path"
31528    fi
31529  fi
31530
31531  # remove trailing .exe if any
31532  new_path="${new_path/%.exe/}"
31533
31534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31535
31536  # First separate the path from the arguments. This will split at the first
31537  # space.
31538  complete="$CPP"
31539  path="${complete%% *}"
31540  tmp="$complete EOL"
31541  arguments="${tmp#* }"
31542
31543  # Input might be given as Windows format, start by converting to
31544  # unix format.
31545  new_path="$path"
31546
31547  windows_path="$new_path"
31548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31549    unix_path=`$CYGPATH -u "$windows_path"`
31550    new_path="$unix_path"
31551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31553    new_path="$unix_path"
31554  fi
31555
31556
31557  # Now try to locate executable using which
31558  new_path=`$WHICH "$new_path" 2> /dev/null`
31559
31560  if test "x$new_path" = x; then
31561    # Oops. Which didn't find the executable.
31562    # The splitting of arguments from the executable at a space might have been incorrect,
31563    # since paths with space are more likely in Windows. Give it another try with the whole
31564    # argument.
31565    path="$complete"
31566    arguments="EOL"
31567    new_path="$path"
31568
31569  windows_path="$new_path"
31570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31571    unix_path=`$CYGPATH -u "$windows_path"`
31572    new_path="$unix_path"
31573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31575    new_path="$unix_path"
31576  fi
31577
31578
31579    new_path=`$WHICH "$new_path" 2> /dev/null`
31580    # bat and cmd files are not always considered executable in MSYS causing which
31581    # to not find them
31582    if test "x$new_path" = x \
31583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31585      new_path="$path"
31586
31587  windows_path="$new_path"
31588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31589    unix_path=`$CYGPATH -u "$windows_path"`
31590    new_path="$unix_path"
31591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31593    new_path="$unix_path"
31594  fi
31595
31596    fi
31597
31598    if test "x$new_path" = x; then
31599      # It's still not found. Now this is an unrecoverable error.
31600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31601$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31602      has_space=`$ECHO "$complete" | $GREP " "`
31603      if test "x$has_space" != x; then
31604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31606      fi
31607      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31608    fi
31609  fi
31610
31611  # Now new_path has a complete unix path to the binary
31612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31613    # Keep paths in /bin as-is, but remove trailing .exe if any
31614    new_path="${new_path/%.exe/}"
31615    # Do not save /bin paths to all_fixpath_prefixes!
31616  else
31617    # Not in mixed or Windows style, start by that.
31618    new_path=`cmd //c echo $new_path`
31619
31620  input_path="$new_path"
31621  # Check if we need to convert this using DOS-style short mode. If the path
31622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31623  # take no chances and rewrite it.
31624  # Note: m4 eats our [], so we need to use [ and ] instead.
31625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31626  if test "x$has_forbidden_chars" != x; then
31627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31629  fi
31630
31631    # Output is in $new_path
31632
31633  windows_path="$new_path"
31634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31635    unix_path=`$CYGPATH -u "$windows_path"`
31636    new_path="$unix_path"
31637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31639    new_path="$unix_path"
31640  fi
31641
31642    # remove trailing .exe if any
31643    new_path="${new_path/%.exe/}"
31644
31645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31647  fi
31648
31649    else
31650      # We're on a unix platform. Hooray! :)
31651      # First separate the path from the arguments. This will split at the first
31652      # space.
31653      complete="$CPP"
31654      path="${complete%% *}"
31655      tmp="$complete EOL"
31656      arguments="${tmp#* }"
31657
31658      # Cannot rely on the command "which" here since it doesn't always work.
31659      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31660      if test -z "$is_absolute_path"; then
31661        # Path to executable is not absolute. Find it.
31662        IFS_save="$IFS"
31663        IFS=:
31664        for p in $PATH; do
31665          if test -f "$p/$path" && test -x "$p/$path"; then
31666            new_path="$p/$path"
31667            break
31668          fi
31669        done
31670        IFS="$IFS_save"
31671      else
31672        # This is an absolute path, we can use it without further modifications.
31673        new_path="$path"
31674      fi
31675
31676      if test "x$new_path" = x; then
31677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31678$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31679        has_space=`$ECHO "$complete" | $GREP " "`
31680        if test "x$has_space" != x; then
31681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31683        fi
31684        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31685      fi
31686    fi
31687
31688    # Now join together the path and the arguments once again
31689    if test "x$arguments" != xEOL; then
31690      new_complete="$new_path ${arguments% *}"
31691    else
31692      new_complete="$new_path"
31693    fi
31694
31695    if test "x$complete" != "x$new_complete"; then
31696      CPP="$new_complete"
31697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31698$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31699    fi
31700  fi
31701
31702  ac_ext=cpp
31703ac_cpp='$CXXCPP $CPPFLAGS'
31704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31708$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31709if test -z "$CXXCPP"; then
31710  if ${ac_cv_prog_CXXCPP+:} false; then :
31711  $as_echo_n "(cached) " >&6
31712else
31713      # Double quotes because CXXCPP needs to be expanded
31714    for CXXCPP in "$CXX -E" "/lib/cpp"
31715    do
31716      ac_preproc_ok=false
31717for ac_cxx_preproc_warn_flag in '' yes
31718do
31719  # Use a header file that comes with gcc, so configuring glibc
31720  # with a fresh cross-compiler works.
31721  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31722  # <limits.h> exists even on freestanding compilers.
31723  # On the NeXT, cc -E runs the code through the compiler's parser,
31724  # not just through cpp. "Syntax error" is here to catch this case.
31725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31726/* end confdefs.h.  */
31727#ifdef __STDC__
31728# include <limits.h>
31729#else
31730# include <assert.h>
31731#endif
31732		     Syntax error
31733_ACEOF
31734if ac_fn_cxx_try_cpp "$LINENO"; then :
31735
31736else
31737  # Broken: fails on valid input.
31738continue
31739fi
31740rm -f conftest.err conftest.i conftest.$ac_ext
31741
31742  # OK, works on sane cases.  Now check whether nonexistent headers
31743  # can be detected and how.
31744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31745/* end confdefs.h.  */
31746#include <ac_nonexistent.h>
31747_ACEOF
31748if ac_fn_cxx_try_cpp "$LINENO"; then :
31749  # Broken: success on invalid input.
31750continue
31751else
31752  # Passes both tests.
31753ac_preproc_ok=:
31754break
31755fi
31756rm -f conftest.err conftest.i conftest.$ac_ext
31757
31758done
31759# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31760rm -f conftest.i conftest.err conftest.$ac_ext
31761if $ac_preproc_ok; then :
31762  break
31763fi
31764
31765    done
31766    ac_cv_prog_CXXCPP=$CXXCPP
31767
31768fi
31769  CXXCPP=$ac_cv_prog_CXXCPP
31770else
31771  ac_cv_prog_CXXCPP=$CXXCPP
31772fi
31773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31774$as_echo "$CXXCPP" >&6; }
31775ac_preproc_ok=false
31776for ac_cxx_preproc_warn_flag in '' yes
31777do
31778  # Use a header file that comes with gcc, so configuring glibc
31779  # with a fresh cross-compiler works.
31780  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31781  # <limits.h> exists even on freestanding compilers.
31782  # On the NeXT, cc -E runs the code through the compiler's parser,
31783  # not just through cpp. "Syntax error" is here to catch this case.
31784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31785/* end confdefs.h.  */
31786#ifdef __STDC__
31787# include <limits.h>
31788#else
31789# include <assert.h>
31790#endif
31791		     Syntax error
31792_ACEOF
31793if ac_fn_cxx_try_cpp "$LINENO"; then :
31794
31795else
31796  # Broken: fails on valid input.
31797continue
31798fi
31799rm -f conftest.err conftest.i conftest.$ac_ext
31800
31801  # OK, works on sane cases.  Now check whether nonexistent headers
31802  # can be detected and how.
31803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31804/* end confdefs.h.  */
31805#include <ac_nonexistent.h>
31806_ACEOF
31807if ac_fn_cxx_try_cpp "$LINENO"; then :
31808  # Broken: success on invalid input.
31809continue
31810else
31811  # Passes both tests.
31812ac_preproc_ok=:
31813break
31814fi
31815rm -f conftest.err conftest.i conftest.$ac_ext
31816
31817done
31818# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31819rm -f conftest.i conftest.err conftest.$ac_ext
31820if $ac_preproc_ok; then :
31821
31822else
31823  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31825as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31826See \`config.log' for more details" "$LINENO" 5; }
31827fi
31828
31829ac_ext=cpp
31830ac_cpp='$CXXCPP $CPPFLAGS'
31831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31834
31835
31836  # Only process if variable expands to non-empty
31837
31838  if test "x$CXXCPP" != x; then
31839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31840
31841  # First separate the path from the arguments. This will split at the first
31842  # space.
31843  complete="$CXXCPP"
31844  path="${complete%% *}"
31845  tmp="$complete EOL"
31846  arguments="${tmp#* }"
31847
31848  # Input might be given as Windows format, start by converting to
31849  # unix format.
31850  new_path=`$CYGPATH -u "$path"`
31851
31852  # Now try to locate executable using which
31853  new_path=`$WHICH "$new_path" 2> /dev/null`
31854  # bat and cmd files are not always considered executable in cygwin causing which
31855  # to not find them
31856  if test "x$new_path" = x \
31857      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31858      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31859    new_path=`$CYGPATH -u "$path"`
31860  fi
31861  if test "x$new_path" = x; then
31862    # Oops. Which didn't find the executable.
31863    # The splitting of arguments from the executable at a space might have been incorrect,
31864    # since paths with space are more likely in Windows. Give it another try with the whole
31865    # argument.
31866    path="$complete"
31867    arguments="EOL"
31868    new_path=`$CYGPATH -u "$path"`
31869    new_path=`$WHICH "$new_path" 2> /dev/null`
31870    # bat and cmd files are not always considered executable in cygwin causing which
31871    # to not find them
31872    if test "x$new_path" = x \
31873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31875      new_path=`$CYGPATH -u "$path"`
31876    fi
31877    if test "x$new_path" = x; then
31878      # It's still not found. Now this is an unrecoverable error.
31879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31880$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31881      has_space=`$ECHO "$complete" | $GREP " "`
31882      if test "x$has_space" != x; then
31883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31885      fi
31886      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31887    fi
31888  fi
31889
31890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31893  # "foo.exe" is OK but "foo" is an error.
31894  #
31895  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31896  # It is also a way to make sure we got the proper file name for the real test later on.
31897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31898  if test "x$test_shortpath" = x; then
31899    # Short path failed, file does not exist as specified.
31900    # Try adding .exe or .cmd
31901    if test -f "${new_path}.exe"; then
31902      input_to_shortpath="${new_path}.exe"
31903    elif test -f "${new_path}.cmd"; then
31904      input_to_shortpath="${new_path}.cmd"
31905    else
31906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31907$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31910      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31911    fi
31912  else
31913    input_to_shortpath="$new_path"
31914  fi
31915
31916  # Call helper function which possibly converts this using DOS-style short mode.
31917  # If so, the updated path is stored in $new_path.
31918  new_path="$input_to_shortpath"
31919
31920  input_path="$input_to_shortpath"
31921  # Check if we need to convert this using DOS-style short mode. If the path
31922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31923  # take no chances and rewrite it.
31924  # Note: m4 eats our [], so we need to use [ and ] instead.
31925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31926  if test "x$has_forbidden_chars" != x; then
31927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31931      # Going to short mode and back again did indeed matter. Since short mode is
31932      # case insensitive, let's make it lowercase to improve readability.
31933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31934      # Now convert it back to Unix-style (cygpath)
31935      input_path=`$CYGPATH -u "$shortmode_path"`
31936      new_path="$input_path"
31937    fi
31938  fi
31939
31940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31941  if test "x$test_cygdrive_prefix" = x; then
31942    # As a simple fix, exclude /usr/bin since it's not a real path.
31943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31945      # a path prefixed by /cygdrive for fixpath to work.
31946      new_path="$CYGWIN_ROOT_PATH$input_path"
31947    fi
31948  fi
31949
31950  # remove trailing .exe if any
31951  new_path="${new_path/%.exe/}"
31952
31953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31954
31955  # First separate the path from the arguments. This will split at the first
31956  # space.
31957  complete="$CXXCPP"
31958  path="${complete%% *}"
31959  tmp="$complete EOL"
31960  arguments="${tmp#* }"
31961
31962  # Input might be given as Windows format, start by converting to
31963  # unix format.
31964  new_path="$path"
31965
31966  windows_path="$new_path"
31967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31968    unix_path=`$CYGPATH -u "$windows_path"`
31969    new_path="$unix_path"
31970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31972    new_path="$unix_path"
31973  fi
31974
31975
31976  # Now try to locate executable using which
31977  new_path=`$WHICH "$new_path" 2> /dev/null`
31978
31979  if test "x$new_path" = x; then
31980    # Oops. Which didn't find the executable.
31981    # The splitting of arguments from the executable at a space might have been incorrect,
31982    # since paths with space are more likely in Windows. Give it another try with the whole
31983    # argument.
31984    path="$complete"
31985    arguments="EOL"
31986    new_path="$path"
31987
31988  windows_path="$new_path"
31989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31990    unix_path=`$CYGPATH -u "$windows_path"`
31991    new_path="$unix_path"
31992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31994    new_path="$unix_path"
31995  fi
31996
31997
31998    new_path=`$WHICH "$new_path" 2> /dev/null`
31999    # bat and cmd files are not always considered executable in MSYS causing which
32000    # to not find them
32001    if test "x$new_path" = x \
32002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32004      new_path="$path"
32005
32006  windows_path="$new_path"
32007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32008    unix_path=`$CYGPATH -u "$windows_path"`
32009    new_path="$unix_path"
32010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32012    new_path="$unix_path"
32013  fi
32014
32015    fi
32016
32017    if test "x$new_path" = x; then
32018      # It's still not found. Now this is an unrecoverable error.
32019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32020$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32021      has_space=`$ECHO "$complete" | $GREP " "`
32022      if test "x$has_space" != x; then
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32025      fi
32026      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32027    fi
32028  fi
32029
32030  # Now new_path has a complete unix path to the binary
32031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32032    # Keep paths in /bin as-is, but remove trailing .exe if any
32033    new_path="${new_path/%.exe/}"
32034    # Do not save /bin paths to all_fixpath_prefixes!
32035  else
32036    # Not in mixed or Windows style, start by that.
32037    new_path=`cmd //c echo $new_path`
32038
32039  input_path="$new_path"
32040  # Check if we need to convert this using DOS-style short mode. If the path
32041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32042  # take no chances and rewrite it.
32043  # Note: m4 eats our [], so we need to use [ and ] instead.
32044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32045  if test "x$has_forbidden_chars" != x; then
32046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32048  fi
32049
32050    # Output is in $new_path
32051
32052  windows_path="$new_path"
32053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32054    unix_path=`$CYGPATH -u "$windows_path"`
32055    new_path="$unix_path"
32056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32058    new_path="$unix_path"
32059  fi
32060
32061    # remove trailing .exe if any
32062    new_path="${new_path/%.exe/}"
32063
32064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32066  fi
32067
32068    else
32069      # We're on a unix platform. Hooray! :)
32070      # First separate the path from the arguments. This will split at the first
32071      # space.
32072      complete="$CXXCPP"
32073      path="${complete%% *}"
32074      tmp="$complete EOL"
32075      arguments="${tmp#* }"
32076
32077      # Cannot rely on the command "which" here since it doesn't always work.
32078      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32079      if test -z "$is_absolute_path"; then
32080        # Path to executable is not absolute. Find it.
32081        IFS_save="$IFS"
32082        IFS=:
32083        for p in $PATH; do
32084          if test -f "$p/$path" && test -x "$p/$path"; then
32085            new_path="$p/$path"
32086            break
32087          fi
32088        done
32089        IFS="$IFS_save"
32090      else
32091        # This is an absolute path, we can use it without further modifications.
32092        new_path="$path"
32093      fi
32094
32095      if test "x$new_path" = x; then
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32097$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32098        has_space=`$ECHO "$complete" | $GREP " "`
32099        if test "x$has_space" != x; then
32100          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32102        fi
32103        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32104      fi
32105    fi
32106
32107    # Now join together the path and the arguments once again
32108    if test "x$arguments" != xEOL; then
32109      new_complete="$new_path ${arguments% *}"
32110    else
32111      new_complete="$new_path"
32112    fi
32113
32114    if test "x$complete" != "x$new_complete"; then
32115      CXXCPP="$new_complete"
32116      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32117$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32118    fi
32119  fi
32120
32121
32122  #
32123  # Setup the linker (LD)
32124  #
32125  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32126    # In the Microsoft toolchain we have a separate LD command "link".
32127    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32128    # a cygwin program for something completely different.
32129    # Extract the first word of "link", so it can be a program name with args.
32130set dummy link; ac_word=$2
32131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32132$as_echo_n "checking for $ac_word... " >&6; }
32133if ${ac_cv_prog_LD+:} false; then :
32134  $as_echo_n "(cached) " >&6
32135else
32136  if test -n "$LD"; then
32137  ac_cv_prog_LD="$LD" # Let the user override the test.
32138else
32139  ac_prog_rejected=no
32140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32141for as_dir in $PATH
32142do
32143  IFS=$as_save_IFS
32144  test -z "$as_dir" && as_dir=.
32145    for ac_exec_ext in '' $ac_executable_extensions; do
32146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32147    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32148       ac_prog_rejected=yes
32149       continue
32150     fi
32151    ac_cv_prog_LD="link"
32152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32153    break 2
32154  fi
32155done
32156  done
32157IFS=$as_save_IFS
32158
32159if test $ac_prog_rejected = yes; then
32160  # We found a bogon in the path, so make sure we never use it.
32161  set dummy $ac_cv_prog_LD
32162  shift
32163  if test $# != 0; then
32164    # We chose a different compiler from the bogus one.
32165    # However, it has the same basename, so the bogon will be chosen
32166    # first if we set LD to just the basename; use the full file name.
32167    shift
32168    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32169  fi
32170fi
32171fi
32172fi
32173LD=$ac_cv_prog_LD
32174if test -n "$LD"; then
32175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32176$as_echo "$LD" >&6; }
32177else
32178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32179$as_echo "no" >&6; }
32180fi
32181
32182
32183
32184  # Only process if variable expands to non-empty
32185
32186  if test "x$LD" != x; then
32187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32188
32189  # First separate the path from the arguments. This will split at the first
32190  # space.
32191  complete="$LD"
32192  path="${complete%% *}"
32193  tmp="$complete EOL"
32194  arguments="${tmp#* }"
32195
32196  # Input might be given as Windows format, start by converting to
32197  # unix format.
32198  new_path=`$CYGPATH -u "$path"`
32199
32200  # Now try to locate executable using which
32201  new_path=`$WHICH "$new_path" 2> /dev/null`
32202  # bat and cmd files are not always considered executable in cygwin causing which
32203  # to not find them
32204  if test "x$new_path" = x \
32205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32207    new_path=`$CYGPATH -u "$path"`
32208  fi
32209  if test "x$new_path" = x; then
32210    # Oops. Which didn't find the executable.
32211    # The splitting of arguments from the executable at a space might have been incorrect,
32212    # since paths with space are more likely in Windows. Give it another try with the whole
32213    # argument.
32214    path="$complete"
32215    arguments="EOL"
32216    new_path=`$CYGPATH -u "$path"`
32217    new_path=`$WHICH "$new_path" 2> /dev/null`
32218    # bat and cmd files are not always considered executable in cygwin causing which
32219    # to not find them
32220    if test "x$new_path" = x \
32221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32223      new_path=`$CYGPATH -u "$path"`
32224    fi
32225    if test "x$new_path" = x; then
32226      # It's still not found. Now this is an unrecoverable error.
32227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32228$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32229      has_space=`$ECHO "$complete" | $GREP " "`
32230      if test "x$has_space" != x; then
32231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32233      fi
32234      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32235    fi
32236  fi
32237
32238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32241  # "foo.exe" is OK but "foo" is an error.
32242  #
32243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32244  # It is also a way to make sure we got the proper file name for the real test later on.
32245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32246  if test "x$test_shortpath" = x; then
32247    # Short path failed, file does not exist as specified.
32248    # Try adding .exe or .cmd
32249    if test -f "${new_path}.exe"; then
32250      input_to_shortpath="${new_path}.exe"
32251    elif test -f "${new_path}.cmd"; then
32252      input_to_shortpath="${new_path}.cmd"
32253    else
32254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32255$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32258      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32259    fi
32260  else
32261    input_to_shortpath="$new_path"
32262  fi
32263
32264  # Call helper function which possibly converts this using DOS-style short mode.
32265  # If so, the updated path is stored in $new_path.
32266  new_path="$input_to_shortpath"
32267
32268  input_path="$input_to_shortpath"
32269  # Check if we need to convert this using DOS-style short mode. If the path
32270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32271  # take no chances and rewrite it.
32272  # Note: m4 eats our [], so we need to use [ and ] instead.
32273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32274  if test "x$has_forbidden_chars" != x; then
32275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32279      # Going to short mode and back again did indeed matter. Since short mode is
32280      # case insensitive, let's make it lowercase to improve readability.
32281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32282      # Now convert it back to Unix-style (cygpath)
32283      input_path=`$CYGPATH -u "$shortmode_path"`
32284      new_path="$input_path"
32285    fi
32286  fi
32287
32288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32289  if test "x$test_cygdrive_prefix" = x; then
32290    # As a simple fix, exclude /usr/bin since it's not a real path.
32291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32293      # a path prefixed by /cygdrive for fixpath to work.
32294      new_path="$CYGWIN_ROOT_PATH$input_path"
32295    fi
32296  fi
32297
32298  # remove trailing .exe if any
32299  new_path="${new_path/%.exe/}"
32300
32301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32302
32303  # First separate the path from the arguments. This will split at the first
32304  # space.
32305  complete="$LD"
32306  path="${complete%% *}"
32307  tmp="$complete EOL"
32308  arguments="${tmp#* }"
32309
32310  # Input might be given as Windows format, start by converting to
32311  # unix format.
32312  new_path="$path"
32313
32314  windows_path="$new_path"
32315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32316    unix_path=`$CYGPATH -u "$windows_path"`
32317    new_path="$unix_path"
32318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32320    new_path="$unix_path"
32321  fi
32322
32323
32324  # Now try to locate executable using which
32325  new_path=`$WHICH "$new_path" 2> /dev/null`
32326
32327  if test "x$new_path" = x; then
32328    # Oops. Which didn't find the executable.
32329    # The splitting of arguments from the executable at a space might have been incorrect,
32330    # since paths with space are more likely in Windows. Give it another try with the whole
32331    # argument.
32332    path="$complete"
32333    arguments="EOL"
32334    new_path="$path"
32335
32336  windows_path="$new_path"
32337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32338    unix_path=`$CYGPATH -u "$windows_path"`
32339    new_path="$unix_path"
32340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32342    new_path="$unix_path"
32343  fi
32344
32345
32346    new_path=`$WHICH "$new_path" 2> /dev/null`
32347    # bat and cmd files are not always considered executable in MSYS causing which
32348    # to not find them
32349    if test "x$new_path" = x \
32350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32352      new_path="$path"
32353
32354  windows_path="$new_path"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    unix_path=`$CYGPATH -u "$windows_path"`
32357    new_path="$unix_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360    new_path="$unix_path"
32361  fi
32362
32363    fi
32364
32365    if test "x$new_path" = x; then
32366      # It's still not found. Now this is an unrecoverable error.
32367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32368$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32369      has_space=`$ECHO "$complete" | $GREP " "`
32370      if test "x$has_space" != x; then
32371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32373      fi
32374      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32375    fi
32376  fi
32377
32378  # Now new_path has a complete unix path to the binary
32379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32380    # Keep paths in /bin as-is, but remove trailing .exe if any
32381    new_path="${new_path/%.exe/}"
32382    # Do not save /bin paths to all_fixpath_prefixes!
32383  else
32384    # Not in mixed or Windows style, start by that.
32385    new_path=`cmd //c echo $new_path`
32386
32387  input_path="$new_path"
32388  # Check if we need to convert this using DOS-style short mode. If the path
32389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32390  # take no chances and rewrite it.
32391  # Note: m4 eats our [], so we need to use [ and ] instead.
32392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32393  if test "x$has_forbidden_chars" != x; then
32394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32396  fi
32397
32398    # Output is in $new_path
32399
32400  windows_path="$new_path"
32401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402    unix_path=`$CYGPATH -u "$windows_path"`
32403    new_path="$unix_path"
32404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406    new_path="$unix_path"
32407  fi
32408
32409    # remove trailing .exe if any
32410    new_path="${new_path/%.exe/}"
32411
32412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32414  fi
32415
32416    else
32417      # We're on a unix platform. Hooray! :)
32418      # First separate the path from the arguments. This will split at the first
32419      # space.
32420      complete="$LD"
32421      path="${complete%% *}"
32422      tmp="$complete EOL"
32423      arguments="${tmp#* }"
32424
32425      # Cannot rely on the command "which" here since it doesn't always work.
32426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32427      if test -z "$is_absolute_path"; then
32428        # Path to executable is not absolute. Find it.
32429        IFS_save="$IFS"
32430        IFS=:
32431        for p in $PATH; do
32432          if test -f "$p/$path" && test -x "$p/$path"; then
32433            new_path="$p/$path"
32434            break
32435          fi
32436        done
32437        IFS="$IFS_save"
32438      else
32439        # This is an absolute path, we can use it without further modifications.
32440        new_path="$path"
32441      fi
32442
32443      if test "x$new_path" = x; then
32444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32445$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32446        has_space=`$ECHO "$complete" | $GREP " "`
32447        if test "x$has_space" != x; then
32448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32450        fi
32451        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32452      fi
32453    fi
32454
32455    # Now join together the path and the arguments once again
32456    if test "x$arguments" != xEOL; then
32457      new_complete="$new_path ${arguments% *}"
32458    else
32459      new_complete="$new_path"
32460    fi
32461
32462    if test "x$complete" != "x$new_complete"; then
32463      LD="$new_complete"
32464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32465$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32466    fi
32467  fi
32468
32469    # Verify that we indeed succeeded with this trick.
32470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32471$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32472    "$LD" --version > /dev/null
32473    if test $? -eq 0 ; then
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32475$as_echo "no" >&6; }
32476      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32477    else
32478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32479$as_echo "yes" >&6; }
32480    fi
32481    LDCXX="$LD"
32482  else
32483    # All other toolchains use the compiler to link.
32484    LD="$CC"
32485    LDCXX="$CXX"
32486  fi
32487
32488  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32489
32490
32491  #
32492  # Setup the assembler (AS)
32493  #
32494  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32495    # FIXME: should this really be solaris, or solstudio?
32496
32497
32498  # Publish this variable in the help.
32499
32500
32501  if test "x$AS" = x; then
32502    # The variable is not set by user, try to locate tool using the code snippet
32503    for ac_prog in as
32504do
32505  # Extract the first word of "$ac_prog", so it can be a program name with args.
32506set dummy $ac_prog; ac_word=$2
32507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32508$as_echo_n "checking for $ac_word... " >&6; }
32509if ${ac_cv_path_AS+:} false; then :
32510  $as_echo_n "(cached) " >&6
32511else
32512  case $AS in
32513  [\\/]* | ?:[\\/]*)
32514  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32515  ;;
32516  *)
32517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32518for as_dir in $PATH
32519do
32520  IFS=$as_save_IFS
32521  test -z "$as_dir" && as_dir=.
32522    for ac_exec_ext in '' $ac_executable_extensions; do
32523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32524    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32526    break 2
32527  fi
32528done
32529  done
32530IFS=$as_save_IFS
32531
32532  ;;
32533esac
32534fi
32535AS=$ac_cv_path_AS
32536if test -n "$AS"; then
32537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32538$as_echo "$AS" >&6; }
32539else
32540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32541$as_echo "no" >&6; }
32542fi
32543
32544
32545  test -n "$AS" && break
32546done
32547
32548  else
32549    # The variable is set, but is it from the command line or the environment?
32550
32551    # Try to remove the string !AS! from our list.
32552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32554      # If it failed, the variable was not from the command line. Ignore it,
32555      # but warn the user (except for BASH, which is always set by the calling BASH).
32556      if test "xAS" != xBASH; then
32557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32558$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32559      fi
32560      # Try to locate tool using the code snippet
32561      for ac_prog in as
32562do
32563  # Extract the first word of "$ac_prog", so it can be a program name with args.
32564set dummy $ac_prog; ac_word=$2
32565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32566$as_echo_n "checking for $ac_word... " >&6; }
32567if ${ac_cv_path_AS+:} false; then :
32568  $as_echo_n "(cached) " >&6
32569else
32570  case $AS in
32571  [\\/]* | ?:[\\/]*)
32572  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32573  ;;
32574  *)
32575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32576for as_dir in $PATH
32577do
32578  IFS=$as_save_IFS
32579  test -z "$as_dir" && as_dir=.
32580    for ac_exec_ext in '' $ac_executable_extensions; do
32581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32582    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32584    break 2
32585  fi
32586done
32587  done
32588IFS=$as_save_IFS
32589
32590  ;;
32591esac
32592fi
32593AS=$ac_cv_path_AS
32594if test -n "$AS"; then
32595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32596$as_echo "$AS" >&6; }
32597else
32598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32599$as_echo "no" >&6; }
32600fi
32601
32602
32603  test -n "$AS" && break
32604done
32605
32606    else
32607      # If it succeeded, then it was overridden by the user. We will use it
32608      # for the tool.
32609
32610      # First remove it from the list of overridden variables, so we can test
32611      # for unknown variables in the end.
32612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32613
32614      # Check if the provided tool contains a complete path.
32615      tool_specified="$AS"
32616      tool_basename="${tool_specified##*/}"
32617      if test "x$tool_basename" = "x$tool_specified"; then
32618        # A command without a complete path is provided, search $PATH.
32619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32620$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32621        # Extract the first word of "$tool_basename", so it can be a program name with args.
32622set dummy $tool_basename; ac_word=$2
32623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32624$as_echo_n "checking for $ac_word... " >&6; }
32625if ${ac_cv_path_AS+:} false; then :
32626  $as_echo_n "(cached) " >&6
32627else
32628  case $AS in
32629  [\\/]* | ?:[\\/]*)
32630  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32631  ;;
32632  *)
32633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32634for as_dir in $PATH
32635do
32636  IFS=$as_save_IFS
32637  test -z "$as_dir" && as_dir=.
32638    for ac_exec_ext in '' $ac_executable_extensions; do
32639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32640    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32642    break 2
32643  fi
32644done
32645  done
32646IFS=$as_save_IFS
32647
32648  ;;
32649esac
32650fi
32651AS=$ac_cv_path_AS
32652if test -n "$AS"; then
32653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32654$as_echo "$AS" >&6; }
32655else
32656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32657$as_echo "no" >&6; }
32658fi
32659
32660
32661        if test "x$AS" = x; then
32662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32663        fi
32664      else
32665        # Otherwise we believe it is a complete path. Use it as it is.
32666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32667$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32669$as_echo_n "checking for AS... " >&6; }
32670        if test ! -x "$tool_specified"; then
32671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32672$as_echo "not found" >&6; }
32673          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32674        fi
32675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32676$as_echo "$tool_specified" >&6; }
32677      fi
32678    fi
32679  fi
32680
32681
32682
32683  # Only process if variable expands to non-empty
32684
32685  if test "x$AS" != x; then
32686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687
32688  # First separate the path from the arguments. This will split at the first
32689  # space.
32690  complete="$AS"
32691  path="${complete%% *}"
32692  tmp="$complete EOL"
32693  arguments="${tmp#* }"
32694
32695  # Input might be given as Windows format, start by converting to
32696  # unix format.
32697  new_path=`$CYGPATH -u "$path"`
32698
32699  # Now try to locate executable using which
32700  new_path=`$WHICH "$new_path" 2> /dev/null`
32701  # bat and cmd files are not always considered executable in cygwin causing which
32702  # to not find them
32703  if test "x$new_path" = x \
32704      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32705      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32706    new_path=`$CYGPATH -u "$path"`
32707  fi
32708  if test "x$new_path" = x; then
32709    # Oops. Which didn't find the executable.
32710    # The splitting of arguments from the executable at a space might have been incorrect,
32711    # since paths with space are more likely in Windows. Give it another try with the whole
32712    # argument.
32713    path="$complete"
32714    arguments="EOL"
32715    new_path=`$CYGPATH -u "$path"`
32716    new_path=`$WHICH "$new_path" 2> /dev/null`
32717    # bat and cmd files are not always considered executable in cygwin causing which
32718    # to not find them
32719    if test "x$new_path" = x \
32720        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32721        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32722      new_path=`$CYGPATH -u "$path"`
32723    fi
32724    if test "x$new_path" = x; then
32725      # It's still not found. Now this is an unrecoverable error.
32726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32727$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32728      has_space=`$ECHO "$complete" | $GREP " "`
32729      if test "x$has_space" != x; then
32730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32732      fi
32733      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32734    fi
32735  fi
32736
32737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32740  # "foo.exe" is OK but "foo" is an error.
32741  #
32742  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32743  # It is also a way to make sure we got the proper file name for the real test later on.
32744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32745  if test "x$test_shortpath" = x; then
32746    # Short path failed, file does not exist as specified.
32747    # Try adding .exe or .cmd
32748    if test -f "${new_path}.exe"; then
32749      input_to_shortpath="${new_path}.exe"
32750    elif test -f "${new_path}.cmd"; then
32751      input_to_shortpath="${new_path}.cmd"
32752    else
32753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32754$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32755      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32756$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32757      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32758    fi
32759  else
32760    input_to_shortpath="$new_path"
32761  fi
32762
32763  # Call helper function which possibly converts this using DOS-style short mode.
32764  # If so, the updated path is stored in $new_path.
32765  new_path="$input_to_shortpath"
32766
32767  input_path="$input_to_shortpath"
32768  # Check if we need to convert this using DOS-style short mode. If the path
32769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32770  # take no chances and rewrite it.
32771  # Note: m4 eats our [], so we need to use [ and ] instead.
32772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32773  if test "x$has_forbidden_chars" != x; then
32774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32778      # Going to short mode and back again did indeed matter. Since short mode is
32779      # case insensitive, let's make it lowercase to improve readability.
32780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32781      # Now convert it back to Unix-style (cygpath)
32782      input_path=`$CYGPATH -u "$shortmode_path"`
32783      new_path="$input_path"
32784    fi
32785  fi
32786
32787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32788  if test "x$test_cygdrive_prefix" = x; then
32789    # As a simple fix, exclude /usr/bin since it's not a real path.
32790    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32792      # a path prefixed by /cygdrive for fixpath to work.
32793      new_path="$CYGWIN_ROOT_PATH$input_path"
32794    fi
32795  fi
32796
32797  # remove trailing .exe if any
32798  new_path="${new_path/%.exe/}"
32799
32800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32801
32802  # First separate the path from the arguments. This will split at the first
32803  # space.
32804  complete="$AS"
32805  path="${complete%% *}"
32806  tmp="$complete EOL"
32807  arguments="${tmp#* }"
32808
32809  # Input might be given as Windows format, start by converting to
32810  # unix format.
32811  new_path="$path"
32812
32813  windows_path="$new_path"
32814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815    unix_path=`$CYGPATH -u "$windows_path"`
32816    new_path="$unix_path"
32817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32819    new_path="$unix_path"
32820  fi
32821
32822
32823  # Now try to locate executable using which
32824  new_path=`$WHICH "$new_path" 2> /dev/null`
32825
32826  if test "x$new_path" = x; then
32827    # Oops. Which didn't find the executable.
32828    # The splitting of arguments from the executable at a space might have been incorrect,
32829    # since paths with space are more likely in Windows. Give it another try with the whole
32830    # argument.
32831    path="$complete"
32832    arguments="EOL"
32833    new_path="$path"
32834
32835  windows_path="$new_path"
32836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32837    unix_path=`$CYGPATH -u "$windows_path"`
32838    new_path="$unix_path"
32839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32841    new_path="$unix_path"
32842  fi
32843
32844
32845    new_path=`$WHICH "$new_path" 2> /dev/null`
32846    # bat and cmd files are not always considered executable in MSYS causing which
32847    # to not find them
32848    if test "x$new_path" = x \
32849        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32850        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32851      new_path="$path"
32852
32853  windows_path="$new_path"
32854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855    unix_path=`$CYGPATH -u "$windows_path"`
32856    new_path="$unix_path"
32857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859    new_path="$unix_path"
32860  fi
32861
32862    fi
32863
32864    if test "x$new_path" = x; then
32865      # It's still not found. Now this is an unrecoverable error.
32866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32867$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32868      has_space=`$ECHO "$complete" | $GREP " "`
32869      if test "x$has_space" != x; then
32870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32872      fi
32873      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32874    fi
32875  fi
32876
32877  # Now new_path has a complete unix path to the binary
32878  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32879    # Keep paths in /bin as-is, but remove trailing .exe if any
32880    new_path="${new_path/%.exe/}"
32881    # Do not save /bin paths to all_fixpath_prefixes!
32882  else
32883    # Not in mixed or Windows style, start by that.
32884    new_path=`cmd //c echo $new_path`
32885
32886  input_path="$new_path"
32887  # Check if we need to convert this using DOS-style short mode. If the path
32888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32889  # take no chances and rewrite it.
32890  # Note: m4 eats our [], so we need to use [ and ] instead.
32891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32892  if test "x$has_forbidden_chars" != x; then
32893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32895  fi
32896
32897    # Output is in $new_path
32898
32899  windows_path="$new_path"
32900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32901    unix_path=`$CYGPATH -u "$windows_path"`
32902    new_path="$unix_path"
32903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32905    new_path="$unix_path"
32906  fi
32907
32908    # remove trailing .exe if any
32909    new_path="${new_path/%.exe/}"
32910
32911    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32912    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32913  fi
32914
32915    else
32916      # We're on a unix platform. Hooray! :)
32917      # First separate the path from the arguments. This will split at the first
32918      # space.
32919      complete="$AS"
32920      path="${complete%% *}"
32921      tmp="$complete EOL"
32922      arguments="${tmp#* }"
32923
32924      # Cannot rely on the command "which" here since it doesn't always work.
32925      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32926      if test -z "$is_absolute_path"; then
32927        # Path to executable is not absolute. Find it.
32928        IFS_save="$IFS"
32929        IFS=:
32930        for p in $PATH; do
32931          if test -f "$p/$path" && test -x "$p/$path"; then
32932            new_path="$p/$path"
32933            break
32934          fi
32935        done
32936        IFS="$IFS_save"
32937      else
32938        # This is an absolute path, we can use it without further modifications.
32939        new_path="$path"
32940      fi
32941
32942      if test "x$new_path" = x; then
32943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32944$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32945        has_space=`$ECHO "$complete" | $GREP " "`
32946        if test "x$has_space" != x; then
32947          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32948$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32949        fi
32950        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32951      fi
32952    fi
32953
32954    # Now join together the path and the arguments once again
32955    if test "x$arguments" != xEOL; then
32956      new_complete="$new_path ${arguments% *}"
32957    else
32958      new_complete="$new_path"
32959    fi
32960
32961    if test "x$complete" != "x$new_complete"; then
32962      AS="$new_complete"
32963      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32964$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32965    fi
32966  fi
32967
32968  else
32969    # FIXME: is this correct for microsoft?
32970    AS="$CC -c"
32971  fi
32972
32973
32974  #
32975  # Setup the archiver (AR)
32976  #
32977  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32978    # The corresponding ar tool is lib.exe (used to create static libraries)
32979    # Extract the first word of "lib", so it can be a program name with args.
32980set dummy lib; ac_word=$2
32981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32982$as_echo_n "checking for $ac_word... " >&6; }
32983if ${ac_cv_prog_AR+:} false; then :
32984  $as_echo_n "(cached) " >&6
32985else
32986  if test -n "$AR"; then
32987  ac_cv_prog_AR="$AR" # Let the user override the test.
32988else
32989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32990for as_dir in $PATH
32991do
32992  IFS=$as_save_IFS
32993  test -z "$as_dir" && as_dir=.
32994    for ac_exec_ext in '' $ac_executable_extensions; do
32995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32996    ac_cv_prog_AR="lib"
32997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32998    break 2
32999  fi
33000done
33001  done
33002IFS=$as_save_IFS
33003
33004fi
33005fi
33006AR=$ac_cv_prog_AR
33007if test -n "$AR"; then
33008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33009$as_echo "$AR" >&6; }
33010else
33011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33012$as_echo "no" >&6; }
33013fi
33014
33015
33016  else
33017
33018
33019  # Publish this variable in the help.
33020
33021
33022  if test "x$AR" = x; then
33023    # The variable is not set by user, try to locate tool using the code snippet
33024    if test -n "$ac_tool_prefix"; then
33025  for ac_prog in ar
33026  do
33027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33030$as_echo_n "checking for $ac_word... " >&6; }
33031if ${ac_cv_prog_AR+:} false; then :
33032  $as_echo_n "(cached) " >&6
33033else
33034  if test -n "$AR"; then
33035  ac_cv_prog_AR="$AR" # Let the user override the test.
33036else
33037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33038for as_dir in $PATH
33039do
33040  IFS=$as_save_IFS
33041  test -z "$as_dir" && as_dir=.
33042    for ac_exec_ext in '' $ac_executable_extensions; do
33043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33044    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33046    break 2
33047  fi
33048done
33049  done
33050IFS=$as_save_IFS
33051
33052fi
33053fi
33054AR=$ac_cv_prog_AR
33055if test -n "$AR"; then
33056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33057$as_echo "$AR" >&6; }
33058else
33059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33060$as_echo "no" >&6; }
33061fi
33062
33063
33064    test -n "$AR" && break
33065  done
33066fi
33067if test -z "$AR"; then
33068  ac_ct_AR=$AR
33069  for ac_prog in ar
33070do
33071  # Extract the first word of "$ac_prog", so it can be a program name with args.
33072set dummy $ac_prog; ac_word=$2
33073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33074$as_echo_n "checking for $ac_word... " >&6; }
33075if ${ac_cv_prog_ac_ct_AR+:} false; then :
33076  $as_echo_n "(cached) " >&6
33077else
33078  if test -n "$ac_ct_AR"; then
33079  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33080else
33081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33082for as_dir in $PATH
33083do
33084  IFS=$as_save_IFS
33085  test -z "$as_dir" && as_dir=.
33086    for ac_exec_ext in '' $ac_executable_extensions; do
33087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33088    ac_cv_prog_ac_ct_AR="$ac_prog"
33089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33090    break 2
33091  fi
33092done
33093  done
33094IFS=$as_save_IFS
33095
33096fi
33097fi
33098ac_ct_AR=$ac_cv_prog_ac_ct_AR
33099if test -n "$ac_ct_AR"; then
33100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33101$as_echo "$ac_ct_AR" >&6; }
33102else
33103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33104$as_echo "no" >&6; }
33105fi
33106
33107
33108  test -n "$ac_ct_AR" && break
33109done
33110
33111  if test "x$ac_ct_AR" = x; then
33112    AR=""
33113  else
33114    case $cross_compiling:$ac_tool_warned in
33115yes:)
33116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33118ac_tool_warned=yes ;;
33119esac
33120    AR=$ac_ct_AR
33121  fi
33122fi
33123
33124  else
33125    # The variable is set, but is it from the command line or the environment?
33126
33127    # Try to remove the string !AR! from our list.
33128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33130      # If it failed, the variable was not from the command line. Ignore it,
33131      # but warn the user (except for BASH, which is always set by the calling BASH).
33132      if test "xAR" != xBASH; then
33133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33134$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33135      fi
33136      # Try to locate tool using the code snippet
33137      if test -n "$ac_tool_prefix"; then
33138  for ac_prog in ar
33139  do
33140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33143$as_echo_n "checking for $ac_word... " >&6; }
33144if ${ac_cv_prog_AR+:} false; then :
33145  $as_echo_n "(cached) " >&6
33146else
33147  if test -n "$AR"; then
33148  ac_cv_prog_AR="$AR" # Let the user override the test.
33149else
33150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33151for as_dir in $PATH
33152do
33153  IFS=$as_save_IFS
33154  test -z "$as_dir" && as_dir=.
33155    for ac_exec_ext in '' $ac_executable_extensions; do
33156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33157    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33159    break 2
33160  fi
33161done
33162  done
33163IFS=$as_save_IFS
33164
33165fi
33166fi
33167AR=$ac_cv_prog_AR
33168if test -n "$AR"; then
33169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33170$as_echo "$AR" >&6; }
33171else
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33173$as_echo "no" >&6; }
33174fi
33175
33176
33177    test -n "$AR" && break
33178  done
33179fi
33180if test -z "$AR"; then
33181  ac_ct_AR=$AR
33182  for ac_prog in ar
33183do
33184  # Extract the first word of "$ac_prog", so it can be a program name with args.
33185set dummy $ac_prog; ac_word=$2
33186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33187$as_echo_n "checking for $ac_word... " >&6; }
33188if ${ac_cv_prog_ac_ct_AR+:} false; then :
33189  $as_echo_n "(cached) " >&6
33190else
33191  if test -n "$ac_ct_AR"; then
33192  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33193else
33194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33195for as_dir in $PATH
33196do
33197  IFS=$as_save_IFS
33198  test -z "$as_dir" && as_dir=.
33199    for ac_exec_ext in '' $ac_executable_extensions; do
33200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33201    ac_cv_prog_ac_ct_AR="$ac_prog"
33202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33203    break 2
33204  fi
33205done
33206  done
33207IFS=$as_save_IFS
33208
33209fi
33210fi
33211ac_ct_AR=$ac_cv_prog_ac_ct_AR
33212if test -n "$ac_ct_AR"; then
33213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33214$as_echo "$ac_ct_AR" >&6; }
33215else
33216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33217$as_echo "no" >&6; }
33218fi
33219
33220
33221  test -n "$ac_ct_AR" && break
33222done
33223
33224  if test "x$ac_ct_AR" = x; then
33225    AR=""
33226  else
33227    case $cross_compiling:$ac_tool_warned in
33228yes:)
33229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33231ac_tool_warned=yes ;;
33232esac
33233    AR=$ac_ct_AR
33234  fi
33235fi
33236
33237    else
33238      # If it succeeded, then it was overridden by the user. We will use it
33239      # for the tool.
33240
33241      # First remove it from the list of overridden variables, so we can test
33242      # for unknown variables in the end.
33243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33244
33245      # Check if the provided tool contains a complete path.
33246      tool_specified="$AR"
33247      tool_basename="${tool_specified##*/}"
33248      if test "x$tool_basename" = "x$tool_specified"; then
33249        # A command without a complete path is provided, search $PATH.
33250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33251$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33252        # Extract the first word of "$tool_basename", so it can be a program name with args.
33253set dummy $tool_basename; ac_word=$2
33254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33255$as_echo_n "checking for $ac_word... " >&6; }
33256if ${ac_cv_path_AR+:} false; then :
33257  $as_echo_n "(cached) " >&6
33258else
33259  case $AR in
33260  [\\/]* | ?:[\\/]*)
33261  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33262  ;;
33263  *)
33264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33265for as_dir in $PATH
33266do
33267  IFS=$as_save_IFS
33268  test -z "$as_dir" && as_dir=.
33269    for ac_exec_ext in '' $ac_executable_extensions; do
33270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33271    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33273    break 2
33274  fi
33275done
33276  done
33277IFS=$as_save_IFS
33278
33279  ;;
33280esac
33281fi
33282AR=$ac_cv_path_AR
33283if test -n "$AR"; then
33284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33285$as_echo "$AR" >&6; }
33286else
33287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33288$as_echo "no" >&6; }
33289fi
33290
33291
33292        if test "x$AR" = x; then
33293          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33294        fi
33295      else
33296        # Otherwise we believe it is a complete path. Use it as it is.
33297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33298$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33300$as_echo_n "checking for AR... " >&6; }
33301        if test ! -x "$tool_specified"; then
33302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33303$as_echo "not found" >&6; }
33304          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33305        fi
33306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33307$as_echo "$tool_specified" >&6; }
33308      fi
33309    fi
33310  fi
33311
33312
33313  fi
33314
33315  # Only process if variable expands to non-empty
33316
33317  if test "x$AR" != x; then
33318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33319
33320  # First separate the path from the arguments. This will split at the first
33321  # space.
33322  complete="$AR"
33323  path="${complete%% *}"
33324  tmp="$complete EOL"
33325  arguments="${tmp#* }"
33326
33327  # Input might be given as Windows format, start by converting to
33328  # unix format.
33329  new_path=`$CYGPATH -u "$path"`
33330
33331  # Now try to locate executable using which
33332  new_path=`$WHICH "$new_path" 2> /dev/null`
33333  # bat and cmd files are not always considered executable in cygwin causing which
33334  # to not find them
33335  if test "x$new_path" = x \
33336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33338    new_path=`$CYGPATH -u "$path"`
33339  fi
33340  if test "x$new_path" = x; then
33341    # Oops. Which didn't find the executable.
33342    # The splitting of arguments from the executable at a space might have been incorrect,
33343    # since paths with space are more likely in Windows. Give it another try with the whole
33344    # argument.
33345    path="$complete"
33346    arguments="EOL"
33347    new_path=`$CYGPATH -u "$path"`
33348    new_path=`$WHICH "$new_path" 2> /dev/null`
33349    # bat and cmd files are not always considered executable in cygwin causing which
33350    # to not find them
33351    if test "x$new_path" = x \
33352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33354      new_path=`$CYGPATH -u "$path"`
33355    fi
33356    if test "x$new_path" = x; then
33357      # It's still not found. Now this is an unrecoverable error.
33358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33359$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33360      has_space=`$ECHO "$complete" | $GREP " "`
33361      if test "x$has_space" != x; then
33362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33364      fi
33365      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33366    fi
33367  fi
33368
33369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33372  # "foo.exe" is OK but "foo" is an error.
33373  #
33374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33375  # It is also a way to make sure we got the proper file name for the real test later on.
33376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33377  if test "x$test_shortpath" = x; then
33378    # Short path failed, file does not exist as specified.
33379    # Try adding .exe or .cmd
33380    if test -f "${new_path}.exe"; then
33381      input_to_shortpath="${new_path}.exe"
33382    elif test -f "${new_path}.cmd"; then
33383      input_to_shortpath="${new_path}.cmd"
33384    else
33385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33386$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33389      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33390    fi
33391  else
33392    input_to_shortpath="$new_path"
33393  fi
33394
33395  # Call helper function which possibly converts this using DOS-style short mode.
33396  # If so, the updated path is stored in $new_path.
33397  new_path="$input_to_shortpath"
33398
33399  input_path="$input_to_shortpath"
33400  # Check if we need to convert this using DOS-style short mode. If the path
33401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33402  # take no chances and rewrite it.
33403  # Note: m4 eats our [], so we need to use [ and ] instead.
33404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33405  if test "x$has_forbidden_chars" != x; then
33406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33410      # Going to short mode and back again did indeed matter. Since short mode is
33411      # case insensitive, let's make it lowercase to improve readability.
33412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33413      # Now convert it back to Unix-style (cygpath)
33414      input_path=`$CYGPATH -u "$shortmode_path"`
33415      new_path="$input_path"
33416    fi
33417  fi
33418
33419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33420  if test "x$test_cygdrive_prefix" = x; then
33421    # As a simple fix, exclude /usr/bin since it's not a real path.
33422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33424      # a path prefixed by /cygdrive for fixpath to work.
33425      new_path="$CYGWIN_ROOT_PATH$input_path"
33426    fi
33427  fi
33428
33429  # remove trailing .exe if any
33430  new_path="${new_path/%.exe/}"
33431
33432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33433
33434  # First separate the path from the arguments. This will split at the first
33435  # space.
33436  complete="$AR"
33437  path="${complete%% *}"
33438  tmp="$complete EOL"
33439  arguments="${tmp#* }"
33440
33441  # Input might be given as Windows format, start by converting to
33442  # unix format.
33443  new_path="$path"
33444
33445  windows_path="$new_path"
33446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447    unix_path=`$CYGPATH -u "$windows_path"`
33448    new_path="$unix_path"
33449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33451    new_path="$unix_path"
33452  fi
33453
33454
33455  # Now try to locate executable using which
33456  new_path=`$WHICH "$new_path" 2> /dev/null`
33457
33458  if test "x$new_path" = x; then
33459    # Oops. Which didn't find the executable.
33460    # The splitting of arguments from the executable at a space might have been incorrect,
33461    # since paths with space are more likely in Windows. Give it another try with the whole
33462    # argument.
33463    path="$complete"
33464    arguments="EOL"
33465    new_path="$path"
33466
33467  windows_path="$new_path"
33468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33469    unix_path=`$CYGPATH -u "$windows_path"`
33470    new_path="$unix_path"
33471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33473    new_path="$unix_path"
33474  fi
33475
33476
33477    new_path=`$WHICH "$new_path" 2> /dev/null`
33478    # bat and cmd files are not always considered executable in MSYS causing which
33479    # to not find them
33480    if test "x$new_path" = x \
33481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33483      new_path="$path"
33484
33485  windows_path="$new_path"
33486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33487    unix_path=`$CYGPATH -u "$windows_path"`
33488    new_path="$unix_path"
33489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33491    new_path="$unix_path"
33492  fi
33493
33494    fi
33495
33496    if test "x$new_path" = x; then
33497      # It's still not found. Now this is an unrecoverable error.
33498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33499$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33500      has_space=`$ECHO "$complete" | $GREP " "`
33501      if test "x$has_space" != x; then
33502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33504      fi
33505      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33506    fi
33507  fi
33508
33509  # Now new_path has a complete unix path to the binary
33510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33511    # Keep paths in /bin as-is, but remove trailing .exe if any
33512    new_path="${new_path/%.exe/}"
33513    # Do not save /bin paths to all_fixpath_prefixes!
33514  else
33515    # Not in mixed or Windows style, start by that.
33516    new_path=`cmd //c echo $new_path`
33517
33518  input_path="$new_path"
33519  # Check if we need to convert this using DOS-style short mode. If the path
33520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33521  # take no chances and rewrite it.
33522  # Note: m4 eats our [], so we need to use [ and ] instead.
33523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33524  if test "x$has_forbidden_chars" != x; then
33525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33527  fi
33528
33529    # Output is in $new_path
33530
33531  windows_path="$new_path"
33532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33533    unix_path=`$CYGPATH -u "$windows_path"`
33534    new_path="$unix_path"
33535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33537    new_path="$unix_path"
33538  fi
33539
33540    # remove trailing .exe if any
33541    new_path="${new_path/%.exe/}"
33542
33543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33545  fi
33546
33547    else
33548      # We're on a unix platform. Hooray! :)
33549      # First separate the path from the arguments. This will split at the first
33550      # space.
33551      complete="$AR"
33552      path="${complete%% *}"
33553      tmp="$complete EOL"
33554      arguments="${tmp#* }"
33555
33556      # Cannot rely on the command "which" here since it doesn't always work.
33557      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33558      if test -z "$is_absolute_path"; then
33559        # Path to executable is not absolute. Find it.
33560        IFS_save="$IFS"
33561        IFS=:
33562        for p in $PATH; do
33563          if test -f "$p/$path" && test -x "$p/$path"; then
33564            new_path="$p/$path"
33565            break
33566          fi
33567        done
33568        IFS="$IFS_save"
33569      else
33570        # This is an absolute path, we can use it without further modifications.
33571        new_path="$path"
33572      fi
33573
33574      if test "x$new_path" = x; then
33575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33576$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33577        has_space=`$ECHO "$complete" | $GREP " "`
33578        if test "x$has_space" != x; then
33579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33581        fi
33582        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33583      fi
33584    fi
33585
33586    # Now join together the path and the arguments once again
33587    if test "x$arguments" != xEOL; then
33588      new_complete="$new_path ${arguments% *}"
33589    else
33590      new_complete="$new_path"
33591    fi
33592
33593    if test "x$complete" != "x$new_complete"; then
33594      AR="$new_complete"
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33596$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33597    fi
33598  fi
33599
33600
33601
33602  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33603
33604
33605  # Publish this variable in the help.
33606
33607
33608  if test "x$LIPO" = x; then
33609    # The variable is not set by user, try to locate tool using the code snippet
33610    for ac_prog in lipo
33611do
33612  # Extract the first word of "$ac_prog", so it can be a program name with args.
33613set dummy $ac_prog; ac_word=$2
33614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33615$as_echo_n "checking for $ac_word... " >&6; }
33616if ${ac_cv_path_LIPO+:} false; then :
33617  $as_echo_n "(cached) " >&6
33618else
33619  case $LIPO in
33620  [\\/]* | ?:[\\/]*)
33621  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33622  ;;
33623  *)
33624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33625for as_dir in $PATH
33626do
33627  IFS=$as_save_IFS
33628  test -z "$as_dir" && as_dir=.
33629    for ac_exec_ext in '' $ac_executable_extensions; do
33630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33631    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33633    break 2
33634  fi
33635done
33636  done
33637IFS=$as_save_IFS
33638
33639  ;;
33640esac
33641fi
33642LIPO=$ac_cv_path_LIPO
33643if test -n "$LIPO"; then
33644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33645$as_echo "$LIPO" >&6; }
33646else
33647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33648$as_echo "no" >&6; }
33649fi
33650
33651
33652  test -n "$LIPO" && break
33653done
33654
33655  else
33656    # The variable is set, but is it from the command line or the environment?
33657
33658    # Try to remove the string !LIPO! from our list.
33659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33661      # If it failed, the variable was not from the command line. Ignore it,
33662      # but warn the user (except for BASH, which is always set by the calling BASH).
33663      if test "xLIPO" != xBASH; then
33664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33665$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33666      fi
33667      # Try to locate tool using the code snippet
33668      for ac_prog in lipo
33669do
33670  # Extract the first word of "$ac_prog", so it can be a program name with args.
33671set dummy $ac_prog; ac_word=$2
33672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33673$as_echo_n "checking for $ac_word... " >&6; }
33674if ${ac_cv_path_LIPO+:} false; then :
33675  $as_echo_n "(cached) " >&6
33676else
33677  case $LIPO in
33678  [\\/]* | ?:[\\/]*)
33679  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33680  ;;
33681  *)
33682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33683for as_dir in $PATH
33684do
33685  IFS=$as_save_IFS
33686  test -z "$as_dir" && as_dir=.
33687    for ac_exec_ext in '' $ac_executable_extensions; do
33688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33689    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33691    break 2
33692  fi
33693done
33694  done
33695IFS=$as_save_IFS
33696
33697  ;;
33698esac
33699fi
33700LIPO=$ac_cv_path_LIPO
33701if test -n "$LIPO"; then
33702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33703$as_echo "$LIPO" >&6; }
33704else
33705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33706$as_echo "no" >&6; }
33707fi
33708
33709
33710  test -n "$LIPO" && break
33711done
33712
33713    else
33714      # If it succeeded, then it was overridden by the user. We will use it
33715      # for the tool.
33716
33717      # First remove it from the list of overridden variables, so we can test
33718      # for unknown variables in the end.
33719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33720
33721      # Check if the provided tool contains a complete path.
33722      tool_specified="$LIPO"
33723      tool_basename="${tool_specified##*/}"
33724      if test "x$tool_basename" = "x$tool_specified"; then
33725        # A command without a complete path is provided, search $PATH.
33726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33727$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33728        # Extract the first word of "$tool_basename", so it can be a program name with args.
33729set dummy $tool_basename; ac_word=$2
33730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33731$as_echo_n "checking for $ac_word... " >&6; }
33732if ${ac_cv_path_LIPO+:} false; then :
33733  $as_echo_n "(cached) " >&6
33734else
33735  case $LIPO in
33736  [\\/]* | ?:[\\/]*)
33737  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33738  ;;
33739  *)
33740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33741for as_dir in $PATH
33742do
33743  IFS=$as_save_IFS
33744  test -z "$as_dir" && as_dir=.
33745    for ac_exec_ext in '' $ac_executable_extensions; do
33746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33747    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33749    break 2
33750  fi
33751done
33752  done
33753IFS=$as_save_IFS
33754
33755  ;;
33756esac
33757fi
33758LIPO=$ac_cv_path_LIPO
33759if test -n "$LIPO"; then
33760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33761$as_echo "$LIPO" >&6; }
33762else
33763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33764$as_echo "no" >&6; }
33765fi
33766
33767
33768        if test "x$LIPO" = x; then
33769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33770        fi
33771      else
33772        # Otherwise we believe it is a complete path. Use it as it is.
33773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33774$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33776$as_echo_n "checking for LIPO... " >&6; }
33777        if test ! -x "$tool_specified"; then
33778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33779$as_echo "not found" >&6; }
33780          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33781        fi
33782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33783$as_echo "$tool_specified" >&6; }
33784      fi
33785    fi
33786  fi
33787
33788
33789
33790  # Only process if variable expands to non-empty
33791
33792  if test "x$LIPO" != x; then
33793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33794
33795  # First separate the path from the arguments. This will split at the first
33796  # space.
33797  complete="$LIPO"
33798  path="${complete%% *}"
33799  tmp="$complete EOL"
33800  arguments="${tmp#* }"
33801
33802  # Input might be given as Windows format, start by converting to
33803  # unix format.
33804  new_path=`$CYGPATH -u "$path"`
33805
33806  # Now try to locate executable using which
33807  new_path=`$WHICH "$new_path" 2> /dev/null`
33808  # bat and cmd files are not always considered executable in cygwin causing which
33809  # to not find them
33810  if test "x$new_path" = x \
33811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33813    new_path=`$CYGPATH -u "$path"`
33814  fi
33815  if test "x$new_path" = x; then
33816    # Oops. Which didn't find the executable.
33817    # The splitting of arguments from the executable at a space might have been incorrect,
33818    # since paths with space are more likely in Windows. Give it another try with the whole
33819    # argument.
33820    path="$complete"
33821    arguments="EOL"
33822    new_path=`$CYGPATH -u "$path"`
33823    new_path=`$WHICH "$new_path" 2> /dev/null`
33824    # bat and cmd files are not always considered executable in cygwin causing which
33825    # to not find them
33826    if test "x$new_path" = x \
33827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33829      new_path=`$CYGPATH -u "$path"`
33830    fi
33831    if test "x$new_path" = x; then
33832      # It's still not found. Now this is an unrecoverable error.
33833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33834$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33835      has_space=`$ECHO "$complete" | $GREP " "`
33836      if test "x$has_space" != x; then
33837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33839      fi
33840      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33841    fi
33842  fi
33843
33844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33847  # "foo.exe" is OK but "foo" is an error.
33848  #
33849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33850  # It is also a way to make sure we got the proper file name for the real test later on.
33851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33852  if test "x$test_shortpath" = x; then
33853    # Short path failed, file does not exist as specified.
33854    # Try adding .exe or .cmd
33855    if test -f "${new_path}.exe"; then
33856      input_to_shortpath="${new_path}.exe"
33857    elif test -f "${new_path}.cmd"; then
33858      input_to_shortpath="${new_path}.cmd"
33859    else
33860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33861$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33864      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33865    fi
33866  else
33867    input_to_shortpath="$new_path"
33868  fi
33869
33870  # Call helper function which possibly converts this using DOS-style short mode.
33871  # If so, the updated path is stored in $new_path.
33872  new_path="$input_to_shortpath"
33873
33874  input_path="$input_to_shortpath"
33875  # Check if we need to convert this using DOS-style short mode. If the path
33876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33877  # take no chances and rewrite it.
33878  # Note: m4 eats our [], so we need to use [ and ] instead.
33879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33880  if test "x$has_forbidden_chars" != x; then
33881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33885      # Going to short mode and back again did indeed matter. Since short mode is
33886      # case insensitive, let's make it lowercase to improve readability.
33887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33888      # Now convert it back to Unix-style (cygpath)
33889      input_path=`$CYGPATH -u "$shortmode_path"`
33890      new_path="$input_path"
33891    fi
33892  fi
33893
33894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33895  if test "x$test_cygdrive_prefix" = x; then
33896    # As a simple fix, exclude /usr/bin since it's not a real path.
33897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33899      # a path prefixed by /cygdrive for fixpath to work.
33900      new_path="$CYGWIN_ROOT_PATH$input_path"
33901    fi
33902  fi
33903
33904  # remove trailing .exe if any
33905  new_path="${new_path/%.exe/}"
33906
33907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33908
33909  # First separate the path from the arguments. This will split at the first
33910  # space.
33911  complete="$LIPO"
33912  path="${complete%% *}"
33913  tmp="$complete EOL"
33914  arguments="${tmp#* }"
33915
33916  # Input might be given as Windows format, start by converting to
33917  # unix format.
33918  new_path="$path"
33919
33920  windows_path="$new_path"
33921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33922    unix_path=`$CYGPATH -u "$windows_path"`
33923    new_path="$unix_path"
33924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33926    new_path="$unix_path"
33927  fi
33928
33929
33930  # Now try to locate executable using which
33931  new_path=`$WHICH "$new_path" 2> /dev/null`
33932
33933  if test "x$new_path" = x; then
33934    # Oops. Which didn't find the executable.
33935    # The splitting of arguments from the executable at a space might have been incorrect,
33936    # since paths with space are more likely in Windows. Give it another try with the whole
33937    # argument.
33938    path="$complete"
33939    arguments="EOL"
33940    new_path="$path"
33941
33942  windows_path="$new_path"
33943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33944    unix_path=`$CYGPATH -u "$windows_path"`
33945    new_path="$unix_path"
33946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33948    new_path="$unix_path"
33949  fi
33950
33951
33952    new_path=`$WHICH "$new_path" 2> /dev/null`
33953    # bat and cmd files are not always considered executable in MSYS causing which
33954    # to not find them
33955    if test "x$new_path" = x \
33956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33958      new_path="$path"
33959
33960  windows_path="$new_path"
33961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33962    unix_path=`$CYGPATH -u "$windows_path"`
33963    new_path="$unix_path"
33964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33966    new_path="$unix_path"
33967  fi
33968
33969    fi
33970
33971    if test "x$new_path" = x; then
33972      # It's still not found. Now this is an unrecoverable error.
33973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33974$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33975      has_space=`$ECHO "$complete" | $GREP " "`
33976      if test "x$has_space" != x; then
33977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33979      fi
33980      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33981    fi
33982  fi
33983
33984  # Now new_path has a complete unix path to the binary
33985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33986    # Keep paths in /bin as-is, but remove trailing .exe if any
33987    new_path="${new_path/%.exe/}"
33988    # Do not save /bin paths to all_fixpath_prefixes!
33989  else
33990    # Not in mixed or Windows style, start by that.
33991    new_path=`cmd //c echo $new_path`
33992
33993  input_path="$new_path"
33994  # Check if we need to convert this using DOS-style short mode. If the path
33995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33996  # take no chances and rewrite it.
33997  # Note: m4 eats our [], so we need to use [ and ] instead.
33998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33999  if test "x$has_forbidden_chars" != x; then
34000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34002  fi
34003
34004    # Output is in $new_path
34005
34006  windows_path="$new_path"
34007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34008    unix_path=`$CYGPATH -u "$windows_path"`
34009    new_path="$unix_path"
34010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34012    new_path="$unix_path"
34013  fi
34014
34015    # remove trailing .exe if any
34016    new_path="${new_path/%.exe/}"
34017
34018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34020  fi
34021
34022    else
34023      # We're on a unix platform. Hooray! :)
34024      # First separate the path from the arguments. This will split at the first
34025      # space.
34026      complete="$LIPO"
34027      path="${complete%% *}"
34028      tmp="$complete EOL"
34029      arguments="${tmp#* }"
34030
34031      # Cannot rely on the command "which" here since it doesn't always work.
34032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34033      if test -z "$is_absolute_path"; then
34034        # Path to executable is not absolute. Find it.
34035        IFS_save="$IFS"
34036        IFS=:
34037        for p in $PATH; do
34038          if test -f "$p/$path" && test -x "$p/$path"; then
34039            new_path="$p/$path"
34040            break
34041          fi
34042        done
34043        IFS="$IFS_save"
34044      else
34045        # This is an absolute path, we can use it without further modifications.
34046        new_path="$path"
34047      fi
34048
34049      if test "x$new_path" = x; then
34050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34051$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34052        has_space=`$ECHO "$complete" | $GREP " "`
34053        if test "x$has_space" != x; then
34054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34056        fi
34057        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34058      fi
34059    fi
34060
34061    # Now join together the path and the arguments once again
34062    if test "x$arguments" != xEOL; then
34063      new_complete="$new_path ${arguments% *}"
34064    else
34065      new_complete="$new_path"
34066    fi
34067
34068    if test "x$complete" != "x$new_complete"; then
34069      LIPO="$new_complete"
34070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34071$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34072    fi
34073  fi
34074
34075  fi
34076
34077  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34078    # Extract the first word of "mt", so it can be a program name with args.
34079set dummy mt; ac_word=$2
34080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34081$as_echo_n "checking for $ac_word... " >&6; }
34082if ${ac_cv_prog_MT+:} false; then :
34083  $as_echo_n "(cached) " >&6
34084else
34085  if test -n "$MT"; then
34086  ac_cv_prog_MT="$MT" # Let the user override the test.
34087else
34088  ac_prog_rejected=no
34089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34090for as_dir in $PATH
34091do
34092  IFS=$as_save_IFS
34093  test -z "$as_dir" && as_dir=.
34094    for ac_exec_ext in '' $ac_executable_extensions; do
34095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34096    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34097       ac_prog_rejected=yes
34098       continue
34099     fi
34100    ac_cv_prog_MT="mt"
34101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34102    break 2
34103  fi
34104done
34105  done
34106IFS=$as_save_IFS
34107
34108if test $ac_prog_rejected = yes; then
34109  # We found a bogon in the path, so make sure we never use it.
34110  set dummy $ac_cv_prog_MT
34111  shift
34112  if test $# != 0; then
34113    # We chose a different compiler from the bogus one.
34114    # However, it has the same basename, so the bogon will be chosen
34115    # first if we set MT to just the basename; use the full file name.
34116    shift
34117    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34118  fi
34119fi
34120fi
34121fi
34122MT=$ac_cv_prog_MT
34123if test -n "$MT"; then
34124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34125$as_echo "$MT" >&6; }
34126else
34127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34128$as_echo "no" >&6; }
34129fi
34130
34131
34132
34133  # Only process if variable expands to non-empty
34134
34135  if test "x$MT" != x; then
34136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34137
34138  # First separate the path from the arguments. This will split at the first
34139  # space.
34140  complete="$MT"
34141  path="${complete%% *}"
34142  tmp="$complete EOL"
34143  arguments="${tmp#* }"
34144
34145  # Input might be given as Windows format, start by converting to
34146  # unix format.
34147  new_path=`$CYGPATH -u "$path"`
34148
34149  # Now try to locate executable using which
34150  new_path=`$WHICH "$new_path" 2> /dev/null`
34151  # bat and cmd files are not always considered executable in cygwin causing which
34152  # to not find them
34153  if test "x$new_path" = x \
34154      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34155      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34156    new_path=`$CYGPATH -u "$path"`
34157  fi
34158  if test "x$new_path" = x; then
34159    # Oops. Which didn't find the executable.
34160    # The splitting of arguments from the executable at a space might have been incorrect,
34161    # since paths with space are more likely in Windows. Give it another try with the whole
34162    # argument.
34163    path="$complete"
34164    arguments="EOL"
34165    new_path=`$CYGPATH -u "$path"`
34166    new_path=`$WHICH "$new_path" 2> /dev/null`
34167    # bat and cmd files are not always considered executable in cygwin causing which
34168    # to not find them
34169    if test "x$new_path" = x \
34170        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34171        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34172      new_path=`$CYGPATH -u "$path"`
34173    fi
34174    if test "x$new_path" = x; then
34175      # It's still not found. Now this is an unrecoverable error.
34176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34177$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34178      has_space=`$ECHO "$complete" | $GREP " "`
34179      if test "x$has_space" != x; then
34180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34182      fi
34183      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34184    fi
34185  fi
34186
34187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34190  # "foo.exe" is OK but "foo" is an error.
34191  #
34192  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34193  # It is also a way to make sure we got the proper file name for the real test later on.
34194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34195  if test "x$test_shortpath" = x; then
34196    # Short path failed, file does not exist as specified.
34197    # Try adding .exe or .cmd
34198    if test -f "${new_path}.exe"; then
34199      input_to_shortpath="${new_path}.exe"
34200    elif test -f "${new_path}.cmd"; then
34201      input_to_shortpath="${new_path}.cmd"
34202    else
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34204$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34205      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34206$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34207      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34208    fi
34209  else
34210    input_to_shortpath="$new_path"
34211  fi
34212
34213  # Call helper function which possibly converts this using DOS-style short mode.
34214  # If so, the updated path is stored in $new_path.
34215  new_path="$input_to_shortpath"
34216
34217  input_path="$input_to_shortpath"
34218  # Check if we need to convert this using DOS-style short mode. If the path
34219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34220  # take no chances and rewrite it.
34221  # Note: m4 eats our [], so we need to use [ and ] instead.
34222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34223  if test "x$has_forbidden_chars" != x; then
34224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34228      # Going to short mode and back again did indeed matter. Since short mode is
34229      # case insensitive, let's make it lowercase to improve readability.
34230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34231      # Now convert it back to Unix-style (cygpath)
34232      input_path=`$CYGPATH -u "$shortmode_path"`
34233      new_path="$input_path"
34234    fi
34235  fi
34236
34237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34238  if test "x$test_cygdrive_prefix" = x; then
34239    # As a simple fix, exclude /usr/bin since it's not a real path.
34240    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34242      # a path prefixed by /cygdrive for fixpath to work.
34243      new_path="$CYGWIN_ROOT_PATH$input_path"
34244    fi
34245  fi
34246
34247  # remove trailing .exe if any
34248  new_path="${new_path/%.exe/}"
34249
34250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34251
34252  # First separate the path from the arguments. This will split at the first
34253  # space.
34254  complete="$MT"
34255  path="${complete%% *}"
34256  tmp="$complete EOL"
34257  arguments="${tmp#* }"
34258
34259  # Input might be given as Windows format, start by converting to
34260  # unix format.
34261  new_path="$path"
34262
34263  windows_path="$new_path"
34264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34265    unix_path=`$CYGPATH -u "$windows_path"`
34266    new_path="$unix_path"
34267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34269    new_path="$unix_path"
34270  fi
34271
34272
34273  # Now try to locate executable using which
34274  new_path=`$WHICH "$new_path" 2> /dev/null`
34275
34276  if test "x$new_path" = x; then
34277    # Oops. Which didn't find the executable.
34278    # The splitting of arguments from the executable at a space might have been incorrect,
34279    # since paths with space are more likely in Windows. Give it another try with the whole
34280    # argument.
34281    path="$complete"
34282    arguments="EOL"
34283    new_path="$path"
34284
34285  windows_path="$new_path"
34286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34287    unix_path=`$CYGPATH -u "$windows_path"`
34288    new_path="$unix_path"
34289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34291    new_path="$unix_path"
34292  fi
34293
34294
34295    new_path=`$WHICH "$new_path" 2> /dev/null`
34296    # bat and cmd files are not always considered executable in MSYS causing which
34297    # to not find them
34298    if test "x$new_path" = x \
34299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34301      new_path="$path"
34302
34303  windows_path="$new_path"
34304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34305    unix_path=`$CYGPATH -u "$windows_path"`
34306    new_path="$unix_path"
34307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34309    new_path="$unix_path"
34310  fi
34311
34312    fi
34313
34314    if test "x$new_path" = x; then
34315      # It's still not found. Now this is an unrecoverable error.
34316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34317$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34318      has_space=`$ECHO "$complete" | $GREP " "`
34319      if test "x$has_space" != x; then
34320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34322      fi
34323      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34324    fi
34325  fi
34326
34327  # Now new_path has a complete unix path to the binary
34328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34329    # Keep paths in /bin as-is, but remove trailing .exe if any
34330    new_path="${new_path/%.exe/}"
34331    # Do not save /bin paths to all_fixpath_prefixes!
34332  else
34333    # Not in mixed or Windows style, start by that.
34334    new_path=`cmd //c echo $new_path`
34335
34336  input_path="$new_path"
34337  # Check if we need to convert this using DOS-style short mode. If the path
34338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34339  # take no chances and rewrite it.
34340  # Note: m4 eats our [], so we need to use [ and ] instead.
34341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34342  if test "x$has_forbidden_chars" != x; then
34343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34345  fi
34346
34347    # Output is in $new_path
34348
34349  windows_path="$new_path"
34350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34351    unix_path=`$CYGPATH -u "$windows_path"`
34352    new_path="$unix_path"
34353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34355    new_path="$unix_path"
34356  fi
34357
34358    # remove trailing .exe if any
34359    new_path="${new_path/%.exe/}"
34360
34361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34363  fi
34364
34365    else
34366      # We're on a unix platform. Hooray! :)
34367      # First separate the path from the arguments. This will split at the first
34368      # space.
34369      complete="$MT"
34370      path="${complete%% *}"
34371      tmp="$complete EOL"
34372      arguments="${tmp#* }"
34373
34374      # Cannot rely on the command "which" here since it doesn't always work.
34375      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34376      if test -z "$is_absolute_path"; then
34377        # Path to executable is not absolute. Find it.
34378        IFS_save="$IFS"
34379        IFS=:
34380        for p in $PATH; do
34381          if test -f "$p/$path" && test -x "$p/$path"; then
34382            new_path="$p/$path"
34383            break
34384          fi
34385        done
34386        IFS="$IFS_save"
34387      else
34388        # This is an absolute path, we can use it without further modifications.
34389        new_path="$path"
34390      fi
34391
34392      if test "x$new_path" = x; then
34393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34394$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34395        has_space=`$ECHO "$complete" | $GREP " "`
34396        if test "x$has_space" != x; then
34397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34399        fi
34400        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34401      fi
34402    fi
34403
34404    # Now join together the path and the arguments once again
34405    if test "x$arguments" != xEOL; then
34406      new_complete="$new_path ${arguments% *}"
34407    else
34408      new_complete="$new_path"
34409    fi
34410
34411    if test "x$complete" != "x$new_complete"; then
34412      MT="$new_complete"
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34414$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34415    fi
34416  fi
34417
34418    # Setup the resource compiler (RC)
34419    # Extract the first word of "rc", so it can be a program name with args.
34420set dummy rc; ac_word=$2
34421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34422$as_echo_n "checking for $ac_word... " >&6; }
34423if ${ac_cv_prog_RC+:} false; then :
34424  $as_echo_n "(cached) " >&6
34425else
34426  if test -n "$RC"; then
34427  ac_cv_prog_RC="$RC" # Let the user override the test.
34428else
34429  ac_prog_rejected=no
34430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34431for as_dir in $PATH
34432do
34433  IFS=$as_save_IFS
34434  test -z "$as_dir" && as_dir=.
34435    for ac_exec_ext in '' $ac_executable_extensions; do
34436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34437    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34438       ac_prog_rejected=yes
34439       continue
34440     fi
34441    ac_cv_prog_RC="rc"
34442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34443    break 2
34444  fi
34445done
34446  done
34447IFS=$as_save_IFS
34448
34449if test $ac_prog_rejected = yes; then
34450  # We found a bogon in the path, so make sure we never use it.
34451  set dummy $ac_cv_prog_RC
34452  shift
34453  if test $# != 0; then
34454    # We chose a different compiler from the bogus one.
34455    # However, it has the same basename, so the bogon will be chosen
34456    # first if we set RC to just the basename; use the full file name.
34457    shift
34458    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34459  fi
34460fi
34461fi
34462fi
34463RC=$ac_cv_prog_RC
34464if test -n "$RC"; then
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34466$as_echo "$RC" >&6; }
34467else
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34469$as_echo "no" >&6; }
34470fi
34471
34472
34473
34474  # Only process if variable expands to non-empty
34475
34476  if test "x$RC" != x; then
34477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34478
34479  # First separate the path from the arguments. This will split at the first
34480  # space.
34481  complete="$RC"
34482  path="${complete%% *}"
34483  tmp="$complete EOL"
34484  arguments="${tmp#* }"
34485
34486  # Input might be given as Windows format, start by converting to
34487  # unix format.
34488  new_path=`$CYGPATH -u "$path"`
34489
34490  # Now try to locate executable using which
34491  new_path=`$WHICH "$new_path" 2> /dev/null`
34492  # bat and cmd files are not always considered executable in cygwin causing which
34493  # to not find them
34494  if test "x$new_path" = x \
34495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34497    new_path=`$CYGPATH -u "$path"`
34498  fi
34499  if test "x$new_path" = x; then
34500    # Oops. Which didn't find the executable.
34501    # The splitting of arguments from the executable at a space might have been incorrect,
34502    # since paths with space are more likely in Windows. Give it another try with the whole
34503    # argument.
34504    path="$complete"
34505    arguments="EOL"
34506    new_path=`$CYGPATH -u "$path"`
34507    new_path=`$WHICH "$new_path" 2> /dev/null`
34508    # bat and cmd files are not always considered executable in cygwin causing which
34509    # to not find them
34510    if test "x$new_path" = x \
34511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34513      new_path=`$CYGPATH -u "$path"`
34514    fi
34515    if test "x$new_path" = x; then
34516      # It's still not found. Now this is an unrecoverable error.
34517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34518$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34519      has_space=`$ECHO "$complete" | $GREP " "`
34520      if test "x$has_space" != x; then
34521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34523      fi
34524      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34525    fi
34526  fi
34527
34528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34531  # "foo.exe" is OK but "foo" is an error.
34532  #
34533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34534  # It is also a way to make sure we got the proper file name for the real test later on.
34535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34536  if test "x$test_shortpath" = x; then
34537    # Short path failed, file does not exist as specified.
34538    # Try adding .exe or .cmd
34539    if test -f "${new_path}.exe"; then
34540      input_to_shortpath="${new_path}.exe"
34541    elif test -f "${new_path}.cmd"; then
34542      input_to_shortpath="${new_path}.cmd"
34543    else
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34545$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34548      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34549    fi
34550  else
34551    input_to_shortpath="$new_path"
34552  fi
34553
34554  # Call helper function which possibly converts this using DOS-style short mode.
34555  # If so, the updated path is stored in $new_path.
34556  new_path="$input_to_shortpath"
34557
34558  input_path="$input_to_shortpath"
34559  # Check if we need to convert this using DOS-style short mode. If the path
34560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34561  # take no chances and rewrite it.
34562  # Note: m4 eats our [], so we need to use [ and ] instead.
34563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34564  if test "x$has_forbidden_chars" != x; then
34565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34569      # Going to short mode and back again did indeed matter. Since short mode is
34570      # case insensitive, let's make it lowercase to improve readability.
34571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34572      # Now convert it back to Unix-style (cygpath)
34573      input_path=`$CYGPATH -u "$shortmode_path"`
34574      new_path="$input_path"
34575    fi
34576  fi
34577
34578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34579  if test "x$test_cygdrive_prefix" = x; then
34580    # As a simple fix, exclude /usr/bin since it's not a real path.
34581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34583      # a path prefixed by /cygdrive for fixpath to work.
34584      new_path="$CYGWIN_ROOT_PATH$input_path"
34585    fi
34586  fi
34587
34588  # remove trailing .exe if any
34589  new_path="${new_path/%.exe/}"
34590
34591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34592
34593  # First separate the path from the arguments. This will split at the first
34594  # space.
34595  complete="$RC"
34596  path="${complete%% *}"
34597  tmp="$complete EOL"
34598  arguments="${tmp#* }"
34599
34600  # Input might be given as Windows format, start by converting to
34601  # unix format.
34602  new_path="$path"
34603
34604  windows_path="$new_path"
34605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606    unix_path=`$CYGPATH -u "$windows_path"`
34607    new_path="$unix_path"
34608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34610    new_path="$unix_path"
34611  fi
34612
34613
34614  # Now try to locate executable using which
34615  new_path=`$WHICH "$new_path" 2> /dev/null`
34616
34617  if test "x$new_path" = x; then
34618    # Oops. Which didn't find the executable.
34619    # The splitting of arguments from the executable at a space might have been incorrect,
34620    # since paths with space are more likely in Windows. Give it another try with the whole
34621    # argument.
34622    path="$complete"
34623    arguments="EOL"
34624    new_path="$path"
34625
34626  windows_path="$new_path"
34627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34628    unix_path=`$CYGPATH -u "$windows_path"`
34629    new_path="$unix_path"
34630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34632    new_path="$unix_path"
34633  fi
34634
34635
34636    new_path=`$WHICH "$new_path" 2> /dev/null`
34637    # bat and cmd files are not always considered executable in MSYS causing which
34638    # to not find them
34639    if test "x$new_path" = x \
34640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34642      new_path="$path"
34643
34644  windows_path="$new_path"
34645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34646    unix_path=`$CYGPATH -u "$windows_path"`
34647    new_path="$unix_path"
34648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34650    new_path="$unix_path"
34651  fi
34652
34653    fi
34654
34655    if test "x$new_path" = x; then
34656      # It's still not found. Now this is an unrecoverable error.
34657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34658$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34659      has_space=`$ECHO "$complete" | $GREP " "`
34660      if test "x$has_space" != x; then
34661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34663      fi
34664      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34665    fi
34666  fi
34667
34668  # Now new_path has a complete unix path to the binary
34669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34670    # Keep paths in /bin as-is, but remove trailing .exe if any
34671    new_path="${new_path/%.exe/}"
34672    # Do not save /bin paths to all_fixpath_prefixes!
34673  else
34674    # Not in mixed or Windows style, start by that.
34675    new_path=`cmd //c echo $new_path`
34676
34677  input_path="$new_path"
34678  # Check if we need to convert this using DOS-style short mode. If the path
34679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34680  # take no chances and rewrite it.
34681  # Note: m4 eats our [], so we need to use [ and ] instead.
34682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34683  if test "x$has_forbidden_chars" != x; then
34684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34686  fi
34687
34688    # Output is in $new_path
34689
34690  windows_path="$new_path"
34691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34692    unix_path=`$CYGPATH -u "$windows_path"`
34693    new_path="$unix_path"
34694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34696    new_path="$unix_path"
34697  fi
34698
34699    # remove trailing .exe if any
34700    new_path="${new_path/%.exe/}"
34701
34702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34704  fi
34705
34706    else
34707      # We're on a unix platform. Hooray! :)
34708      # First separate the path from the arguments. This will split at the first
34709      # space.
34710      complete="$RC"
34711      path="${complete%% *}"
34712      tmp="$complete EOL"
34713      arguments="${tmp#* }"
34714
34715      # Cannot rely on the command "which" here since it doesn't always work.
34716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34717      if test -z "$is_absolute_path"; then
34718        # Path to executable is not absolute. Find it.
34719        IFS_save="$IFS"
34720        IFS=:
34721        for p in $PATH; do
34722          if test -f "$p/$path" && test -x "$p/$path"; then
34723            new_path="$p/$path"
34724            break
34725          fi
34726        done
34727        IFS="$IFS_save"
34728      else
34729        # This is an absolute path, we can use it without further modifications.
34730        new_path="$path"
34731      fi
34732
34733      if test "x$new_path" = x; then
34734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34735$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34736        has_space=`$ECHO "$complete" | $GREP " "`
34737        if test "x$has_space" != x; then
34738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34740        fi
34741        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34742      fi
34743    fi
34744
34745    # Now join together the path and the arguments once again
34746    if test "x$arguments" != xEOL; then
34747      new_complete="$new_path ${arguments% *}"
34748    else
34749      new_complete="$new_path"
34750    fi
34751
34752    if test "x$complete" != "x$new_complete"; then
34753      RC="$new_complete"
34754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34755$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34756    fi
34757  fi
34758
34759    # Extract the first word of "dumpbin", so it can be a program name with args.
34760set dummy dumpbin; ac_word=$2
34761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34762$as_echo_n "checking for $ac_word... " >&6; }
34763if ${ac_cv_prog_DUMPBIN+:} false; then :
34764  $as_echo_n "(cached) " >&6
34765else
34766  if test -n "$DUMPBIN"; then
34767  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34768else
34769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34770for as_dir in $PATH
34771do
34772  IFS=$as_save_IFS
34773  test -z "$as_dir" && as_dir=.
34774    for ac_exec_ext in '' $ac_executable_extensions; do
34775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34776    ac_cv_prog_DUMPBIN="dumpbin"
34777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34778    break 2
34779  fi
34780done
34781  done
34782IFS=$as_save_IFS
34783
34784fi
34785fi
34786DUMPBIN=$ac_cv_prog_DUMPBIN
34787if test -n "$DUMPBIN"; then
34788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34789$as_echo "$DUMPBIN" >&6; }
34790else
34791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34792$as_echo "no" >&6; }
34793fi
34794
34795
34796
34797  # Only process if variable expands to non-empty
34798
34799  if test "x$DUMPBIN" != x; then
34800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34801
34802  # First separate the path from the arguments. This will split at the first
34803  # space.
34804  complete="$DUMPBIN"
34805  path="${complete%% *}"
34806  tmp="$complete EOL"
34807  arguments="${tmp#* }"
34808
34809  # Input might be given as Windows format, start by converting to
34810  # unix format.
34811  new_path=`$CYGPATH -u "$path"`
34812
34813  # Now try to locate executable using which
34814  new_path=`$WHICH "$new_path" 2> /dev/null`
34815  # bat and cmd files are not always considered executable in cygwin causing which
34816  # to not find them
34817  if test "x$new_path" = x \
34818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34820    new_path=`$CYGPATH -u "$path"`
34821  fi
34822  if test "x$new_path" = x; then
34823    # Oops. Which didn't find the executable.
34824    # The splitting of arguments from the executable at a space might have been incorrect,
34825    # since paths with space are more likely in Windows. Give it another try with the whole
34826    # argument.
34827    path="$complete"
34828    arguments="EOL"
34829    new_path=`$CYGPATH -u "$path"`
34830    new_path=`$WHICH "$new_path" 2> /dev/null`
34831    # bat and cmd files are not always considered executable in cygwin causing which
34832    # to not find them
34833    if test "x$new_path" = x \
34834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34836      new_path=`$CYGPATH -u "$path"`
34837    fi
34838    if test "x$new_path" = x; then
34839      # It's still not found. Now this is an unrecoverable error.
34840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34841$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34842      has_space=`$ECHO "$complete" | $GREP " "`
34843      if test "x$has_space" != x; then
34844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34846      fi
34847      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34848    fi
34849  fi
34850
34851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34854  # "foo.exe" is OK but "foo" is an error.
34855  #
34856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34857  # It is also a way to make sure we got the proper file name for the real test later on.
34858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34859  if test "x$test_shortpath" = x; then
34860    # Short path failed, file does not exist as specified.
34861    # Try adding .exe or .cmd
34862    if test -f "${new_path}.exe"; then
34863      input_to_shortpath="${new_path}.exe"
34864    elif test -f "${new_path}.cmd"; then
34865      input_to_shortpath="${new_path}.cmd"
34866    else
34867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34868$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34871      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34872    fi
34873  else
34874    input_to_shortpath="$new_path"
34875  fi
34876
34877  # Call helper function which possibly converts this using DOS-style short mode.
34878  # If so, the updated path is stored in $new_path.
34879  new_path="$input_to_shortpath"
34880
34881  input_path="$input_to_shortpath"
34882  # Check if we need to convert this using DOS-style short mode. If the path
34883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34884  # take no chances and rewrite it.
34885  # Note: m4 eats our [], so we need to use [ and ] instead.
34886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34887  if test "x$has_forbidden_chars" != x; then
34888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34892      # Going to short mode and back again did indeed matter. Since short mode is
34893      # case insensitive, let's make it lowercase to improve readability.
34894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34895      # Now convert it back to Unix-style (cygpath)
34896      input_path=`$CYGPATH -u "$shortmode_path"`
34897      new_path="$input_path"
34898    fi
34899  fi
34900
34901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34902  if test "x$test_cygdrive_prefix" = x; then
34903    # As a simple fix, exclude /usr/bin since it's not a real path.
34904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34906      # a path prefixed by /cygdrive for fixpath to work.
34907      new_path="$CYGWIN_ROOT_PATH$input_path"
34908    fi
34909  fi
34910
34911  # remove trailing .exe if any
34912  new_path="${new_path/%.exe/}"
34913
34914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34915
34916  # First separate the path from the arguments. This will split at the first
34917  # space.
34918  complete="$DUMPBIN"
34919  path="${complete%% *}"
34920  tmp="$complete EOL"
34921  arguments="${tmp#* }"
34922
34923  # Input might be given as Windows format, start by converting to
34924  # unix format.
34925  new_path="$path"
34926
34927  windows_path="$new_path"
34928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34929    unix_path=`$CYGPATH -u "$windows_path"`
34930    new_path="$unix_path"
34931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34933    new_path="$unix_path"
34934  fi
34935
34936
34937  # Now try to locate executable using which
34938  new_path=`$WHICH "$new_path" 2> /dev/null`
34939
34940  if test "x$new_path" = x; then
34941    # Oops. Which didn't find the executable.
34942    # The splitting of arguments from the executable at a space might have been incorrect,
34943    # since paths with space are more likely in Windows. Give it another try with the whole
34944    # argument.
34945    path="$complete"
34946    arguments="EOL"
34947    new_path="$path"
34948
34949  windows_path="$new_path"
34950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34951    unix_path=`$CYGPATH -u "$windows_path"`
34952    new_path="$unix_path"
34953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34955    new_path="$unix_path"
34956  fi
34957
34958
34959    new_path=`$WHICH "$new_path" 2> /dev/null`
34960    # bat and cmd files are not always considered executable in MSYS causing which
34961    # to not find them
34962    if test "x$new_path" = x \
34963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34965      new_path="$path"
34966
34967  windows_path="$new_path"
34968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34969    unix_path=`$CYGPATH -u "$windows_path"`
34970    new_path="$unix_path"
34971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34973    new_path="$unix_path"
34974  fi
34975
34976    fi
34977
34978    if test "x$new_path" = x; then
34979      # It's still not found. Now this is an unrecoverable error.
34980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34981$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34982      has_space=`$ECHO "$complete" | $GREP " "`
34983      if test "x$has_space" != x; then
34984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34986      fi
34987      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34988    fi
34989  fi
34990
34991  # Now new_path has a complete unix path to the binary
34992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34993    # Keep paths in /bin as-is, but remove trailing .exe if any
34994    new_path="${new_path/%.exe/}"
34995    # Do not save /bin paths to all_fixpath_prefixes!
34996  else
34997    # Not in mixed or Windows style, start by that.
34998    new_path=`cmd //c echo $new_path`
34999
35000  input_path="$new_path"
35001  # Check if we need to convert this using DOS-style short mode. If the path
35002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35003  # take no chances and rewrite it.
35004  # Note: m4 eats our [], so we need to use [ and ] instead.
35005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35006  if test "x$has_forbidden_chars" != x; then
35007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35009  fi
35010
35011    # Output is in $new_path
35012
35013  windows_path="$new_path"
35014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35015    unix_path=`$CYGPATH -u "$windows_path"`
35016    new_path="$unix_path"
35017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35019    new_path="$unix_path"
35020  fi
35021
35022    # remove trailing .exe if any
35023    new_path="${new_path/%.exe/}"
35024
35025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35027  fi
35028
35029    else
35030      # We're on a unix platform. Hooray! :)
35031      # First separate the path from the arguments. This will split at the first
35032      # space.
35033      complete="$DUMPBIN"
35034      path="${complete%% *}"
35035      tmp="$complete EOL"
35036      arguments="${tmp#* }"
35037
35038      # Cannot rely on the command "which" here since it doesn't always work.
35039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35040      if test -z "$is_absolute_path"; then
35041        # Path to executable is not absolute. Find it.
35042        IFS_save="$IFS"
35043        IFS=:
35044        for p in $PATH; do
35045          if test -f "$p/$path" && test -x "$p/$path"; then
35046            new_path="$p/$path"
35047            break
35048          fi
35049        done
35050        IFS="$IFS_save"
35051      else
35052        # This is an absolute path, we can use it without further modifications.
35053        new_path="$path"
35054      fi
35055
35056      if test "x$new_path" = x; then
35057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35058$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35059        has_space=`$ECHO "$complete" | $GREP " "`
35060        if test "x$has_space" != x; then
35061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35063        fi
35064        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35065      fi
35066    fi
35067
35068    # Now join together the path and the arguments once again
35069    if test "x$arguments" != xEOL; then
35070      new_complete="$new_path ${arguments% *}"
35071    else
35072      new_complete="$new_path"
35073    fi
35074
35075    if test "x$complete" != "x$new_complete"; then
35076      DUMPBIN="$new_complete"
35077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35078$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35079    fi
35080  fi
35081
35082    # We need to check for 'msbuild.exe' because at the place where we expect to
35083    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35084    # won't find the 'msbuild.exe' executable in that case (and the
35085    # 'ac_executable_extensions' is unusable due to performance reasons).
35086    # Notice that we intentionally don't fix up the path to MSBUILD because we
35087    # will call it in a DOS shell during freetype detection on Windows (see
35088    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35089    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35090set dummy msbuild.exe; ac_word=$2
35091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35092$as_echo_n "checking for $ac_word... " >&6; }
35093if ${ac_cv_prog_MSBUILD+:} false; then :
35094  $as_echo_n "(cached) " >&6
35095else
35096  if test -n "$MSBUILD"; then
35097  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35098else
35099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35100for as_dir in $PATH
35101do
35102  IFS=$as_save_IFS
35103  test -z "$as_dir" && as_dir=.
35104    for ac_exec_ext in '' $ac_executable_extensions; do
35105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35106    ac_cv_prog_MSBUILD="msbuild.exe"
35107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35108    break 2
35109  fi
35110done
35111  done
35112IFS=$as_save_IFS
35113
35114fi
35115fi
35116MSBUILD=$ac_cv_prog_MSBUILD
35117if test -n "$MSBUILD"; then
35118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35119$as_echo "$MSBUILD" >&6; }
35120else
35121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35122$as_echo "no" >&6; }
35123fi
35124
35125
35126  fi
35127
35128  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35129
35130
35131  # Publish this variable in the help.
35132
35133
35134  if test "x$STRIP" = x; then
35135    # The variable is not set by user, try to locate tool using the code snippet
35136    for ac_prog in strip
35137do
35138  # Extract the first word of "$ac_prog", so it can be a program name with args.
35139set dummy $ac_prog; ac_word=$2
35140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35141$as_echo_n "checking for $ac_word... " >&6; }
35142if ${ac_cv_path_STRIP+:} false; then :
35143  $as_echo_n "(cached) " >&6
35144else
35145  case $STRIP in
35146  [\\/]* | ?:[\\/]*)
35147  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35148  ;;
35149  *)
35150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35151for as_dir in $PATH
35152do
35153  IFS=$as_save_IFS
35154  test -z "$as_dir" && as_dir=.
35155    for ac_exec_ext in '' $ac_executable_extensions; do
35156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35157    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35159    break 2
35160  fi
35161done
35162  done
35163IFS=$as_save_IFS
35164
35165  ;;
35166esac
35167fi
35168STRIP=$ac_cv_path_STRIP
35169if test -n "$STRIP"; then
35170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35171$as_echo "$STRIP" >&6; }
35172else
35173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35174$as_echo "no" >&6; }
35175fi
35176
35177
35178  test -n "$STRIP" && break
35179done
35180
35181  else
35182    # The variable is set, but is it from the command line or the environment?
35183
35184    # Try to remove the string !STRIP! from our list.
35185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35187      # If it failed, the variable was not from the command line. Ignore it,
35188      # but warn the user (except for BASH, which is always set by the calling BASH).
35189      if test "xSTRIP" != xBASH; then
35190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35191$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35192      fi
35193      # Try to locate tool using the code snippet
35194      for ac_prog in strip
35195do
35196  # Extract the first word of "$ac_prog", so it can be a program name with args.
35197set dummy $ac_prog; ac_word=$2
35198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35199$as_echo_n "checking for $ac_word... " >&6; }
35200if ${ac_cv_path_STRIP+:} false; then :
35201  $as_echo_n "(cached) " >&6
35202else
35203  case $STRIP in
35204  [\\/]* | ?:[\\/]*)
35205  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35206  ;;
35207  *)
35208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35209for as_dir in $PATH
35210do
35211  IFS=$as_save_IFS
35212  test -z "$as_dir" && as_dir=.
35213    for ac_exec_ext in '' $ac_executable_extensions; do
35214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35215    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35217    break 2
35218  fi
35219done
35220  done
35221IFS=$as_save_IFS
35222
35223  ;;
35224esac
35225fi
35226STRIP=$ac_cv_path_STRIP
35227if test -n "$STRIP"; then
35228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35229$as_echo "$STRIP" >&6; }
35230else
35231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35232$as_echo "no" >&6; }
35233fi
35234
35235
35236  test -n "$STRIP" && break
35237done
35238
35239    else
35240      # If it succeeded, then it was overridden by the user. We will use it
35241      # for the tool.
35242
35243      # First remove it from the list of overridden variables, so we can test
35244      # for unknown variables in the end.
35245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35246
35247      # Check if the provided tool contains a complete path.
35248      tool_specified="$STRIP"
35249      tool_basename="${tool_specified##*/}"
35250      if test "x$tool_basename" = "x$tool_specified"; then
35251        # A command without a complete path is provided, search $PATH.
35252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35253$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35254        # Extract the first word of "$tool_basename", so it can be a program name with args.
35255set dummy $tool_basename; ac_word=$2
35256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35257$as_echo_n "checking for $ac_word... " >&6; }
35258if ${ac_cv_path_STRIP+:} false; then :
35259  $as_echo_n "(cached) " >&6
35260else
35261  case $STRIP in
35262  [\\/]* | ?:[\\/]*)
35263  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35264  ;;
35265  *)
35266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35267for as_dir in $PATH
35268do
35269  IFS=$as_save_IFS
35270  test -z "$as_dir" && as_dir=.
35271    for ac_exec_ext in '' $ac_executable_extensions; do
35272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35273    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35275    break 2
35276  fi
35277done
35278  done
35279IFS=$as_save_IFS
35280
35281  ;;
35282esac
35283fi
35284STRIP=$ac_cv_path_STRIP
35285if test -n "$STRIP"; then
35286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35287$as_echo "$STRIP" >&6; }
35288else
35289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35290$as_echo "no" >&6; }
35291fi
35292
35293
35294        if test "x$STRIP" = x; then
35295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35296        fi
35297      else
35298        # Otherwise we believe it is a complete path. Use it as it is.
35299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35300$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35302$as_echo_n "checking for STRIP... " >&6; }
35303        if test ! -x "$tool_specified"; then
35304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35305$as_echo "not found" >&6; }
35306          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35307        fi
35308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35309$as_echo "$tool_specified" >&6; }
35310      fi
35311    fi
35312  fi
35313
35314
35315
35316  # Only process if variable expands to non-empty
35317
35318  if test "x$STRIP" != x; then
35319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35320
35321  # First separate the path from the arguments. This will split at the first
35322  # space.
35323  complete="$STRIP"
35324  path="${complete%% *}"
35325  tmp="$complete EOL"
35326  arguments="${tmp#* }"
35327
35328  # Input might be given as Windows format, start by converting to
35329  # unix format.
35330  new_path=`$CYGPATH -u "$path"`
35331
35332  # Now try to locate executable using which
35333  new_path=`$WHICH "$new_path" 2> /dev/null`
35334  # bat and cmd files are not always considered executable in cygwin causing which
35335  # to not find them
35336  if test "x$new_path" = x \
35337      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35338      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35339    new_path=`$CYGPATH -u "$path"`
35340  fi
35341  if test "x$new_path" = x; then
35342    # Oops. Which didn't find the executable.
35343    # The splitting of arguments from the executable at a space might have been incorrect,
35344    # since paths with space are more likely in Windows. Give it another try with the whole
35345    # argument.
35346    path="$complete"
35347    arguments="EOL"
35348    new_path=`$CYGPATH -u "$path"`
35349    new_path=`$WHICH "$new_path" 2> /dev/null`
35350    # bat and cmd files are not always considered executable in cygwin causing which
35351    # to not find them
35352    if test "x$new_path" = x \
35353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35355      new_path=`$CYGPATH -u "$path"`
35356    fi
35357    if test "x$new_path" = x; then
35358      # It's still not found. Now this is an unrecoverable error.
35359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35360$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35361      has_space=`$ECHO "$complete" | $GREP " "`
35362      if test "x$has_space" != x; then
35363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35365      fi
35366      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35367    fi
35368  fi
35369
35370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35373  # "foo.exe" is OK but "foo" is an error.
35374  #
35375  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35376  # It is also a way to make sure we got the proper file name for the real test later on.
35377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35378  if test "x$test_shortpath" = x; then
35379    # Short path failed, file does not exist as specified.
35380    # Try adding .exe or .cmd
35381    if test -f "${new_path}.exe"; then
35382      input_to_shortpath="${new_path}.exe"
35383    elif test -f "${new_path}.cmd"; then
35384      input_to_shortpath="${new_path}.cmd"
35385    else
35386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35387$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35390      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35391    fi
35392  else
35393    input_to_shortpath="$new_path"
35394  fi
35395
35396  # Call helper function which possibly converts this using DOS-style short mode.
35397  # If so, the updated path is stored in $new_path.
35398  new_path="$input_to_shortpath"
35399
35400  input_path="$input_to_shortpath"
35401  # Check if we need to convert this using DOS-style short mode. If the path
35402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35403  # take no chances and rewrite it.
35404  # Note: m4 eats our [], so we need to use [ and ] instead.
35405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35406  if test "x$has_forbidden_chars" != x; then
35407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35411      # Going to short mode and back again did indeed matter. Since short mode is
35412      # case insensitive, let's make it lowercase to improve readability.
35413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35414      # Now convert it back to Unix-style (cygpath)
35415      input_path=`$CYGPATH -u "$shortmode_path"`
35416      new_path="$input_path"
35417    fi
35418  fi
35419
35420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35421  if test "x$test_cygdrive_prefix" = x; then
35422    # As a simple fix, exclude /usr/bin since it's not a real path.
35423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35425      # a path prefixed by /cygdrive for fixpath to work.
35426      new_path="$CYGWIN_ROOT_PATH$input_path"
35427    fi
35428  fi
35429
35430  # remove trailing .exe if any
35431  new_path="${new_path/%.exe/}"
35432
35433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35434
35435  # First separate the path from the arguments. This will split at the first
35436  # space.
35437  complete="$STRIP"
35438  path="${complete%% *}"
35439  tmp="$complete EOL"
35440  arguments="${tmp#* }"
35441
35442  # Input might be given as Windows format, start by converting to
35443  # unix format.
35444  new_path="$path"
35445
35446  windows_path="$new_path"
35447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35448    unix_path=`$CYGPATH -u "$windows_path"`
35449    new_path="$unix_path"
35450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35452    new_path="$unix_path"
35453  fi
35454
35455
35456  # Now try to locate executable using which
35457  new_path=`$WHICH "$new_path" 2> /dev/null`
35458
35459  if test "x$new_path" = x; then
35460    # Oops. Which didn't find the executable.
35461    # The splitting of arguments from the executable at a space might have been incorrect,
35462    # since paths with space are more likely in Windows. Give it another try with the whole
35463    # argument.
35464    path="$complete"
35465    arguments="EOL"
35466    new_path="$path"
35467
35468  windows_path="$new_path"
35469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35470    unix_path=`$CYGPATH -u "$windows_path"`
35471    new_path="$unix_path"
35472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35474    new_path="$unix_path"
35475  fi
35476
35477
35478    new_path=`$WHICH "$new_path" 2> /dev/null`
35479    # bat and cmd files are not always considered executable in MSYS causing which
35480    # to not find them
35481    if test "x$new_path" = x \
35482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35484      new_path="$path"
35485
35486  windows_path="$new_path"
35487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35488    unix_path=`$CYGPATH -u "$windows_path"`
35489    new_path="$unix_path"
35490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35492    new_path="$unix_path"
35493  fi
35494
35495    fi
35496
35497    if test "x$new_path" = x; then
35498      # It's still not found. Now this is an unrecoverable error.
35499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35500$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35501      has_space=`$ECHO "$complete" | $GREP " "`
35502      if test "x$has_space" != x; then
35503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35505      fi
35506      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35507    fi
35508  fi
35509
35510  # Now new_path has a complete unix path to the binary
35511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35512    # Keep paths in /bin as-is, but remove trailing .exe if any
35513    new_path="${new_path/%.exe/}"
35514    # Do not save /bin paths to all_fixpath_prefixes!
35515  else
35516    # Not in mixed or Windows style, start by that.
35517    new_path=`cmd //c echo $new_path`
35518
35519  input_path="$new_path"
35520  # Check if we need to convert this using DOS-style short mode. If the path
35521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35522  # take no chances and rewrite it.
35523  # Note: m4 eats our [], so we need to use [ and ] instead.
35524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35525  if test "x$has_forbidden_chars" != x; then
35526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35528  fi
35529
35530    # Output is in $new_path
35531
35532  windows_path="$new_path"
35533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35534    unix_path=`$CYGPATH -u "$windows_path"`
35535    new_path="$unix_path"
35536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35538    new_path="$unix_path"
35539  fi
35540
35541    # remove trailing .exe if any
35542    new_path="${new_path/%.exe/}"
35543
35544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35546  fi
35547
35548    else
35549      # We're on a unix platform. Hooray! :)
35550      # First separate the path from the arguments. This will split at the first
35551      # space.
35552      complete="$STRIP"
35553      path="${complete%% *}"
35554      tmp="$complete EOL"
35555      arguments="${tmp#* }"
35556
35557      # Cannot rely on the command "which" here since it doesn't always work.
35558      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35559      if test -z "$is_absolute_path"; then
35560        # Path to executable is not absolute. Find it.
35561        IFS_save="$IFS"
35562        IFS=:
35563        for p in $PATH; do
35564          if test -f "$p/$path" && test -x "$p/$path"; then
35565            new_path="$p/$path"
35566            break
35567          fi
35568        done
35569        IFS="$IFS_save"
35570      else
35571        # This is an absolute path, we can use it without further modifications.
35572        new_path="$path"
35573      fi
35574
35575      if test "x$new_path" = x; then
35576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35577$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35578        has_space=`$ECHO "$complete" | $GREP " "`
35579        if test "x$has_space" != x; then
35580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35582        fi
35583        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35584      fi
35585    fi
35586
35587    # Now join together the path and the arguments once again
35588    if test "x$arguments" != xEOL; then
35589      new_complete="$new_path ${arguments% *}"
35590    else
35591      new_complete="$new_path"
35592    fi
35593
35594    if test "x$complete" != "x$new_complete"; then
35595      STRIP="$new_complete"
35596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35597$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35598    fi
35599  fi
35600
35601
35602
35603  # Publish this variable in the help.
35604
35605
35606  if test "x$NM" = x; then
35607    # The variable is not set by user, try to locate tool using the code snippet
35608    for ac_prog in nm
35609do
35610  # Extract the first word of "$ac_prog", so it can be a program name with args.
35611set dummy $ac_prog; ac_word=$2
35612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35613$as_echo_n "checking for $ac_word... " >&6; }
35614if ${ac_cv_path_NM+:} false; then :
35615  $as_echo_n "(cached) " >&6
35616else
35617  case $NM in
35618  [\\/]* | ?:[\\/]*)
35619  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35620  ;;
35621  *)
35622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35623for as_dir in $PATH
35624do
35625  IFS=$as_save_IFS
35626  test -z "$as_dir" && as_dir=.
35627    for ac_exec_ext in '' $ac_executable_extensions; do
35628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35629    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35631    break 2
35632  fi
35633done
35634  done
35635IFS=$as_save_IFS
35636
35637  ;;
35638esac
35639fi
35640NM=$ac_cv_path_NM
35641if test -n "$NM"; then
35642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35643$as_echo "$NM" >&6; }
35644else
35645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35646$as_echo "no" >&6; }
35647fi
35648
35649
35650  test -n "$NM" && break
35651done
35652
35653  else
35654    # The variable is set, but is it from the command line or the environment?
35655
35656    # Try to remove the string !NM! from our list.
35657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35659      # If it failed, the variable was not from the command line. Ignore it,
35660      # but warn the user (except for BASH, which is always set by the calling BASH).
35661      if test "xNM" != xBASH; then
35662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35663$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35664      fi
35665      # Try to locate tool using the code snippet
35666      for ac_prog in nm
35667do
35668  # Extract the first word of "$ac_prog", so it can be a program name with args.
35669set dummy $ac_prog; ac_word=$2
35670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35671$as_echo_n "checking for $ac_word... " >&6; }
35672if ${ac_cv_path_NM+:} false; then :
35673  $as_echo_n "(cached) " >&6
35674else
35675  case $NM in
35676  [\\/]* | ?:[\\/]*)
35677  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35678  ;;
35679  *)
35680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35681for as_dir in $PATH
35682do
35683  IFS=$as_save_IFS
35684  test -z "$as_dir" && as_dir=.
35685    for ac_exec_ext in '' $ac_executable_extensions; do
35686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35687    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35689    break 2
35690  fi
35691done
35692  done
35693IFS=$as_save_IFS
35694
35695  ;;
35696esac
35697fi
35698NM=$ac_cv_path_NM
35699if test -n "$NM"; then
35700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35701$as_echo "$NM" >&6; }
35702else
35703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35704$as_echo "no" >&6; }
35705fi
35706
35707
35708  test -n "$NM" && break
35709done
35710
35711    else
35712      # If it succeeded, then it was overridden by the user. We will use it
35713      # for the tool.
35714
35715      # First remove it from the list of overridden variables, so we can test
35716      # for unknown variables in the end.
35717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35718
35719      # Check if the provided tool contains a complete path.
35720      tool_specified="$NM"
35721      tool_basename="${tool_specified##*/}"
35722      if test "x$tool_basename" = "x$tool_specified"; then
35723        # A command without a complete path is provided, search $PATH.
35724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35725$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35726        # Extract the first word of "$tool_basename", so it can be a program name with args.
35727set dummy $tool_basename; ac_word=$2
35728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35729$as_echo_n "checking for $ac_word... " >&6; }
35730if ${ac_cv_path_NM+:} false; then :
35731  $as_echo_n "(cached) " >&6
35732else
35733  case $NM in
35734  [\\/]* | ?:[\\/]*)
35735  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35736  ;;
35737  *)
35738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35739for as_dir in $PATH
35740do
35741  IFS=$as_save_IFS
35742  test -z "$as_dir" && as_dir=.
35743    for ac_exec_ext in '' $ac_executable_extensions; do
35744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35745    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35747    break 2
35748  fi
35749done
35750  done
35751IFS=$as_save_IFS
35752
35753  ;;
35754esac
35755fi
35756NM=$ac_cv_path_NM
35757if test -n "$NM"; then
35758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35759$as_echo "$NM" >&6; }
35760else
35761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35762$as_echo "no" >&6; }
35763fi
35764
35765
35766        if test "x$NM" = x; then
35767          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35768        fi
35769      else
35770        # Otherwise we believe it is a complete path. Use it as it is.
35771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35772$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35774$as_echo_n "checking for NM... " >&6; }
35775        if test ! -x "$tool_specified"; then
35776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35777$as_echo "not found" >&6; }
35778          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35779        fi
35780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35781$as_echo "$tool_specified" >&6; }
35782      fi
35783    fi
35784  fi
35785
35786
35787
35788  # Only process if variable expands to non-empty
35789
35790  if test "x$NM" != x; then
35791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35792
35793  # First separate the path from the arguments. This will split at the first
35794  # space.
35795  complete="$NM"
35796  path="${complete%% *}"
35797  tmp="$complete EOL"
35798  arguments="${tmp#* }"
35799
35800  # Input might be given as Windows format, start by converting to
35801  # unix format.
35802  new_path=`$CYGPATH -u "$path"`
35803
35804  # Now try to locate executable using which
35805  new_path=`$WHICH "$new_path" 2> /dev/null`
35806  # bat and cmd files are not always considered executable in cygwin causing which
35807  # to not find them
35808  if test "x$new_path" = x \
35809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35811    new_path=`$CYGPATH -u "$path"`
35812  fi
35813  if test "x$new_path" = x; then
35814    # Oops. Which didn't find the executable.
35815    # The splitting of arguments from the executable at a space might have been incorrect,
35816    # since paths with space are more likely in Windows. Give it another try with the whole
35817    # argument.
35818    path="$complete"
35819    arguments="EOL"
35820    new_path=`$CYGPATH -u "$path"`
35821    new_path=`$WHICH "$new_path" 2> /dev/null`
35822    # bat and cmd files are not always considered executable in cygwin causing which
35823    # to not find them
35824    if test "x$new_path" = x \
35825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35827      new_path=`$CYGPATH -u "$path"`
35828    fi
35829    if test "x$new_path" = x; then
35830      # It's still not found. Now this is an unrecoverable error.
35831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35832$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35833      has_space=`$ECHO "$complete" | $GREP " "`
35834      if test "x$has_space" != x; then
35835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35837      fi
35838      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35839    fi
35840  fi
35841
35842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35845  # "foo.exe" is OK but "foo" is an error.
35846  #
35847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35848  # It is also a way to make sure we got the proper file name for the real test later on.
35849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35850  if test "x$test_shortpath" = x; then
35851    # Short path failed, file does not exist as specified.
35852    # Try adding .exe or .cmd
35853    if test -f "${new_path}.exe"; then
35854      input_to_shortpath="${new_path}.exe"
35855    elif test -f "${new_path}.cmd"; then
35856      input_to_shortpath="${new_path}.cmd"
35857    else
35858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35859$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35862      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35863    fi
35864  else
35865    input_to_shortpath="$new_path"
35866  fi
35867
35868  # Call helper function which possibly converts this using DOS-style short mode.
35869  # If so, the updated path is stored in $new_path.
35870  new_path="$input_to_shortpath"
35871
35872  input_path="$input_to_shortpath"
35873  # Check if we need to convert this using DOS-style short mode. If the path
35874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35875  # take no chances and rewrite it.
35876  # Note: m4 eats our [], so we need to use [ and ] instead.
35877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35878  if test "x$has_forbidden_chars" != x; then
35879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35883      # Going to short mode and back again did indeed matter. Since short mode is
35884      # case insensitive, let's make it lowercase to improve readability.
35885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35886      # Now convert it back to Unix-style (cygpath)
35887      input_path=`$CYGPATH -u "$shortmode_path"`
35888      new_path="$input_path"
35889    fi
35890  fi
35891
35892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35893  if test "x$test_cygdrive_prefix" = x; then
35894    # As a simple fix, exclude /usr/bin since it's not a real path.
35895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35897      # a path prefixed by /cygdrive for fixpath to work.
35898      new_path="$CYGWIN_ROOT_PATH$input_path"
35899    fi
35900  fi
35901
35902  # remove trailing .exe if any
35903  new_path="${new_path/%.exe/}"
35904
35905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35906
35907  # First separate the path from the arguments. This will split at the first
35908  # space.
35909  complete="$NM"
35910  path="${complete%% *}"
35911  tmp="$complete EOL"
35912  arguments="${tmp#* }"
35913
35914  # Input might be given as Windows format, start by converting to
35915  # unix format.
35916  new_path="$path"
35917
35918  windows_path="$new_path"
35919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35920    unix_path=`$CYGPATH -u "$windows_path"`
35921    new_path="$unix_path"
35922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35924    new_path="$unix_path"
35925  fi
35926
35927
35928  # Now try to locate executable using which
35929  new_path=`$WHICH "$new_path" 2> /dev/null`
35930
35931  if test "x$new_path" = x; then
35932    # Oops. Which didn't find the executable.
35933    # The splitting of arguments from the executable at a space might have been incorrect,
35934    # since paths with space are more likely in Windows. Give it another try with the whole
35935    # argument.
35936    path="$complete"
35937    arguments="EOL"
35938    new_path="$path"
35939
35940  windows_path="$new_path"
35941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35942    unix_path=`$CYGPATH -u "$windows_path"`
35943    new_path="$unix_path"
35944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35946    new_path="$unix_path"
35947  fi
35948
35949
35950    new_path=`$WHICH "$new_path" 2> /dev/null`
35951    # bat and cmd files are not always considered executable in MSYS causing which
35952    # to not find them
35953    if test "x$new_path" = x \
35954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35956      new_path="$path"
35957
35958  windows_path="$new_path"
35959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35960    unix_path=`$CYGPATH -u "$windows_path"`
35961    new_path="$unix_path"
35962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35964    new_path="$unix_path"
35965  fi
35966
35967    fi
35968
35969    if test "x$new_path" = x; then
35970      # It's still not found. Now this is an unrecoverable error.
35971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35972$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35973      has_space=`$ECHO "$complete" | $GREP " "`
35974      if test "x$has_space" != x; then
35975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35977      fi
35978      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35979    fi
35980  fi
35981
35982  # Now new_path has a complete unix path to the binary
35983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35984    # Keep paths in /bin as-is, but remove trailing .exe if any
35985    new_path="${new_path/%.exe/}"
35986    # Do not save /bin paths to all_fixpath_prefixes!
35987  else
35988    # Not in mixed or Windows style, start by that.
35989    new_path=`cmd //c echo $new_path`
35990
35991  input_path="$new_path"
35992  # Check if we need to convert this using DOS-style short mode. If the path
35993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35994  # take no chances and rewrite it.
35995  # Note: m4 eats our [], so we need to use [ and ] instead.
35996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35997  if test "x$has_forbidden_chars" != x; then
35998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36000  fi
36001
36002    # Output is in $new_path
36003
36004  windows_path="$new_path"
36005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36006    unix_path=`$CYGPATH -u "$windows_path"`
36007    new_path="$unix_path"
36008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36010    new_path="$unix_path"
36011  fi
36012
36013    # remove trailing .exe if any
36014    new_path="${new_path/%.exe/}"
36015
36016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36018  fi
36019
36020    else
36021      # We're on a unix platform. Hooray! :)
36022      # First separate the path from the arguments. This will split at the first
36023      # space.
36024      complete="$NM"
36025      path="${complete%% *}"
36026      tmp="$complete EOL"
36027      arguments="${tmp#* }"
36028
36029      # Cannot rely on the command "which" here since it doesn't always work.
36030      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36031      if test -z "$is_absolute_path"; then
36032        # Path to executable is not absolute. Find it.
36033        IFS_save="$IFS"
36034        IFS=:
36035        for p in $PATH; do
36036          if test -f "$p/$path" && test -x "$p/$path"; then
36037            new_path="$p/$path"
36038            break
36039          fi
36040        done
36041        IFS="$IFS_save"
36042      else
36043        # This is an absolute path, we can use it without further modifications.
36044        new_path="$path"
36045      fi
36046
36047      if test "x$new_path" = x; then
36048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36049$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36050        has_space=`$ECHO "$complete" | $GREP " "`
36051        if test "x$has_space" != x; then
36052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36054        fi
36055        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36056      fi
36057    fi
36058
36059    # Now join together the path and the arguments once again
36060    if test "x$arguments" != xEOL; then
36061      new_complete="$new_path ${arguments% *}"
36062    else
36063      new_complete="$new_path"
36064    fi
36065
36066    if test "x$complete" != "x$new_complete"; then
36067      NM="$new_complete"
36068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36069$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36070    fi
36071  fi
36072
36073
36074
36075  # Publish this variable in the help.
36076
36077
36078  if test "x$GNM" = x; then
36079    # The variable is not set by user, try to locate tool using the code snippet
36080    for ac_prog in gnm
36081do
36082  # Extract the first word of "$ac_prog", so it can be a program name with args.
36083set dummy $ac_prog; ac_word=$2
36084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36085$as_echo_n "checking for $ac_word... " >&6; }
36086if ${ac_cv_path_GNM+:} false; then :
36087  $as_echo_n "(cached) " >&6
36088else
36089  case $GNM in
36090  [\\/]* | ?:[\\/]*)
36091  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36092  ;;
36093  *)
36094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36095for as_dir in $PATH
36096do
36097  IFS=$as_save_IFS
36098  test -z "$as_dir" && as_dir=.
36099    for ac_exec_ext in '' $ac_executable_extensions; do
36100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36101    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36103    break 2
36104  fi
36105done
36106  done
36107IFS=$as_save_IFS
36108
36109  ;;
36110esac
36111fi
36112GNM=$ac_cv_path_GNM
36113if test -n "$GNM"; then
36114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36115$as_echo "$GNM" >&6; }
36116else
36117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36118$as_echo "no" >&6; }
36119fi
36120
36121
36122  test -n "$GNM" && break
36123done
36124
36125  else
36126    # The variable is set, but is it from the command line or the environment?
36127
36128    # Try to remove the string !GNM! from our list.
36129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36131      # If it failed, the variable was not from the command line. Ignore it,
36132      # but warn the user (except for BASH, which is always set by the calling BASH).
36133      if test "xGNM" != xBASH; then
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36135$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36136      fi
36137      # Try to locate tool using the code snippet
36138      for ac_prog in gnm
36139do
36140  # Extract the first word of "$ac_prog", so it can be a program name with args.
36141set dummy $ac_prog; ac_word=$2
36142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36143$as_echo_n "checking for $ac_word... " >&6; }
36144if ${ac_cv_path_GNM+:} false; then :
36145  $as_echo_n "(cached) " >&6
36146else
36147  case $GNM in
36148  [\\/]* | ?:[\\/]*)
36149  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36150  ;;
36151  *)
36152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36153for as_dir in $PATH
36154do
36155  IFS=$as_save_IFS
36156  test -z "$as_dir" && as_dir=.
36157    for ac_exec_ext in '' $ac_executable_extensions; do
36158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36159    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36161    break 2
36162  fi
36163done
36164  done
36165IFS=$as_save_IFS
36166
36167  ;;
36168esac
36169fi
36170GNM=$ac_cv_path_GNM
36171if test -n "$GNM"; then
36172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36173$as_echo "$GNM" >&6; }
36174else
36175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36176$as_echo "no" >&6; }
36177fi
36178
36179
36180  test -n "$GNM" && break
36181done
36182
36183    else
36184      # If it succeeded, then it was overridden by the user. We will use it
36185      # for the tool.
36186
36187      # First remove it from the list of overridden variables, so we can test
36188      # for unknown variables in the end.
36189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36190
36191      # Check if the provided tool contains a complete path.
36192      tool_specified="$GNM"
36193      tool_basename="${tool_specified##*/}"
36194      if test "x$tool_basename" = "x$tool_specified"; then
36195        # A command without a complete path is provided, search $PATH.
36196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36197$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36198        # Extract the first word of "$tool_basename", so it can be a program name with args.
36199set dummy $tool_basename; ac_word=$2
36200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36201$as_echo_n "checking for $ac_word... " >&6; }
36202if ${ac_cv_path_GNM+:} false; then :
36203  $as_echo_n "(cached) " >&6
36204else
36205  case $GNM in
36206  [\\/]* | ?:[\\/]*)
36207  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36208  ;;
36209  *)
36210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36211for as_dir in $PATH
36212do
36213  IFS=$as_save_IFS
36214  test -z "$as_dir" && as_dir=.
36215    for ac_exec_ext in '' $ac_executable_extensions; do
36216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36217    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36219    break 2
36220  fi
36221done
36222  done
36223IFS=$as_save_IFS
36224
36225  ;;
36226esac
36227fi
36228GNM=$ac_cv_path_GNM
36229if test -n "$GNM"; then
36230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36231$as_echo "$GNM" >&6; }
36232else
36233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36234$as_echo "no" >&6; }
36235fi
36236
36237
36238        if test "x$GNM" = x; then
36239          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36240        fi
36241      else
36242        # Otherwise we believe it is a complete path. Use it as it is.
36243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36244$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36246$as_echo_n "checking for GNM... " >&6; }
36247        if test ! -x "$tool_specified"; then
36248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36249$as_echo "not found" >&6; }
36250          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36251        fi
36252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36253$as_echo "$tool_specified" >&6; }
36254      fi
36255    fi
36256  fi
36257
36258
36259
36260  # Only process if variable expands to non-empty
36261
36262  if test "x$GNM" != x; then
36263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36264
36265  # First separate the path from the arguments. This will split at the first
36266  # space.
36267  complete="$GNM"
36268  path="${complete%% *}"
36269  tmp="$complete EOL"
36270  arguments="${tmp#* }"
36271
36272  # Input might be given as Windows format, start by converting to
36273  # unix format.
36274  new_path=`$CYGPATH -u "$path"`
36275
36276  # Now try to locate executable using which
36277  new_path=`$WHICH "$new_path" 2> /dev/null`
36278  # bat and cmd files are not always considered executable in cygwin causing which
36279  # to not find them
36280  if test "x$new_path" = x \
36281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36283    new_path=`$CYGPATH -u "$path"`
36284  fi
36285  if test "x$new_path" = x; then
36286    # Oops. Which didn't find the executable.
36287    # The splitting of arguments from the executable at a space might have been incorrect,
36288    # since paths with space are more likely in Windows. Give it another try with the whole
36289    # argument.
36290    path="$complete"
36291    arguments="EOL"
36292    new_path=`$CYGPATH -u "$path"`
36293    new_path=`$WHICH "$new_path" 2> /dev/null`
36294    # bat and cmd files are not always considered executable in cygwin causing which
36295    # to not find them
36296    if test "x$new_path" = x \
36297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36299      new_path=`$CYGPATH -u "$path"`
36300    fi
36301    if test "x$new_path" = x; then
36302      # It's still not found. Now this is an unrecoverable error.
36303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36304$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36305      has_space=`$ECHO "$complete" | $GREP " "`
36306      if test "x$has_space" != x; then
36307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36309      fi
36310      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36311    fi
36312  fi
36313
36314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36317  # "foo.exe" is OK but "foo" is an error.
36318  #
36319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36320  # It is also a way to make sure we got the proper file name for the real test later on.
36321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36322  if test "x$test_shortpath" = x; then
36323    # Short path failed, file does not exist as specified.
36324    # Try adding .exe or .cmd
36325    if test -f "${new_path}.exe"; then
36326      input_to_shortpath="${new_path}.exe"
36327    elif test -f "${new_path}.cmd"; then
36328      input_to_shortpath="${new_path}.cmd"
36329    else
36330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36331$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36334      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36335    fi
36336  else
36337    input_to_shortpath="$new_path"
36338  fi
36339
36340  # Call helper function which possibly converts this using DOS-style short mode.
36341  # If so, the updated path is stored in $new_path.
36342  new_path="$input_to_shortpath"
36343
36344  input_path="$input_to_shortpath"
36345  # Check if we need to convert this using DOS-style short mode. If the path
36346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36347  # take no chances and rewrite it.
36348  # Note: m4 eats our [], so we need to use [ and ] instead.
36349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36350  if test "x$has_forbidden_chars" != x; then
36351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36355      # Going to short mode and back again did indeed matter. Since short mode is
36356      # case insensitive, let's make it lowercase to improve readability.
36357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36358      # Now convert it back to Unix-style (cygpath)
36359      input_path=`$CYGPATH -u "$shortmode_path"`
36360      new_path="$input_path"
36361    fi
36362  fi
36363
36364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36365  if test "x$test_cygdrive_prefix" = x; then
36366    # As a simple fix, exclude /usr/bin since it's not a real path.
36367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36369      # a path prefixed by /cygdrive for fixpath to work.
36370      new_path="$CYGWIN_ROOT_PATH$input_path"
36371    fi
36372  fi
36373
36374  # remove trailing .exe if any
36375  new_path="${new_path/%.exe/}"
36376
36377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36378
36379  # First separate the path from the arguments. This will split at the first
36380  # space.
36381  complete="$GNM"
36382  path="${complete%% *}"
36383  tmp="$complete EOL"
36384  arguments="${tmp#* }"
36385
36386  # Input might be given as Windows format, start by converting to
36387  # unix format.
36388  new_path="$path"
36389
36390  windows_path="$new_path"
36391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36392    unix_path=`$CYGPATH -u "$windows_path"`
36393    new_path="$unix_path"
36394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36396    new_path="$unix_path"
36397  fi
36398
36399
36400  # Now try to locate executable using which
36401  new_path=`$WHICH "$new_path" 2> /dev/null`
36402
36403  if test "x$new_path" = x; then
36404    # Oops. Which didn't find the executable.
36405    # The splitting of arguments from the executable at a space might have been incorrect,
36406    # since paths with space are more likely in Windows. Give it another try with the whole
36407    # argument.
36408    path="$complete"
36409    arguments="EOL"
36410    new_path="$path"
36411
36412  windows_path="$new_path"
36413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36414    unix_path=`$CYGPATH -u "$windows_path"`
36415    new_path="$unix_path"
36416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36418    new_path="$unix_path"
36419  fi
36420
36421
36422    new_path=`$WHICH "$new_path" 2> /dev/null`
36423    # bat and cmd files are not always considered executable in MSYS causing which
36424    # to not find them
36425    if test "x$new_path" = x \
36426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36428      new_path="$path"
36429
36430  windows_path="$new_path"
36431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36432    unix_path=`$CYGPATH -u "$windows_path"`
36433    new_path="$unix_path"
36434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36436    new_path="$unix_path"
36437  fi
36438
36439    fi
36440
36441    if test "x$new_path" = x; then
36442      # It's still not found. Now this is an unrecoverable error.
36443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36444$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36445      has_space=`$ECHO "$complete" | $GREP " "`
36446      if test "x$has_space" != x; then
36447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36449      fi
36450      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36451    fi
36452  fi
36453
36454  # Now new_path has a complete unix path to the binary
36455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36456    # Keep paths in /bin as-is, but remove trailing .exe if any
36457    new_path="${new_path/%.exe/}"
36458    # Do not save /bin paths to all_fixpath_prefixes!
36459  else
36460    # Not in mixed or Windows style, start by that.
36461    new_path=`cmd //c echo $new_path`
36462
36463  input_path="$new_path"
36464  # Check if we need to convert this using DOS-style short mode. If the path
36465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36466  # take no chances and rewrite it.
36467  # Note: m4 eats our [], so we need to use [ and ] instead.
36468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36469  if test "x$has_forbidden_chars" != x; then
36470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36472  fi
36473
36474    # Output is in $new_path
36475
36476  windows_path="$new_path"
36477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36478    unix_path=`$CYGPATH -u "$windows_path"`
36479    new_path="$unix_path"
36480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36482    new_path="$unix_path"
36483  fi
36484
36485    # remove trailing .exe if any
36486    new_path="${new_path/%.exe/}"
36487
36488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36490  fi
36491
36492    else
36493      # We're on a unix platform. Hooray! :)
36494      # First separate the path from the arguments. This will split at the first
36495      # space.
36496      complete="$GNM"
36497      path="${complete%% *}"
36498      tmp="$complete EOL"
36499      arguments="${tmp#* }"
36500
36501      # Cannot rely on the command "which" here since it doesn't always work.
36502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36503      if test -z "$is_absolute_path"; then
36504        # Path to executable is not absolute. Find it.
36505        IFS_save="$IFS"
36506        IFS=:
36507        for p in $PATH; do
36508          if test -f "$p/$path" && test -x "$p/$path"; then
36509            new_path="$p/$path"
36510            break
36511          fi
36512        done
36513        IFS="$IFS_save"
36514      else
36515        # This is an absolute path, we can use it without further modifications.
36516        new_path="$path"
36517      fi
36518
36519      if test "x$new_path" = x; then
36520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36521$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36522        has_space=`$ECHO "$complete" | $GREP " "`
36523        if test "x$has_space" != x; then
36524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36526        fi
36527        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36528      fi
36529    fi
36530
36531    # Now join together the path and the arguments once again
36532    if test "x$arguments" != xEOL; then
36533      new_complete="$new_path ${arguments% *}"
36534    else
36535      new_complete="$new_path"
36536    fi
36537
36538    if test "x$complete" != "x$new_complete"; then
36539      GNM="$new_complete"
36540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36541$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36542    fi
36543  fi
36544
36545  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36546    # FIXME: we should unify this with the solaris case above.
36547
36548
36549  # Publish this variable in the help.
36550
36551
36552  if test "x$STRIP" = x; then
36553    # The variable is not set by user, try to locate tool using the code snippet
36554    if test -n "$ac_tool_prefix"; then
36555  for ac_prog in strip
36556  do
36557    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36558set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36560$as_echo_n "checking for $ac_word... " >&6; }
36561if ${ac_cv_prog_STRIP+:} false; then :
36562  $as_echo_n "(cached) " >&6
36563else
36564  if test -n "$STRIP"; then
36565  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36566else
36567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36568for as_dir in $PATH
36569do
36570  IFS=$as_save_IFS
36571  test -z "$as_dir" && as_dir=.
36572    for ac_exec_ext in '' $ac_executable_extensions; do
36573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36574    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36576    break 2
36577  fi
36578done
36579  done
36580IFS=$as_save_IFS
36581
36582fi
36583fi
36584STRIP=$ac_cv_prog_STRIP
36585if test -n "$STRIP"; then
36586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36587$as_echo "$STRIP" >&6; }
36588else
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36590$as_echo "no" >&6; }
36591fi
36592
36593
36594    test -n "$STRIP" && break
36595  done
36596fi
36597if test -z "$STRIP"; then
36598  ac_ct_STRIP=$STRIP
36599  for ac_prog in strip
36600do
36601  # Extract the first word of "$ac_prog", so it can be a program name with args.
36602set dummy $ac_prog; ac_word=$2
36603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36604$as_echo_n "checking for $ac_word... " >&6; }
36605if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36606  $as_echo_n "(cached) " >&6
36607else
36608  if test -n "$ac_ct_STRIP"; then
36609  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36610else
36611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36612for as_dir in $PATH
36613do
36614  IFS=$as_save_IFS
36615  test -z "$as_dir" && as_dir=.
36616    for ac_exec_ext in '' $ac_executable_extensions; do
36617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36618    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36620    break 2
36621  fi
36622done
36623  done
36624IFS=$as_save_IFS
36625
36626fi
36627fi
36628ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36629if test -n "$ac_ct_STRIP"; then
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36631$as_echo "$ac_ct_STRIP" >&6; }
36632else
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634$as_echo "no" >&6; }
36635fi
36636
36637
36638  test -n "$ac_ct_STRIP" && break
36639done
36640
36641  if test "x$ac_ct_STRIP" = x; then
36642    STRIP=""
36643  else
36644    case $cross_compiling:$ac_tool_warned in
36645yes:)
36646{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36647$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36648ac_tool_warned=yes ;;
36649esac
36650    STRIP=$ac_ct_STRIP
36651  fi
36652fi
36653
36654  else
36655    # The variable is set, but is it from the command line or the environment?
36656
36657    # Try to remove the string !STRIP! from our list.
36658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36660      # If it failed, the variable was not from the command line. Ignore it,
36661      # but warn the user (except for BASH, which is always set by the calling BASH).
36662      if test "xSTRIP" != xBASH; then
36663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36664$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36665      fi
36666      # Try to locate tool using the code snippet
36667      if test -n "$ac_tool_prefix"; then
36668  for ac_prog in strip
36669  do
36670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36673$as_echo_n "checking for $ac_word... " >&6; }
36674if ${ac_cv_prog_STRIP+:} false; then :
36675  $as_echo_n "(cached) " >&6
36676else
36677  if test -n "$STRIP"; then
36678  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36679else
36680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36681for as_dir in $PATH
36682do
36683  IFS=$as_save_IFS
36684  test -z "$as_dir" && as_dir=.
36685    for ac_exec_ext in '' $ac_executable_extensions; do
36686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36687    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36689    break 2
36690  fi
36691done
36692  done
36693IFS=$as_save_IFS
36694
36695fi
36696fi
36697STRIP=$ac_cv_prog_STRIP
36698if test -n "$STRIP"; then
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36700$as_echo "$STRIP" >&6; }
36701else
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36703$as_echo "no" >&6; }
36704fi
36705
36706
36707    test -n "$STRIP" && break
36708  done
36709fi
36710if test -z "$STRIP"; then
36711  ac_ct_STRIP=$STRIP
36712  for ac_prog in strip
36713do
36714  # Extract the first word of "$ac_prog", so it can be a program name with args.
36715set dummy $ac_prog; ac_word=$2
36716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36717$as_echo_n "checking for $ac_word... " >&6; }
36718if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36719  $as_echo_n "(cached) " >&6
36720else
36721  if test -n "$ac_ct_STRIP"; then
36722  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36723else
36724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36725for as_dir in $PATH
36726do
36727  IFS=$as_save_IFS
36728  test -z "$as_dir" && as_dir=.
36729    for ac_exec_ext in '' $ac_executable_extensions; do
36730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36731    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36733    break 2
36734  fi
36735done
36736  done
36737IFS=$as_save_IFS
36738
36739fi
36740fi
36741ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36742if test -n "$ac_ct_STRIP"; then
36743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36744$as_echo "$ac_ct_STRIP" >&6; }
36745else
36746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36747$as_echo "no" >&6; }
36748fi
36749
36750
36751  test -n "$ac_ct_STRIP" && break
36752done
36753
36754  if test "x$ac_ct_STRIP" = x; then
36755    STRIP=""
36756  else
36757    case $cross_compiling:$ac_tool_warned in
36758yes:)
36759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36761ac_tool_warned=yes ;;
36762esac
36763    STRIP=$ac_ct_STRIP
36764  fi
36765fi
36766
36767    else
36768      # If it succeeded, then it was overridden by the user. We will use it
36769      # for the tool.
36770
36771      # First remove it from the list of overridden variables, so we can test
36772      # for unknown variables in the end.
36773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36774
36775      # Check if the provided tool contains a complete path.
36776      tool_specified="$STRIP"
36777      tool_basename="${tool_specified##*/}"
36778      if test "x$tool_basename" = "x$tool_specified"; then
36779        # A command without a complete path is provided, search $PATH.
36780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36781$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36782        # Extract the first word of "$tool_basename", so it can be a program name with args.
36783set dummy $tool_basename; ac_word=$2
36784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36785$as_echo_n "checking for $ac_word... " >&6; }
36786if ${ac_cv_path_STRIP+:} false; then :
36787  $as_echo_n "(cached) " >&6
36788else
36789  case $STRIP in
36790  [\\/]* | ?:[\\/]*)
36791  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36792  ;;
36793  *)
36794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36795for as_dir in $PATH
36796do
36797  IFS=$as_save_IFS
36798  test -z "$as_dir" && as_dir=.
36799    for ac_exec_ext in '' $ac_executable_extensions; do
36800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36801    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36803    break 2
36804  fi
36805done
36806  done
36807IFS=$as_save_IFS
36808
36809  ;;
36810esac
36811fi
36812STRIP=$ac_cv_path_STRIP
36813if test -n "$STRIP"; then
36814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36815$as_echo "$STRIP" >&6; }
36816else
36817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36818$as_echo "no" >&6; }
36819fi
36820
36821
36822        if test "x$STRIP" = x; then
36823          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36824        fi
36825      else
36826        # Otherwise we believe it is a complete path. Use it as it is.
36827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36828$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36829        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36830$as_echo_n "checking for STRIP... " >&6; }
36831        if test ! -x "$tool_specified"; then
36832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36833$as_echo "not found" >&6; }
36834          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36835        fi
36836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36837$as_echo "$tool_specified" >&6; }
36838      fi
36839    fi
36840  fi
36841
36842
36843
36844  # Only process if variable expands to non-empty
36845
36846  if test "x$STRIP" != x; then
36847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36848
36849  # First separate the path from the arguments. This will split at the first
36850  # space.
36851  complete="$STRIP"
36852  path="${complete%% *}"
36853  tmp="$complete EOL"
36854  arguments="${tmp#* }"
36855
36856  # Input might be given as Windows format, start by converting to
36857  # unix format.
36858  new_path=`$CYGPATH -u "$path"`
36859
36860  # Now try to locate executable using which
36861  new_path=`$WHICH "$new_path" 2> /dev/null`
36862  # bat and cmd files are not always considered executable in cygwin causing which
36863  # to not find them
36864  if test "x$new_path" = x \
36865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36867    new_path=`$CYGPATH -u "$path"`
36868  fi
36869  if test "x$new_path" = x; then
36870    # Oops. Which didn't find the executable.
36871    # The splitting of arguments from the executable at a space might have been incorrect,
36872    # since paths with space are more likely in Windows. Give it another try with the whole
36873    # argument.
36874    path="$complete"
36875    arguments="EOL"
36876    new_path=`$CYGPATH -u "$path"`
36877    new_path=`$WHICH "$new_path" 2> /dev/null`
36878    # bat and cmd files are not always considered executable in cygwin causing which
36879    # to not find them
36880    if test "x$new_path" = x \
36881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36883      new_path=`$CYGPATH -u "$path"`
36884    fi
36885    if test "x$new_path" = x; then
36886      # It's still not found. Now this is an unrecoverable error.
36887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36888$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36889      has_space=`$ECHO "$complete" | $GREP " "`
36890      if test "x$has_space" != x; then
36891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36893      fi
36894      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36895    fi
36896  fi
36897
36898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36901  # "foo.exe" is OK but "foo" is an error.
36902  #
36903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36904  # It is also a way to make sure we got the proper file name for the real test later on.
36905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36906  if test "x$test_shortpath" = x; then
36907    # Short path failed, file does not exist as specified.
36908    # Try adding .exe or .cmd
36909    if test -f "${new_path}.exe"; then
36910      input_to_shortpath="${new_path}.exe"
36911    elif test -f "${new_path}.cmd"; then
36912      input_to_shortpath="${new_path}.cmd"
36913    else
36914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36915$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36918      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36919    fi
36920  else
36921    input_to_shortpath="$new_path"
36922  fi
36923
36924  # Call helper function which possibly converts this using DOS-style short mode.
36925  # If so, the updated path is stored in $new_path.
36926  new_path="$input_to_shortpath"
36927
36928  input_path="$input_to_shortpath"
36929  # Check if we need to convert this using DOS-style short mode. If the path
36930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36931  # take no chances and rewrite it.
36932  # Note: m4 eats our [], so we need to use [ and ] instead.
36933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36934  if test "x$has_forbidden_chars" != x; then
36935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36939      # Going to short mode and back again did indeed matter. Since short mode is
36940      # case insensitive, let's make it lowercase to improve readability.
36941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36942      # Now convert it back to Unix-style (cygpath)
36943      input_path=`$CYGPATH -u "$shortmode_path"`
36944      new_path="$input_path"
36945    fi
36946  fi
36947
36948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36949  if test "x$test_cygdrive_prefix" = x; then
36950    # As a simple fix, exclude /usr/bin since it's not a real path.
36951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36953      # a path prefixed by /cygdrive for fixpath to work.
36954      new_path="$CYGWIN_ROOT_PATH$input_path"
36955    fi
36956  fi
36957
36958  # remove trailing .exe if any
36959  new_path="${new_path/%.exe/}"
36960
36961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36962
36963  # First separate the path from the arguments. This will split at the first
36964  # space.
36965  complete="$STRIP"
36966  path="${complete%% *}"
36967  tmp="$complete EOL"
36968  arguments="${tmp#* }"
36969
36970  # Input might be given as Windows format, start by converting to
36971  # unix format.
36972  new_path="$path"
36973
36974  windows_path="$new_path"
36975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36976    unix_path=`$CYGPATH -u "$windows_path"`
36977    new_path="$unix_path"
36978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36980    new_path="$unix_path"
36981  fi
36982
36983
36984  # Now try to locate executable using which
36985  new_path=`$WHICH "$new_path" 2> /dev/null`
36986
36987  if test "x$new_path" = x; then
36988    # Oops. Which didn't find the executable.
36989    # The splitting of arguments from the executable at a space might have been incorrect,
36990    # since paths with space are more likely in Windows. Give it another try with the whole
36991    # argument.
36992    path="$complete"
36993    arguments="EOL"
36994    new_path="$path"
36995
36996  windows_path="$new_path"
36997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36998    unix_path=`$CYGPATH -u "$windows_path"`
36999    new_path="$unix_path"
37000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37002    new_path="$unix_path"
37003  fi
37004
37005
37006    new_path=`$WHICH "$new_path" 2> /dev/null`
37007    # bat and cmd files are not always considered executable in MSYS causing which
37008    # to not find them
37009    if test "x$new_path" = x \
37010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37012      new_path="$path"
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023    fi
37024
37025    if test "x$new_path" = x; then
37026      # It's still not found. Now this is an unrecoverable error.
37027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37028$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37029      has_space=`$ECHO "$complete" | $GREP " "`
37030      if test "x$has_space" != x; then
37031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37033      fi
37034      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37035    fi
37036  fi
37037
37038  # Now new_path has a complete unix path to the binary
37039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37040    # Keep paths in /bin as-is, but remove trailing .exe if any
37041    new_path="${new_path/%.exe/}"
37042    # Do not save /bin paths to all_fixpath_prefixes!
37043  else
37044    # Not in mixed or Windows style, start by that.
37045    new_path=`cmd //c echo $new_path`
37046
37047  input_path="$new_path"
37048  # Check if we need to convert this using DOS-style short mode. If the path
37049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37050  # take no chances and rewrite it.
37051  # Note: m4 eats our [], so we need to use [ and ] instead.
37052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37053  if test "x$has_forbidden_chars" != x; then
37054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37056  fi
37057
37058    # Output is in $new_path
37059
37060  windows_path="$new_path"
37061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37062    unix_path=`$CYGPATH -u "$windows_path"`
37063    new_path="$unix_path"
37064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37066    new_path="$unix_path"
37067  fi
37068
37069    # remove trailing .exe if any
37070    new_path="${new_path/%.exe/}"
37071
37072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37074  fi
37075
37076    else
37077      # We're on a unix platform. Hooray! :)
37078      # First separate the path from the arguments. This will split at the first
37079      # space.
37080      complete="$STRIP"
37081      path="${complete%% *}"
37082      tmp="$complete EOL"
37083      arguments="${tmp#* }"
37084
37085      # Cannot rely on the command "which" here since it doesn't always work.
37086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37087      if test -z "$is_absolute_path"; then
37088        # Path to executable is not absolute. Find it.
37089        IFS_save="$IFS"
37090        IFS=:
37091        for p in $PATH; do
37092          if test -f "$p/$path" && test -x "$p/$path"; then
37093            new_path="$p/$path"
37094            break
37095          fi
37096        done
37097        IFS="$IFS_save"
37098      else
37099        # This is an absolute path, we can use it without further modifications.
37100        new_path="$path"
37101      fi
37102
37103      if test "x$new_path" = x; then
37104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37105$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37106        has_space=`$ECHO "$complete" | $GREP " "`
37107        if test "x$has_space" != x; then
37108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37110        fi
37111        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37112      fi
37113    fi
37114
37115    # Now join together the path and the arguments once again
37116    if test "x$arguments" != xEOL; then
37117      new_complete="$new_path ${arguments% *}"
37118    else
37119      new_complete="$new_path"
37120    fi
37121
37122    if test "x$complete" != "x$new_complete"; then
37123      STRIP="$new_complete"
37124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37125$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37126    fi
37127  fi
37128
37129
37130
37131  # Publish this variable in the help.
37132
37133
37134  if test "x$NM" = x; then
37135    # The variable is not set by user, try to locate tool using the code snippet
37136    if test -n "$ac_tool_prefix"; then
37137  for ac_prog in nm
37138  do
37139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37142$as_echo_n "checking for $ac_word... " >&6; }
37143if ${ac_cv_prog_NM+:} false; then :
37144  $as_echo_n "(cached) " >&6
37145else
37146  if test -n "$NM"; then
37147  ac_cv_prog_NM="$NM" # Let the user override the test.
37148else
37149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37150for as_dir in $PATH
37151do
37152  IFS=$as_save_IFS
37153  test -z "$as_dir" && as_dir=.
37154    for ac_exec_ext in '' $ac_executable_extensions; do
37155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37156    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37158    break 2
37159  fi
37160done
37161  done
37162IFS=$as_save_IFS
37163
37164fi
37165fi
37166NM=$ac_cv_prog_NM
37167if test -n "$NM"; then
37168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37169$as_echo "$NM" >&6; }
37170else
37171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37172$as_echo "no" >&6; }
37173fi
37174
37175
37176    test -n "$NM" && break
37177  done
37178fi
37179if test -z "$NM"; then
37180  ac_ct_NM=$NM
37181  for ac_prog in nm
37182do
37183  # Extract the first word of "$ac_prog", so it can be a program name with args.
37184set dummy $ac_prog; ac_word=$2
37185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37186$as_echo_n "checking for $ac_word... " >&6; }
37187if ${ac_cv_prog_ac_ct_NM+:} false; then :
37188  $as_echo_n "(cached) " >&6
37189else
37190  if test -n "$ac_ct_NM"; then
37191  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37192else
37193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37194for as_dir in $PATH
37195do
37196  IFS=$as_save_IFS
37197  test -z "$as_dir" && as_dir=.
37198    for ac_exec_ext in '' $ac_executable_extensions; do
37199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37200    ac_cv_prog_ac_ct_NM="$ac_prog"
37201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37202    break 2
37203  fi
37204done
37205  done
37206IFS=$as_save_IFS
37207
37208fi
37209fi
37210ac_ct_NM=$ac_cv_prog_ac_ct_NM
37211if test -n "$ac_ct_NM"; then
37212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37213$as_echo "$ac_ct_NM" >&6; }
37214else
37215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37216$as_echo "no" >&6; }
37217fi
37218
37219
37220  test -n "$ac_ct_NM" && break
37221done
37222
37223  if test "x$ac_ct_NM" = x; then
37224    NM=""
37225  else
37226    case $cross_compiling:$ac_tool_warned in
37227yes:)
37228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37230ac_tool_warned=yes ;;
37231esac
37232    NM=$ac_ct_NM
37233  fi
37234fi
37235
37236  else
37237    # The variable is set, but is it from the command line or the environment?
37238
37239    # Try to remove the string !NM! from our list.
37240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37242      # If it failed, the variable was not from the command line. Ignore it,
37243      # but warn the user (except for BASH, which is always set by the calling BASH).
37244      if test "xNM" != xBASH; then
37245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37246$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37247      fi
37248      # Try to locate tool using the code snippet
37249      if test -n "$ac_tool_prefix"; then
37250  for ac_prog in nm
37251  do
37252    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37253set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37255$as_echo_n "checking for $ac_word... " >&6; }
37256if ${ac_cv_prog_NM+:} false; then :
37257  $as_echo_n "(cached) " >&6
37258else
37259  if test -n "$NM"; then
37260  ac_cv_prog_NM="$NM" # Let the user override the test.
37261else
37262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37263for as_dir in $PATH
37264do
37265  IFS=$as_save_IFS
37266  test -z "$as_dir" && as_dir=.
37267    for ac_exec_ext in '' $ac_executable_extensions; do
37268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37269    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37271    break 2
37272  fi
37273done
37274  done
37275IFS=$as_save_IFS
37276
37277fi
37278fi
37279NM=$ac_cv_prog_NM
37280if test -n "$NM"; then
37281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37282$as_echo "$NM" >&6; }
37283else
37284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37285$as_echo "no" >&6; }
37286fi
37287
37288
37289    test -n "$NM" && break
37290  done
37291fi
37292if test -z "$NM"; then
37293  ac_ct_NM=$NM
37294  for ac_prog in nm
37295do
37296  # Extract the first word of "$ac_prog", so it can be a program name with args.
37297set dummy $ac_prog; ac_word=$2
37298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37299$as_echo_n "checking for $ac_word... " >&6; }
37300if ${ac_cv_prog_ac_ct_NM+:} false; then :
37301  $as_echo_n "(cached) " >&6
37302else
37303  if test -n "$ac_ct_NM"; then
37304  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37305else
37306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37307for as_dir in $PATH
37308do
37309  IFS=$as_save_IFS
37310  test -z "$as_dir" && as_dir=.
37311    for ac_exec_ext in '' $ac_executable_extensions; do
37312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37313    ac_cv_prog_ac_ct_NM="$ac_prog"
37314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37315    break 2
37316  fi
37317done
37318  done
37319IFS=$as_save_IFS
37320
37321fi
37322fi
37323ac_ct_NM=$ac_cv_prog_ac_ct_NM
37324if test -n "$ac_ct_NM"; then
37325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37326$as_echo "$ac_ct_NM" >&6; }
37327else
37328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37329$as_echo "no" >&6; }
37330fi
37331
37332
37333  test -n "$ac_ct_NM" && break
37334done
37335
37336  if test "x$ac_ct_NM" = x; then
37337    NM=""
37338  else
37339    case $cross_compiling:$ac_tool_warned in
37340yes:)
37341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37343ac_tool_warned=yes ;;
37344esac
37345    NM=$ac_ct_NM
37346  fi
37347fi
37348
37349    else
37350      # If it succeeded, then it was overridden by the user. We will use it
37351      # for the tool.
37352
37353      # First remove it from the list of overridden variables, so we can test
37354      # for unknown variables in the end.
37355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37356
37357      # Check if the provided tool contains a complete path.
37358      tool_specified="$NM"
37359      tool_basename="${tool_specified##*/}"
37360      if test "x$tool_basename" = "x$tool_specified"; then
37361        # A command without a complete path is provided, search $PATH.
37362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37363$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37364        # Extract the first word of "$tool_basename", so it can be a program name with args.
37365set dummy $tool_basename; ac_word=$2
37366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37367$as_echo_n "checking for $ac_word... " >&6; }
37368if ${ac_cv_path_NM+:} false; then :
37369  $as_echo_n "(cached) " >&6
37370else
37371  case $NM in
37372  [\\/]* | ?:[\\/]*)
37373  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37374  ;;
37375  *)
37376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37377for as_dir in $PATH
37378do
37379  IFS=$as_save_IFS
37380  test -z "$as_dir" && as_dir=.
37381    for ac_exec_ext in '' $ac_executable_extensions; do
37382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37383    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37385    break 2
37386  fi
37387done
37388  done
37389IFS=$as_save_IFS
37390
37391  ;;
37392esac
37393fi
37394NM=$ac_cv_path_NM
37395if test -n "$NM"; then
37396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37397$as_echo "$NM" >&6; }
37398else
37399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37400$as_echo "no" >&6; }
37401fi
37402
37403
37404        if test "x$NM" = x; then
37405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37406        fi
37407      else
37408        # Otherwise we believe it is a complete path. Use it as it is.
37409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37410$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37412$as_echo_n "checking for NM... " >&6; }
37413        if test ! -x "$tool_specified"; then
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37415$as_echo "not found" >&6; }
37416          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37417        fi
37418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37419$as_echo "$tool_specified" >&6; }
37420      fi
37421    fi
37422  fi
37423
37424
37425
37426  # Only process if variable expands to non-empty
37427
37428  if test "x$NM" != x; then
37429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37430
37431  # First separate the path from the arguments. This will split at the first
37432  # space.
37433  complete="$NM"
37434  path="${complete%% *}"
37435  tmp="$complete EOL"
37436  arguments="${tmp#* }"
37437
37438  # Input might be given as Windows format, start by converting to
37439  # unix format.
37440  new_path=`$CYGPATH -u "$path"`
37441
37442  # Now try to locate executable using which
37443  new_path=`$WHICH "$new_path" 2> /dev/null`
37444  # bat and cmd files are not always considered executable in cygwin causing which
37445  # to not find them
37446  if test "x$new_path" = x \
37447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37449    new_path=`$CYGPATH -u "$path"`
37450  fi
37451  if test "x$new_path" = x; then
37452    # Oops. Which didn't find the executable.
37453    # The splitting of arguments from the executable at a space might have been incorrect,
37454    # since paths with space are more likely in Windows. Give it another try with the whole
37455    # argument.
37456    path="$complete"
37457    arguments="EOL"
37458    new_path=`$CYGPATH -u "$path"`
37459    new_path=`$WHICH "$new_path" 2> /dev/null`
37460    # bat and cmd files are not always considered executable in cygwin causing which
37461    # to not find them
37462    if test "x$new_path" = x \
37463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37465      new_path=`$CYGPATH -u "$path"`
37466    fi
37467    if test "x$new_path" = x; then
37468      # It's still not found. Now this is an unrecoverable error.
37469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37470$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37471      has_space=`$ECHO "$complete" | $GREP " "`
37472      if test "x$has_space" != x; then
37473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37475      fi
37476      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37477    fi
37478  fi
37479
37480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37483  # "foo.exe" is OK but "foo" is an error.
37484  #
37485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37486  # It is also a way to make sure we got the proper file name for the real test later on.
37487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37488  if test "x$test_shortpath" = x; then
37489    # Short path failed, file does not exist as specified.
37490    # Try adding .exe or .cmd
37491    if test -f "${new_path}.exe"; then
37492      input_to_shortpath="${new_path}.exe"
37493    elif test -f "${new_path}.cmd"; then
37494      input_to_shortpath="${new_path}.cmd"
37495    else
37496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37497$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37500      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37501    fi
37502  else
37503    input_to_shortpath="$new_path"
37504  fi
37505
37506  # Call helper function which possibly converts this using DOS-style short mode.
37507  # If so, the updated path is stored in $new_path.
37508  new_path="$input_to_shortpath"
37509
37510  input_path="$input_to_shortpath"
37511  # Check if we need to convert this using DOS-style short mode. If the path
37512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37513  # take no chances and rewrite it.
37514  # Note: m4 eats our [], so we need to use [ and ] instead.
37515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37516  if test "x$has_forbidden_chars" != x; then
37517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37521      # Going to short mode and back again did indeed matter. Since short mode is
37522      # case insensitive, let's make it lowercase to improve readability.
37523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37524      # Now convert it back to Unix-style (cygpath)
37525      input_path=`$CYGPATH -u "$shortmode_path"`
37526      new_path="$input_path"
37527    fi
37528  fi
37529
37530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37531  if test "x$test_cygdrive_prefix" = x; then
37532    # As a simple fix, exclude /usr/bin since it's not a real path.
37533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37535      # a path prefixed by /cygdrive for fixpath to work.
37536      new_path="$CYGWIN_ROOT_PATH$input_path"
37537    fi
37538  fi
37539
37540  # remove trailing .exe if any
37541  new_path="${new_path/%.exe/}"
37542
37543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37544
37545  # First separate the path from the arguments. This will split at the first
37546  # space.
37547  complete="$NM"
37548  path="${complete%% *}"
37549  tmp="$complete EOL"
37550  arguments="${tmp#* }"
37551
37552  # Input might be given as Windows format, start by converting to
37553  # unix format.
37554  new_path="$path"
37555
37556  windows_path="$new_path"
37557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37558    unix_path=`$CYGPATH -u "$windows_path"`
37559    new_path="$unix_path"
37560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37562    new_path="$unix_path"
37563  fi
37564
37565
37566  # Now try to locate executable using which
37567  new_path=`$WHICH "$new_path" 2> /dev/null`
37568
37569  if test "x$new_path" = x; then
37570    # Oops. Which didn't find the executable.
37571    # The splitting of arguments from the executable at a space might have been incorrect,
37572    # since paths with space are more likely in Windows. Give it another try with the whole
37573    # argument.
37574    path="$complete"
37575    arguments="EOL"
37576    new_path="$path"
37577
37578  windows_path="$new_path"
37579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37580    unix_path=`$CYGPATH -u "$windows_path"`
37581    new_path="$unix_path"
37582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37584    new_path="$unix_path"
37585  fi
37586
37587
37588    new_path=`$WHICH "$new_path" 2> /dev/null`
37589    # bat and cmd files are not always considered executable in MSYS causing which
37590    # to not find them
37591    if test "x$new_path" = x \
37592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37594      new_path="$path"
37595
37596  windows_path="$new_path"
37597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37598    unix_path=`$CYGPATH -u "$windows_path"`
37599    new_path="$unix_path"
37600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37602    new_path="$unix_path"
37603  fi
37604
37605    fi
37606
37607    if test "x$new_path" = x; then
37608      # It's still not found. Now this is an unrecoverable error.
37609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37611      has_space=`$ECHO "$complete" | $GREP " "`
37612      if test "x$has_space" != x; then
37613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37615      fi
37616      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37617    fi
37618  fi
37619
37620  # Now new_path has a complete unix path to the binary
37621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37622    # Keep paths in /bin as-is, but remove trailing .exe if any
37623    new_path="${new_path/%.exe/}"
37624    # Do not save /bin paths to all_fixpath_prefixes!
37625  else
37626    # Not in mixed or Windows style, start by that.
37627    new_path=`cmd //c echo $new_path`
37628
37629  input_path="$new_path"
37630  # Check if we need to convert this using DOS-style short mode. If the path
37631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37632  # take no chances and rewrite it.
37633  # Note: m4 eats our [], so we need to use [ and ] instead.
37634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37635  if test "x$has_forbidden_chars" != x; then
37636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37638  fi
37639
37640    # Output is in $new_path
37641
37642  windows_path="$new_path"
37643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37644    unix_path=`$CYGPATH -u "$windows_path"`
37645    new_path="$unix_path"
37646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37648    new_path="$unix_path"
37649  fi
37650
37651    # remove trailing .exe if any
37652    new_path="${new_path/%.exe/}"
37653
37654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37656  fi
37657
37658    else
37659      # We're on a unix platform. Hooray! :)
37660      # First separate the path from the arguments. This will split at the first
37661      # space.
37662      complete="$NM"
37663      path="${complete%% *}"
37664      tmp="$complete EOL"
37665      arguments="${tmp#* }"
37666
37667      # Cannot rely on the command "which" here since it doesn't always work.
37668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37669      if test -z "$is_absolute_path"; then
37670        # Path to executable is not absolute. Find it.
37671        IFS_save="$IFS"
37672        IFS=:
37673        for p in $PATH; do
37674          if test -f "$p/$path" && test -x "$p/$path"; then
37675            new_path="$p/$path"
37676            break
37677          fi
37678        done
37679        IFS="$IFS_save"
37680      else
37681        # This is an absolute path, we can use it without further modifications.
37682        new_path="$path"
37683      fi
37684
37685      if test "x$new_path" = x; then
37686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37687$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37688        has_space=`$ECHO "$complete" | $GREP " "`
37689        if test "x$has_space" != x; then
37690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37692        fi
37693        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37694      fi
37695    fi
37696
37697    # Now join together the path and the arguments once again
37698    if test "x$arguments" != xEOL; then
37699      new_complete="$new_path ${arguments% *}"
37700    else
37701      new_complete="$new_path"
37702    fi
37703
37704    if test "x$complete" != "x$new_complete"; then
37705      NM="$new_complete"
37706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37707$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37708    fi
37709  fi
37710
37711    GNM="$NM"
37712
37713  fi
37714
37715  # objcopy is used for moving debug symbols to separate files when
37716  # full debug symbols are enabled.
37717  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37718
37719
37720  # Publish this variable in the help.
37721
37722
37723  if test "x$OBJCOPY" = x; then
37724    # The variable is not set by user, try to locate tool using the code snippet
37725    if test -n "$ac_tool_prefix"; then
37726  for ac_prog in gobjcopy objcopy
37727  do
37728    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37731$as_echo_n "checking for $ac_word... " >&6; }
37732if ${ac_cv_prog_OBJCOPY+:} false; then :
37733  $as_echo_n "(cached) " >&6
37734else
37735  if test -n "$OBJCOPY"; then
37736  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37737else
37738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37739for as_dir in $PATH
37740do
37741  IFS=$as_save_IFS
37742  test -z "$as_dir" && as_dir=.
37743    for ac_exec_ext in '' $ac_executable_extensions; do
37744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37745    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37747    break 2
37748  fi
37749done
37750  done
37751IFS=$as_save_IFS
37752
37753fi
37754fi
37755OBJCOPY=$ac_cv_prog_OBJCOPY
37756if test -n "$OBJCOPY"; then
37757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37758$as_echo "$OBJCOPY" >&6; }
37759else
37760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37761$as_echo "no" >&6; }
37762fi
37763
37764
37765    test -n "$OBJCOPY" && break
37766  done
37767fi
37768if test -z "$OBJCOPY"; then
37769  ac_ct_OBJCOPY=$OBJCOPY
37770  for ac_prog in gobjcopy objcopy
37771do
37772  # Extract the first word of "$ac_prog", so it can be a program name with args.
37773set dummy $ac_prog; ac_word=$2
37774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37775$as_echo_n "checking for $ac_word... " >&6; }
37776if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37777  $as_echo_n "(cached) " >&6
37778else
37779  if test -n "$ac_ct_OBJCOPY"; then
37780  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37781else
37782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37783for as_dir in $PATH
37784do
37785  IFS=$as_save_IFS
37786  test -z "$as_dir" && as_dir=.
37787    for ac_exec_ext in '' $ac_executable_extensions; do
37788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37789    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37791    break 2
37792  fi
37793done
37794  done
37795IFS=$as_save_IFS
37796
37797fi
37798fi
37799ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37800if test -n "$ac_ct_OBJCOPY"; then
37801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37802$as_echo "$ac_ct_OBJCOPY" >&6; }
37803else
37804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37805$as_echo "no" >&6; }
37806fi
37807
37808
37809  test -n "$ac_ct_OBJCOPY" && break
37810done
37811
37812  if test "x$ac_ct_OBJCOPY" = x; then
37813    OBJCOPY=""
37814  else
37815    case $cross_compiling:$ac_tool_warned in
37816yes:)
37817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37819ac_tool_warned=yes ;;
37820esac
37821    OBJCOPY=$ac_ct_OBJCOPY
37822  fi
37823fi
37824
37825  else
37826    # The variable is set, but is it from the command line or the environment?
37827
37828    # Try to remove the string !OBJCOPY! from our list.
37829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37831      # If it failed, the variable was not from the command line. Ignore it,
37832      # but warn the user (except for BASH, which is always set by the calling BASH).
37833      if test "xOBJCOPY" != xBASH; then
37834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37835$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37836      fi
37837      # Try to locate tool using the code snippet
37838      if test -n "$ac_tool_prefix"; then
37839  for ac_prog in gobjcopy objcopy
37840  do
37841    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37842set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37844$as_echo_n "checking for $ac_word... " >&6; }
37845if ${ac_cv_prog_OBJCOPY+:} false; then :
37846  $as_echo_n "(cached) " >&6
37847else
37848  if test -n "$OBJCOPY"; then
37849  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37850else
37851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37852for as_dir in $PATH
37853do
37854  IFS=$as_save_IFS
37855  test -z "$as_dir" && as_dir=.
37856    for ac_exec_ext in '' $ac_executable_extensions; do
37857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37858    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37860    break 2
37861  fi
37862done
37863  done
37864IFS=$as_save_IFS
37865
37866fi
37867fi
37868OBJCOPY=$ac_cv_prog_OBJCOPY
37869if test -n "$OBJCOPY"; then
37870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37871$as_echo "$OBJCOPY" >&6; }
37872else
37873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37874$as_echo "no" >&6; }
37875fi
37876
37877
37878    test -n "$OBJCOPY" && break
37879  done
37880fi
37881if test -z "$OBJCOPY"; then
37882  ac_ct_OBJCOPY=$OBJCOPY
37883  for ac_prog in gobjcopy objcopy
37884do
37885  # Extract the first word of "$ac_prog", so it can be a program name with args.
37886set dummy $ac_prog; ac_word=$2
37887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37888$as_echo_n "checking for $ac_word... " >&6; }
37889if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37890  $as_echo_n "(cached) " >&6
37891else
37892  if test -n "$ac_ct_OBJCOPY"; then
37893  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37894else
37895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37896for as_dir in $PATH
37897do
37898  IFS=$as_save_IFS
37899  test -z "$as_dir" && as_dir=.
37900    for ac_exec_ext in '' $ac_executable_extensions; do
37901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37902    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37904    break 2
37905  fi
37906done
37907  done
37908IFS=$as_save_IFS
37909
37910fi
37911fi
37912ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37913if test -n "$ac_ct_OBJCOPY"; then
37914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37915$as_echo "$ac_ct_OBJCOPY" >&6; }
37916else
37917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37918$as_echo "no" >&6; }
37919fi
37920
37921
37922  test -n "$ac_ct_OBJCOPY" && break
37923done
37924
37925  if test "x$ac_ct_OBJCOPY" = x; then
37926    OBJCOPY=""
37927  else
37928    case $cross_compiling:$ac_tool_warned in
37929yes:)
37930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37932ac_tool_warned=yes ;;
37933esac
37934    OBJCOPY=$ac_ct_OBJCOPY
37935  fi
37936fi
37937
37938    else
37939      # If it succeeded, then it was overridden by the user. We will use it
37940      # for the tool.
37941
37942      # First remove it from the list of overridden variables, so we can test
37943      # for unknown variables in the end.
37944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37945
37946      # Check if the provided tool contains a complete path.
37947      tool_specified="$OBJCOPY"
37948      tool_basename="${tool_specified##*/}"
37949      if test "x$tool_basename" = "x$tool_specified"; then
37950        # A command without a complete path is provided, search $PATH.
37951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37952$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37953        # Extract the first word of "$tool_basename", so it can be a program name with args.
37954set dummy $tool_basename; ac_word=$2
37955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37956$as_echo_n "checking for $ac_word... " >&6; }
37957if ${ac_cv_path_OBJCOPY+:} false; then :
37958  $as_echo_n "(cached) " >&6
37959else
37960  case $OBJCOPY in
37961  [\\/]* | ?:[\\/]*)
37962  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37963  ;;
37964  *)
37965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37966for as_dir in $PATH
37967do
37968  IFS=$as_save_IFS
37969  test -z "$as_dir" && as_dir=.
37970    for ac_exec_ext in '' $ac_executable_extensions; do
37971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37972    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37974    break 2
37975  fi
37976done
37977  done
37978IFS=$as_save_IFS
37979
37980  ;;
37981esac
37982fi
37983OBJCOPY=$ac_cv_path_OBJCOPY
37984if test -n "$OBJCOPY"; then
37985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37986$as_echo "$OBJCOPY" >&6; }
37987else
37988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37989$as_echo "no" >&6; }
37990fi
37991
37992
37993        if test "x$OBJCOPY" = x; then
37994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37995        fi
37996      else
37997        # Otherwise we believe it is a complete path. Use it as it is.
37998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37999$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38001$as_echo_n "checking for OBJCOPY... " >&6; }
38002        if test ! -x "$tool_specified"; then
38003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38004$as_echo "not found" >&6; }
38005          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38006        fi
38007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38008$as_echo "$tool_specified" >&6; }
38009      fi
38010    fi
38011  fi
38012
38013
38014    # Only call fixup if objcopy was found.
38015    if test -n "$OBJCOPY"; then
38016
38017  # Only process if variable expands to non-empty
38018
38019  if test "x$OBJCOPY" != x; then
38020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38021
38022  # First separate the path from the arguments. This will split at the first
38023  # space.
38024  complete="$OBJCOPY"
38025  path="${complete%% *}"
38026  tmp="$complete EOL"
38027  arguments="${tmp#* }"
38028
38029  # Input might be given as Windows format, start by converting to
38030  # unix format.
38031  new_path=`$CYGPATH -u "$path"`
38032
38033  # Now try to locate executable using which
38034  new_path=`$WHICH "$new_path" 2> /dev/null`
38035  # bat and cmd files are not always considered executable in cygwin causing which
38036  # to not find them
38037  if test "x$new_path" = x \
38038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38040    new_path=`$CYGPATH -u "$path"`
38041  fi
38042  if test "x$new_path" = x; then
38043    # Oops. Which didn't find the executable.
38044    # The splitting of arguments from the executable at a space might have been incorrect,
38045    # since paths with space are more likely in Windows. Give it another try with the whole
38046    # argument.
38047    path="$complete"
38048    arguments="EOL"
38049    new_path=`$CYGPATH -u "$path"`
38050    new_path=`$WHICH "$new_path" 2> /dev/null`
38051    # bat and cmd files are not always considered executable in cygwin causing which
38052    # to not find them
38053    if test "x$new_path" = x \
38054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38056      new_path=`$CYGPATH -u "$path"`
38057    fi
38058    if test "x$new_path" = x; then
38059      # It's still not found. Now this is an unrecoverable error.
38060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38061$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38062      has_space=`$ECHO "$complete" | $GREP " "`
38063      if test "x$has_space" != x; then
38064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38066      fi
38067      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38068    fi
38069  fi
38070
38071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38074  # "foo.exe" is OK but "foo" is an error.
38075  #
38076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38077  # It is also a way to make sure we got the proper file name for the real test later on.
38078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38079  if test "x$test_shortpath" = x; then
38080    # Short path failed, file does not exist as specified.
38081    # Try adding .exe or .cmd
38082    if test -f "${new_path}.exe"; then
38083      input_to_shortpath="${new_path}.exe"
38084    elif test -f "${new_path}.cmd"; then
38085      input_to_shortpath="${new_path}.cmd"
38086    else
38087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38088$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38091      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38092    fi
38093  else
38094    input_to_shortpath="$new_path"
38095  fi
38096
38097  # Call helper function which possibly converts this using DOS-style short mode.
38098  # If so, the updated path is stored in $new_path.
38099  new_path="$input_to_shortpath"
38100
38101  input_path="$input_to_shortpath"
38102  # Check if we need to convert this using DOS-style short mode. If the path
38103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38104  # take no chances and rewrite it.
38105  # Note: m4 eats our [], so we need to use [ and ] instead.
38106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38107  if test "x$has_forbidden_chars" != x; then
38108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38112      # Going to short mode and back again did indeed matter. Since short mode is
38113      # case insensitive, let's make it lowercase to improve readability.
38114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38115      # Now convert it back to Unix-style (cygpath)
38116      input_path=`$CYGPATH -u "$shortmode_path"`
38117      new_path="$input_path"
38118    fi
38119  fi
38120
38121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38122  if test "x$test_cygdrive_prefix" = x; then
38123    # As a simple fix, exclude /usr/bin since it's not a real path.
38124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38126      # a path prefixed by /cygdrive for fixpath to work.
38127      new_path="$CYGWIN_ROOT_PATH$input_path"
38128    fi
38129  fi
38130
38131  # remove trailing .exe if any
38132  new_path="${new_path/%.exe/}"
38133
38134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38135
38136  # First separate the path from the arguments. This will split at the first
38137  # space.
38138  complete="$OBJCOPY"
38139  path="${complete%% *}"
38140  tmp="$complete EOL"
38141  arguments="${tmp#* }"
38142
38143  # Input might be given as Windows format, start by converting to
38144  # unix format.
38145  new_path="$path"
38146
38147  windows_path="$new_path"
38148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38149    unix_path=`$CYGPATH -u "$windows_path"`
38150    new_path="$unix_path"
38151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38153    new_path="$unix_path"
38154  fi
38155
38156
38157  # Now try to locate executable using which
38158  new_path=`$WHICH "$new_path" 2> /dev/null`
38159
38160  if test "x$new_path" = x; then
38161    # Oops. Which didn't find the executable.
38162    # The splitting of arguments from the executable at a space might have been incorrect,
38163    # since paths with space are more likely in Windows. Give it another try with the whole
38164    # argument.
38165    path="$complete"
38166    arguments="EOL"
38167    new_path="$path"
38168
38169  windows_path="$new_path"
38170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38171    unix_path=`$CYGPATH -u "$windows_path"`
38172    new_path="$unix_path"
38173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38175    new_path="$unix_path"
38176  fi
38177
38178
38179    new_path=`$WHICH "$new_path" 2> /dev/null`
38180    # bat and cmd files are not always considered executable in MSYS causing which
38181    # to not find them
38182    if test "x$new_path" = x \
38183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38185      new_path="$path"
38186
38187  windows_path="$new_path"
38188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38189    unix_path=`$CYGPATH -u "$windows_path"`
38190    new_path="$unix_path"
38191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38193    new_path="$unix_path"
38194  fi
38195
38196    fi
38197
38198    if test "x$new_path" = x; then
38199      # It's still not found. Now this is an unrecoverable error.
38200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38201$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38202      has_space=`$ECHO "$complete" | $GREP " "`
38203      if test "x$has_space" != x; then
38204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38206      fi
38207      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38208    fi
38209  fi
38210
38211  # Now new_path has a complete unix path to the binary
38212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38213    # Keep paths in /bin as-is, but remove trailing .exe if any
38214    new_path="${new_path/%.exe/}"
38215    # Do not save /bin paths to all_fixpath_prefixes!
38216  else
38217    # Not in mixed or Windows style, start by that.
38218    new_path=`cmd //c echo $new_path`
38219
38220  input_path="$new_path"
38221  # Check if we need to convert this using DOS-style short mode. If the path
38222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38223  # take no chances and rewrite it.
38224  # Note: m4 eats our [], so we need to use [ and ] instead.
38225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38226  if test "x$has_forbidden_chars" != x; then
38227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38229  fi
38230
38231    # Output is in $new_path
38232
38233  windows_path="$new_path"
38234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38235    unix_path=`$CYGPATH -u "$windows_path"`
38236    new_path="$unix_path"
38237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38239    new_path="$unix_path"
38240  fi
38241
38242    # remove trailing .exe if any
38243    new_path="${new_path/%.exe/}"
38244
38245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38247  fi
38248
38249    else
38250      # We're on a unix platform. Hooray! :)
38251      # First separate the path from the arguments. This will split at the first
38252      # space.
38253      complete="$OBJCOPY"
38254      path="${complete%% *}"
38255      tmp="$complete EOL"
38256      arguments="${tmp#* }"
38257
38258      # Cannot rely on the command "which" here since it doesn't always work.
38259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38260      if test -z "$is_absolute_path"; then
38261        # Path to executable is not absolute. Find it.
38262        IFS_save="$IFS"
38263        IFS=:
38264        for p in $PATH; do
38265          if test -f "$p/$path" && test -x "$p/$path"; then
38266            new_path="$p/$path"
38267            break
38268          fi
38269        done
38270        IFS="$IFS_save"
38271      else
38272        # This is an absolute path, we can use it without further modifications.
38273        new_path="$path"
38274      fi
38275
38276      if test "x$new_path" = x; then
38277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38278$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38279        has_space=`$ECHO "$complete" | $GREP " "`
38280        if test "x$has_space" != x; then
38281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38283        fi
38284        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38285      fi
38286    fi
38287
38288    # Now join together the path and the arguments once again
38289    if test "x$arguments" != xEOL; then
38290      new_complete="$new_path ${arguments% *}"
38291    else
38292      new_complete="$new_path"
38293    fi
38294
38295    if test "x$complete" != "x$new_complete"; then
38296      OBJCOPY="$new_complete"
38297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38298$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38299    fi
38300  fi
38301
38302    fi
38303  fi
38304
38305
38306
38307  # Publish this variable in the help.
38308
38309
38310  if test "x$OBJDUMP" = x; then
38311    # The variable is not set by user, try to locate tool using the code snippet
38312    if test -n "$ac_tool_prefix"; then
38313  for ac_prog in gobjdump objdump
38314  do
38315    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38316set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38318$as_echo_n "checking for $ac_word... " >&6; }
38319if ${ac_cv_prog_OBJDUMP+:} false; then :
38320  $as_echo_n "(cached) " >&6
38321else
38322  if test -n "$OBJDUMP"; then
38323  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38324else
38325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38326for as_dir in $PATH
38327do
38328  IFS=$as_save_IFS
38329  test -z "$as_dir" && as_dir=.
38330    for ac_exec_ext in '' $ac_executable_extensions; do
38331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38332    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38334    break 2
38335  fi
38336done
38337  done
38338IFS=$as_save_IFS
38339
38340fi
38341fi
38342OBJDUMP=$ac_cv_prog_OBJDUMP
38343if test -n "$OBJDUMP"; then
38344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38345$as_echo "$OBJDUMP" >&6; }
38346else
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38348$as_echo "no" >&6; }
38349fi
38350
38351
38352    test -n "$OBJDUMP" && break
38353  done
38354fi
38355if test -z "$OBJDUMP"; then
38356  ac_ct_OBJDUMP=$OBJDUMP
38357  for ac_prog in gobjdump objdump
38358do
38359  # Extract the first word of "$ac_prog", so it can be a program name with args.
38360set dummy $ac_prog; ac_word=$2
38361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38362$as_echo_n "checking for $ac_word... " >&6; }
38363if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38364  $as_echo_n "(cached) " >&6
38365else
38366  if test -n "$ac_ct_OBJDUMP"; then
38367  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38368else
38369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38370for as_dir in $PATH
38371do
38372  IFS=$as_save_IFS
38373  test -z "$as_dir" && as_dir=.
38374    for ac_exec_ext in '' $ac_executable_extensions; do
38375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38376    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38378    break 2
38379  fi
38380done
38381  done
38382IFS=$as_save_IFS
38383
38384fi
38385fi
38386ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38387if test -n "$ac_ct_OBJDUMP"; then
38388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38389$as_echo "$ac_ct_OBJDUMP" >&6; }
38390else
38391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38392$as_echo "no" >&6; }
38393fi
38394
38395
38396  test -n "$ac_ct_OBJDUMP" && break
38397done
38398
38399  if test "x$ac_ct_OBJDUMP" = x; then
38400    OBJDUMP=""
38401  else
38402    case $cross_compiling:$ac_tool_warned in
38403yes:)
38404{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38405$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38406ac_tool_warned=yes ;;
38407esac
38408    OBJDUMP=$ac_ct_OBJDUMP
38409  fi
38410fi
38411
38412  else
38413    # The variable is set, but is it from the command line or the environment?
38414
38415    # Try to remove the string !OBJDUMP! from our list.
38416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38418      # If it failed, the variable was not from the command line. Ignore it,
38419      # but warn the user (except for BASH, which is always set by the calling BASH).
38420      if test "xOBJDUMP" != xBASH; then
38421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38422$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38423      fi
38424      # Try to locate tool using the code snippet
38425      if test -n "$ac_tool_prefix"; then
38426  for ac_prog in gobjdump objdump
38427  do
38428    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38429set dummy $ac_tool_prefix$ac_prog; 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_prog_OBJDUMP+:} false; then :
38433  $as_echo_n "(cached) " >&6
38434else
38435  if test -n "$OBJDUMP"; then
38436  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38437else
38438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38439for as_dir in $PATH
38440do
38441  IFS=$as_save_IFS
38442  test -z "$as_dir" && as_dir=.
38443    for ac_exec_ext in '' $ac_executable_extensions; do
38444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38445    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38447    break 2
38448  fi
38449done
38450  done
38451IFS=$as_save_IFS
38452
38453fi
38454fi
38455OBJDUMP=$ac_cv_prog_OBJDUMP
38456if test -n "$OBJDUMP"; then
38457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38458$as_echo "$OBJDUMP" >&6; }
38459else
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38461$as_echo "no" >&6; }
38462fi
38463
38464
38465    test -n "$OBJDUMP" && break
38466  done
38467fi
38468if test -z "$OBJDUMP"; then
38469  ac_ct_OBJDUMP=$OBJDUMP
38470  for ac_prog in gobjdump objdump
38471do
38472  # Extract the first word of "$ac_prog", so it can be a program name with args.
38473set dummy $ac_prog; ac_word=$2
38474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38475$as_echo_n "checking for $ac_word... " >&6; }
38476if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38477  $as_echo_n "(cached) " >&6
38478else
38479  if test -n "$ac_ct_OBJDUMP"; then
38480  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38481else
38482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38483for as_dir in $PATH
38484do
38485  IFS=$as_save_IFS
38486  test -z "$as_dir" && as_dir=.
38487    for ac_exec_ext in '' $ac_executable_extensions; do
38488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38489    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38491    break 2
38492  fi
38493done
38494  done
38495IFS=$as_save_IFS
38496
38497fi
38498fi
38499ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38500if test -n "$ac_ct_OBJDUMP"; then
38501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38502$as_echo "$ac_ct_OBJDUMP" >&6; }
38503else
38504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38505$as_echo "no" >&6; }
38506fi
38507
38508
38509  test -n "$ac_ct_OBJDUMP" && break
38510done
38511
38512  if test "x$ac_ct_OBJDUMP" = x; then
38513    OBJDUMP=""
38514  else
38515    case $cross_compiling:$ac_tool_warned in
38516yes:)
38517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38519ac_tool_warned=yes ;;
38520esac
38521    OBJDUMP=$ac_ct_OBJDUMP
38522  fi
38523fi
38524
38525    else
38526      # If it succeeded, then it was overridden by the user. We will use it
38527      # for the tool.
38528
38529      # First remove it from the list of overridden variables, so we can test
38530      # for unknown variables in the end.
38531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38532
38533      # Check if the provided tool contains a complete path.
38534      tool_specified="$OBJDUMP"
38535      tool_basename="${tool_specified##*/}"
38536      if test "x$tool_basename" = "x$tool_specified"; then
38537        # A command without a complete path is provided, search $PATH.
38538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38539$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38540        # Extract the first word of "$tool_basename", so it can be a program name with args.
38541set dummy $tool_basename; ac_word=$2
38542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38543$as_echo_n "checking for $ac_word... " >&6; }
38544if ${ac_cv_path_OBJDUMP+:} false; then :
38545  $as_echo_n "(cached) " >&6
38546else
38547  case $OBJDUMP in
38548  [\\/]* | ?:[\\/]*)
38549  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38550  ;;
38551  *)
38552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38553for as_dir in $PATH
38554do
38555  IFS=$as_save_IFS
38556  test -z "$as_dir" && as_dir=.
38557    for ac_exec_ext in '' $ac_executable_extensions; do
38558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38559    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38561    break 2
38562  fi
38563done
38564  done
38565IFS=$as_save_IFS
38566
38567  ;;
38568esac
38569fi
38570OBJDUMP=$ac_cv_path_OBJDUMP
38571if test -n "$OBJDUMP"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38573$as_echo "$OBJDUMP" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580        if test "x$OBJDUMP" = x; then
38581          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38582        fi
38583      else
38584        # Otherwise we believe it is a complete path. Use it as it is.
38585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38586$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38588$as_echo_n "checking for OBJDUMP... " >&6; }
38589        if test ! -x "$tool_specified"; then
38590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38591$as_echo "not found" >&6; }
38592          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38593        fi
38594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38595$as_echo "$tool_specified" >&6; }
38596      fi
38597    fi
38598  fi
38599
38600
38601  if test "x$OBJDUMP" != x; then
38602    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38603    # bails if argument is missing.
38604
38605  # Only process if variable expands to non-empty
38606
38607  if test "x$OBJDUMP" != x; then
38608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38609
38610  # First separate the path from the arguments. This will split at the first
38611  # space.
38612  complete="$OBJDUMP"
38613  path="${complete%% *}"
38614  tmp="$complete EOL"
38615  arguments="${tmp#* }"
38616
38617  # Input might be given as Windows format, start by converting to
38618  # unix format.
38619  new_path=`$CYGPATH -u "$path"`
38620
38621  # Now try to locate executable using which
38622  new_path=`$WHICH "$new_path" 2> /dev/null`
38623  # bat and cmd files are not always considered executable in cygwin causing which
38624  # to not find them
38625  if test "x$new_path" = x \
38626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38628    new_path=`$CYGPATH -u "$path"`
38629  fi
38630  if test "x$new_path" = x; then
38631    # Oops. Which didn't find the executable.
38632    # The splitting of arguments from the executable at a space might have been incorrect,
38633    # since paths with space are more likely in Windows. Give it another try with the whole
38634    # argument.
38635    path="$complete"
38636    arguments="EOL"
38637    new_path=`$CYGPATH -u "$path"`
38638    new_path=`$WHICH "$new_path" 2> /dev/null`
38639    # bat and cmd files are not always considered executable in cygwin causing which
38640    # to not find them
38641    if test "x$new_path" = x \
38642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38644      new_path=`$CYGPATH -u "$path"`
38645    fi
38646    if test "x$new_path" = x; then
38647      # It's still not found. Now this is an unrecoverable error.
38648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38649$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38650      has_space=`$ECHO "$complete" | $GREP " "`
38651      if test "x$has_space" != x; then
38652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38654      fi
38655      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38656    fi
38657  fi
38658
38659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38662  # "foo.exe" is OK but "foo" is an error.
38663  #
38664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38665  # It is also a way to make sure we got the proper file name for the real test later on.
38666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38667  if test "x$test_shortpath" = x; then
38668    # Short path failed, file does not exist as specified.
38669    # Try adding .exe or .cmd
38670    if test -f "${new_path}.exe"; then
38671      input_to_shortpath="${new_path}.exe"
38672    elif test -f "${new_path}.cmd"; then
38673      input_to_shortpath="${new_path}.cmd"
38674    else
38675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38676$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38679      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38680    fi
38681  else
38682    input_to_shortpath="$new_path"
38683  fi
38684
38685  # Call helper function which possibly converts this using DOS-style short mode.
38686  # If so, the updated path is stored in $new_path.
38687  new_path="$input_to_shortpath"
38688
38689  input_path="$input_to_shortpath"
38690  # Check if we need to convert this using DOS-style short mode. If the path
38691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38692  # take no chances and rewrite it.
38693  # Note: m4 eats our [], so we need to use [ and ] instead.
38694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38695  if test "x$has_forbidden_chars" != x; then
38696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38700      # Going to short mode and back again did indeed matter. Since short mode is
38701      # case insensitive, let's make it lowercase to improve readability.
38702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38703      # Now convert it back to Unix-style (cygpath)
38704      input_path=`$CYGPATH -u "$shortmode_path"`
38705      new_path="$input_path"
38706    fi
38707  fi
38708
38709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38710  if test "x$test_cygdrive_prefix" = x; then
38711    # As a simple fix, exclude /usr/bin since it's not a real path.
38712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38714      # a path prefixed by /cygdrive for fixpath to work.
38715      new_path="$CYGWIN_ROOT_PATH$input_path"
38716    fi
38717  fi
38718
38719  # remove trailing .exe if any
38720  new_path="${new_path/%.exe/}"
38721
38722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38723
38724  # First separate the path from the arguments. This will split at the first
38725  # space.
38726  complete="$OBJDUMP"
38727  path="${complete%% *}"
38728  tmp="$complete EOL"
38729  arguments="${tmp#* }"
38730
38731  # Input might be given as Windows format, start by converting to
38732  # unix format.
38733  new_path="$path"
38734
38735  windows_path="$new_path"
38736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38737    unix_path=`$CYGPATH -u "$windows_path"`
38738    new_path="$unix_path"
38739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38741    new_path="$unix_path"
38742  fi
38743
38744
38745  # Now try to locate executable using which
38746  new_path=`$WHICH "$new_path" 2> /dev/null`
38747
38748  if test "x$new_path" = x; then
38749    # Oops. Which didn't find the executable.
38750    # The splitting of arguments from the executable at a space might have been incorrect,
38751    # since paths with space are more likely in Windows. Give it another try with the whole
38752    # argument.
38753    path="$complete"
38754    arguments="EOL"
38755    new_path="$path"
38756
38757  windows_path="$new_path"
38758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38759    unix_path=`$CYGPATH -u "$windows_path"`
38760    new_path="$unix_path"
38761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38763    new_path="$unix_path"
38764  fi
38765
38766
38767    new_path=`$WHICH "$new_path" 2> /dev/null`
38768    # bat and cmd files are not always considered executable in MSYS causing which
38769    # to not find them
38770    if test "x$new_path" = x \
38771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38773      new_path="$path"
38774
38775  windows_path="$new_path"
38776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38777    unix_path=`$CYGPATH -u "$windows_path"`
38778    new_path="$unix_path"
38779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38781    new_path="$unix_path"
38782  fi
38783
38784    fi
38785
38786    if test "x$new_path" = x; then
38787      # It's still not found. Now this is an unrecoverable error.
38788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38789$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38790      has_space=`$ECHO "$complete" | $GREP " "`
38791      if test "x$has_space" != x; then
38792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38794      fi
38795      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38796    fi
38797  fi
38798
38799  # Now new_path has a complete unix path to the binary
38800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38801    # Keep paths in /bin as-is, but remove trailing .exe if any
38802    new_path="${new_path/%.exe/}"
38803    # Do not save /bin paths to all_fixpath_prefixes!
38804  else
38805    # Not in mixed or Windows style, start by that.
38806    new_path=`cmd //c echo $new_path`
38807
38808  input_path="$new_path"
38809  # Check if we need to convert this using DOS-style short mode. If the path
38810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38811  # take no chances and rewrite it.
38812  # Note: m4 eats our [], so we need to use [ and ] instead.
38813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38814  if test "x$has_forbidden_chars" != x; then
38815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38817  fi
38818
38819    # Output is in $new_path
38820
38821  windows_path="$new_path"
38822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38823    unix_path=`$CYGPATH -u "$windows_path"`
38824    new_path="$unix_path"
38825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38827    new_path="$unix_path"
38828  fi
38829
38830    # remove trailing .exe if any
38831    new_path="${new_path/%.exe/}"
38832
38833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38835  fi
38836
38837    else
38838      # We're on a unix platform. Hooray! :)
38839      # First separate the path from the arguments. This will split at the first
38840      # space.
38841      complete="$OBJDUMP"
38842      path="${complete%% *}"
38843      tmp="$complete EOL"
38844      arguments="${tmp#* }"
38845
38846      # Cannot rely on the command "which" here since it doesn't always work.
38847      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38848      if test -z "$is_absolute_path"; then
38849        # Path to executable is not absolute. Find it.
38850        IFS_save="$IFS"
38851        IFS=:
38852        for p in $PATH; do
38853          if test -f "$p/$path" && test -x "$p/$path"; then
38854            new_path="$p/$path"
38855            break
38856          fi
38857        done
38858        IFS="$IFS_save"
38859      else
38860        # This is an absolute path, we can use it without further modifications.
38861        new_path="$path"
38862      fi
38863
38864      if test "x$new_path" = x; then
38865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38866$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38867        has_space=`$ECHO "$complete" | $GREP " "`
38868        if test "x$has_space" != x; then
38869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38871        fi
38872        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38873      fi
38874    fi
38875
38876    # Now join together the path and the arguments once again
38877    if test "x$arguments" != xEOL; then
38878      new_complete="$new_path ${arguments% *}"
38879    else
38880      new_complete="$new_path"
38881    fi
38882
38883    if test "x$complete" != "x$new_complete"; then
38884      OBJDUMP="$new_complete"
38885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38886$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38887    fi
38888  fi
38889
38890  fi
38891
38892
38893  # Restore old path.
38894  PATH="$OLD_PATH"
38895
38896  # Restore the flags to the user specified values.
38897  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38898  CFLAGS="$ORG_CFLAGS"
38899  CXXFLAGS="$ORG_CXXFLAGS"
38900
38901
38902# Finally do some processing after the detection phase
38903
38904  if test "x$COMPILE_TYPE" = "xcross"; then
38905    # Now we need to find a C/C++ compiler that can build executables for the
38906    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38907    # used once. Also, we need to do this without adding a tools dir to the
38908    # path, otherwise we might pick up cross-compilers which don't use standard
38909    # naming.
38910
38911    # FIXME: we should list the discovered compilers as an exclude pattern!
38912    # If we do that, we can do this detection before POST_DETECTION, and still
38913    # find the build compilers in the tools dir, if needed.
38914
38915
38916  # Publish this variable in the help.
38917
38918
38919  if test "x$BUILD_CC" = x; then
38920    # The variable is not set by user, try to locate tool using the code snippet
38921    for ac_prog in cl cc gcc
38922do
38923  # Extract the first word of "$ac_prog", so it can be a program name with args.
38924set dummy $ac_prog; ac_word=$2
38925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38926$as_echo_n "checking for $ac_word... " >&6; }
38927if ${ac_cv_path_BUILD_CC+:} false; then :
38928  $as_echo_n "(cached) " >&6
38929else
38930  case $BUILD_CC in
38931  [\\/]* | ?:[\\/]*)
38932  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38933  ;;
38934  *)
38935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38936for as_dir in $PATH
38937do
38938  IFS=$as_save_IFS
38939  test -z "$as_dir" && as_dir=.
38940    for ac_exec_ext in '' $ac_executable_extensions; do
38941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38942    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38944    break 2
38945  fi
38946done
38947  done
38948IFS=$as_save_IFS
38949
38950  ;;
38951esac
38952fi
38953BUILD_CC=$ac_cv_path_BUILD_CC
38954if test -n "$BUILD_CC"; then
38955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38956$as_echo "$BUILD_CC" >&6; }
38957else
38958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38959$as_echo "no" >&6; }
38960fi
38961
38962
38963  test -n "$BUILD_CC" && break
38964done
38965
38966  else
38967    # The variable is set, but is it from the command line or the environment?
38968
38969    # Try to remove the string !BUILD_CC! from our list.
38970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38972      # If it failed, the variable was not from the command line. Ignore it,
38973      # but warn the user (except for BASH, which is always set by the calling BASH).
38974      if test "xBUILD_CC" != xBASH; then
38975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38976$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38977      fi
38978      # Try to locate tool using the code snippet
38979      for ac_prog in cl cc gcc
38980do
38981  # Extract the first word of "$ac_prog", so it can be a program name with args.
38982set dummy $ac_prog; ac_word=$2
38983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38984$as_echo_n "checking for $ac_word... " >&6; }
38985if ${ac_cv_path_BUILD_CC+:} false; then :
38986  $as_echo_n "(cached) " >&6
38987else
38988  case $BUILD_CC in
38989  [\\/]* | ?:[\\/]*)
38990  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38991  ;;
38992  *)
38993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38994for as_dir in $PATH
38995do
38996  IFS=$as_save_IFS
38997  test -z "$as_dir" && as_dir=.
38998    for ac_exec_ext in '' $ac_executable_extensions; do
38999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39000    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39002    break 2
39003  fi
39004done
39005  done
39006IFS=$as_save_IFS
39007
39008  ;;
39009esac
39010fi
39011BUILD_CC=$ac_cv_path_BUILD_CC
39012if test -n "$BUILD_CC"; then
39013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39014$as_echo "$BUILD_CC" >&6; }
39015else
39016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39017$as_echo "no" >&6; }
39018fi
39019
39020
39021  test -n "$BUILD_CC" && break
39022done
39023
39024    else
39025      # If it succeeded, then it was overridden by the user. We will use it
39026      # for the tool.
39027
39028      # First remove it from the list of overridden variables, so we can test
39029      # for unknown variables in the end.
39030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39031
39032      # Check if the provided tool contains a complete path.
39033      tool_specified="$BUILD_CC"
39034      tool_basename="${tool_specified##*/}"
39035      if test "x$tool_basename" = "x$tool_specified"; then
39036        # A command without a complete path is provided, search $PATH.
39037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39038$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39039        # Extract the first word of "$tool_basename", so it can be a program name with args.
39040set dummy $tool_basename; ac_word=$2
39041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39042$as_echo_n "checking for $ac_word... " >&6; }
39043if ${ac_cv_path_BUILD_CC+:} false; then :
39044  $as_echo_n "(cached) " >&6
39045else
39046  case $BUILD_CC in
39047  [\\/]* | ?:[\\/]*)
39048  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39049  ;;
39050  *)
39051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39052for as_dir in $PATH
39053do
39054  IFS=$as_save_IFS
39055  test -z "$as_dir" && as_dir=.
39056    for ac_exec_ext in '' $ac_executable_extensions; do
39057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39058    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39060    break 2
39061  fi
39062done
39063  done
39064IFS=$as_save_IFS
39065
39066  ;;
39067esac
39068fi
39069BUILD_CC=$ac_cv_path_BUILD_CC
39070if test -n "$BUILD_CC"; then
39071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39072$as_echo "$BUILD_CC" >&6; }
39073else
39074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39075$as_echo "no" >&6; }
39076fi
39077
39078
39079        if test "x$BUILD_CC" = x; then
39080          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39081        fi
39082      else
39083        # Otherwise we believe it is a complete path. Use it as it is.
39084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39085$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39087$as_echo_n "checking for BUILD_CC... " >&6; }
39088        if test ! -x "$tool_specified"; then
39089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39090$as_echo "not found" >&6; }
39091          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39092        fi
39093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39094$as_echo "$tool_specified" >&6; }
39095      fi
39096    fi
39097  fi
39098
39099
39100
39101  # Only process if variable expands to non-empty
39102
39103  if test "x$BUILD_CC" != x; then
39104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39105
39106  # First separate the path from the arguments. This will split at the first
39107  # space.
39108  complete="$BUILD_CC"
39109  path="${complete%% *}"
39110  tmp="$complete EOL"
39111  arguments="${tmp#* }"
39112
39113  # Input might be given as Windows format, start by converting to
39114  # unix format.
39115  new_path=`$CYGPATH -u "$path"`
39116
39117  # Now try to locate executable using which
39118  new_path=`$WHICH "$new_path" 2> /dev/null`
39119  # bat and cmd files are not always considered executable in cygwin causing which
39120  # to not find them
39121  if test "x$new_path" = x \
39122      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39123      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39124    new_path=`$CYGPATH -u "$path"`
39125  fi
39126  if test "x$new_path" = x; then
39127    # Oops. Which didn't find the executable.
39128    # The splitting of arguments from the executable at a space might have been incorrect,
39129    # since paths with space are more likely in Windows. Give it another try with the whole
39130    # argument.
39131    path="$complete"
39132    arguments="EOL"
39133    new_path=`$CYGPATH -u "$path"`
39134    new_path=`$WHICH "$new_path" 2> /dev/null`
39135    # bat and cmd files are not always considered executable in cygwin causing which
39136    # to not find them
39137    if test "x$new_path" = x \
39138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39140      new_path=`$CYGPATH -u "$path"`
39141    fi
39142    if test "x$new_path" = x; then
39143      # It's still not found. Now this is an unrecoverable error.
39144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39145$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39146      has_space=`$ECHO "$complete" | $GREP " "`
39147      if test "x$has_space" != x; then
39148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39150      fi
39151      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39152    fi
39153  fi
39154
39155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39158  # "foo.exe" is OK but "foo" is an error.
39159  #
39160  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39161  # It is also a way to make sure we got the proper file name for the real test later on.
39162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39163  if test "x$test_shortpath" = x; then
39164    # Short path failed, file does not exist as specified.
39165    # Try adding .exe or .cmd
39166    if test -f "${new_path}.exe"; then
39167      input_to_shortpath="${new_path}.exe"
39168    elif test -f "${new_path}.cmd"; then
39169      input_to_shortpath="${new_path}.cmd"
39170    else
39171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39172$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39175      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39176    fi
39177  else
39178    input_to_shortpath="$new_path"
39179  fi
39180
39181  # Call helper function which possibly converts this using DOS-style short mode.
39182  # If so, the updated path is stored in $new_path.
39183  new_path="$input_to_shortpath"
39184
39185  input_path="$input_to_shortpath"
39186  # Check if we need to convert this using DOS-style short mode. If the path
39187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39188  # take no chances and rewrite it.
39189  # Note: m4 eats our [], so we need to use [ and ] instead.
39190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39191  if test "x$has_forbidden_chars" != x; then
39192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39196      # Going to short mode and back again did indeed matter. Since short mode is
39197      # case insensitive, let's make it lowercase to improve readability.
39198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39199      # Now convert it back to Unix-style (cygpath)
39200      input_path=`$CYGPATH -u "$shortmode_path"`
39201      new_path="$input_path"
39202    fi
39203  fi
39204
39205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39206  if test "x$test_cygdrive_prefix" = x; then
39207    # As a simple fix, exclude /usr/bin since it's not a real path.
39208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39210      # a path prefixed by /cygdrive for fixpath to work.
39211      new_path="$CYGWIN_ROOT_PATH$input_path"
39212    fi
39213  fi
39214
39215  # remove trailing .exe if any
39216  new_path="${new_path/%.exe/}"
39217
39218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39219
39220  # First separate the path from the arguments. This will split at the first
39221  # space.
39222  complete="$BUILD_CC"
39223  path="${complete%% *}"
39224  tmp="$complete EOL"
39225  arguments="${tmp#* }"
39226
39227  # Input might be given as Windows format, start by converting to
39228  # unix format.
39229  new_path="$path"
39230
39231  windows_path="$new_path"
39232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39233    unix_path=`$CYGPATH -u "$windows_path"`
39234    new_path="$unix_path"
39235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39237    new_path="$unix_path"
39238  fi
39239
39240
39241  # Now try to locate executable using which
39242  new_path=`$WHICH "$new_path" 2> /dev/null`
39243
39244  if test "x$new_path" = x; then
39245    # Oops. Which didn't find the executable.
39246    # The splitting of arguments from the executable at a space might have been incorrect,
39247    # since paths with space are more likely in Windows. Give it another try with the whole
39248    # argument.
39249    path="$complete"
39250    arguments="EOL"
39251    new_path="$path"
39252
39253  windows_path="$new_path"
39254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39255    unix_path=`$CYGPATH -u "$windows_path"`
39256    new_path="$unix_path"
39257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39259    new_path="$unix_path"
39260  fi
39261
39262
39263    new_path=`$WHICH "$new_path" 2> /dev/null`
39264    # bat and cmd files are not always considered executable in MSYS causing which
39265    # to not find them
39266    if test "x$new_path" = x \
39267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39269      new_path="$path"
39270
39271  windows_path="$new_path"
39272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39273    unix_path=`$CYGPATH -u "$windows_path"`
39274    new_path="$unix_path"
39275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39277    new_path="$unix_path"
39278  fi
39279
39280    fi
39281
39282    if test "x$new_path" = x; then
39283      # It's still not found. Now this is an unrecoverable error.
39284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39285$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39286      has_space=`$ECHO "$complete" | $GREP " "`
39287      if test "x$has_space" != x; then
39288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39290      fi
39291      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39292    fi
39293  fi
39294
39295  # Now new_path has a complete unix path to the binary
39296  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39297    # Keep paths in /bin as-is, but remove trailing .exe if any
39298    new_path="${new_path/%.exe/}"
39299    # Do not save /bin paths to all_fixpath_prefixes!
39300  else
39301    # Not in mixed or Windows style, start by that.
39302    new_path=`cmd //c echo $new_path`
39303
39304  input_path="$new_path"
39305  # Check if we need to convert this using DOS-style short mode. If the path
39306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39307  # take no chances and rewrite it.
39308  # Note: m4 eats our [], so we need to use [ and ] instead.
39309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39310  if test "x$has_forbidden_chars" != x; then
39311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39313  fi
39314
39315    # Output is in $new_path
39316
39317  windows_path="$new_path"
39318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39319    unix_path=`$CYGPATH -u "$windows_path"`
39320    new_path="$unix_path"
39321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39323    new_path="$unix_path"
39324  fi
39325
39326    # remove trailing .exe if any
39327    new_path="${new_path/%.exe/}"
39328
39329    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39330    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39331  fi
39332
39333    else
39334      # We're on a unix platform. Hooray! :)
39335      # First separate the path from the arguments. This will split at the first
39336      # space.
39337      complete="$BUILD_CC"
39338      path="${complete%% *}"
39339      tmp="$complete EOL"
39340      arguments="${tmp#* }"
39341
39342      # Cannot rely on the command "which" here since it doesn't always work.
39343      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39344      if test -z "$is_absolute_path"; then
39345        # Path to executable is not absolute. Find it.
39346        IFS_save="$IFS"
39347        IFS=:
39348        for p in $PATH; do
39349          if test -f "$p/$path" && test -x "$p/$path"; then
39350            new_path="$p/$path"
39351            break
39352          fi
39353        done
39354        IFS="$IFS_save"
39355      else
39356        # This is an absolute path, we can use it without further modifications.
39357        new_path="$path"
39358      fi
39359
39360      if test "x$new_path" = x; then
39361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39362$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39363        has_space=`$ECHO "$complete" | $GREP " "`
39364        if test "x$has_space" != x; then
39365          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39366$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39367        fi
39368        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39369      fi
39370    fi
39371
39372    # Now join together the path and the arguments once again
39373    if test "x$arguments" != xEOL; then
39374      new_complete="$new_path ${arguments% *}"
39375    else
39376      new_complete="$new_path"
39377    fi
39378
39379    if test "x$complete" != "x$new_complete"; then
39380      BUILD_CC="$new_complete"
39381      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39382$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39383    fi
39384  fi
39385
39386
39387
39388  # Publish this variable in the help.
39389
39390
39391  if test "x$BUILD_CXX" = x; then
39392    # The variable is not set by user, try to locate tool using the code snippet
39393    for ac_prog in cl CC g++
39394do
39395  # Extract the first word of "$ac_prog", so it can be a program name with args.
39396set dummy $ac_prog; ac_word=$2
39397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39398$as_echo_n "checking for $ac_word... " >&6; }
39399if ${ac_cv_path_BUILD_CXX+:} false; then :
39400  $as_echo_n "(cached) " >&6
39401else
39402  case $BUILD_CXX in
39403  [\\/]* | ?:[\\/]*)
39404  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39405  ;;
39406  *)
39407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39408for as_dir in $PATH
39409do
39410  IFS=$as_save_IFS
39411  test -z "$as_dir" && as_dir=.
39412    for ac_exec_ext in '' $ac_executable_extensions; do
39413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39414    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39416    break 2
39417  fi
39418done
39419  done
39420IFS=$as_save_IFS
39421
39422  ;;
39423esac
39424fi
39425BUILD_CXX=$ac_cv_path_BUILD_CXX
39426if test -n "$BUILD_CXX"; then
39427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39428$as_echo "$BUILD_CXX" >&6; }
39429else
39430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39431$as_echo "no" >&6; }
39432fi
39433
39434
39435  test -n "$BUILD_CXX" && break
39436done
39437
39438  else
39439    # The variable is set, but is it from the command line or the environment?
39440
39441    # Try to remove the string !BUILD_CXX! from our list.
39442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39444      # If it failed, the variable was not from the command line. Ignore it,
39445      # but warn the user (except for BASH, which is always set by the calling BASH).
39446      if test "xBUILD_CXX" != xBASH; then
39447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39448$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39449      fi
39450      # Try to locate tool using the code snippet
39451      for ac_prog in cl CC g++
39452do
39453  # Extract the first word of "$ac_prog", so it can be a program name with args.
39454set dummy $ac_prog; ac_word=$2
39455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39456$as_echo_n "checking for $ac_word... " >&6; }
39457if ${ac_cv_path_BUILD_CXX+:} false; then :
39458  $as_echo_n "(cached) " >&6
39459else
39460  case $BUILD_CXX in
39461  [\\/]* | ?:[\\/]*)
39462  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39463  ;;
39464  *)
39465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39466for as_dir in $PATH
39467do
39468  IFS=$as_save_IFS
39469  test -z "$as_dir" && as_dir=.
39470    for ac_exec_ext in '' $ac_executable_extensions; do
39471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39472    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39474    break 2
39475  fi
39476done
39477  done
39478IFS=$as_save_IFS
39479
39480  ;;
39481esac
39482fi
39483BUILD_CXX=$ac_cv_path_BUILD_CXX
39484if test -n "$BUILD_CXX"; then
39485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39486$as_echo "$BUILD_CXX" >&6; }
39487else
39488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39489$as_echo "no" >&6; }
39490fi
39491
39492
39493  test -n "$BUILD_CXX" && break
39494done
39495
39496    else
39497      # If it succeeded, then it was overridden by the user. We will use it
39498      # for the tool.
39499
39500      # First remove it from the list of overridden variables, so we can test
39501      # for unknown variables in the end.
39502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39503
39504      # Check if the provided tool contains a complete path.
39505      tool_specified="$BUILD_CXX"
39506      tool_basename="${tool_specified##*/}"
39507      if test "x$tool_basename" = "x$tool_specified"; then
39508        # A command without a complete path is provided, search $PATH.
39509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39510$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39511        # Extract the first word of "$tool_basename", so it can be a program name with args.
39512set dummy $tool_basename; ac_word=$2
39513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39514$as_echo_n "checking for $ac_word... " >&6; }
39515if ${ac_cv_path_BUILD_CXX+:} false; then :
39516  $as_echo_n "(cached) " >&6
39517else
39518  case $BUILD_CXX in
39519  [\\/]* | ?:[\\/]*)
39520  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39521  ;;
39522  *)
39523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39524for as_dir in $PATH
39525do
39526  IFS=$as_save_IFS
39527  test -z "$as_dir" && as_dir=.
39528    for ac_exec_ext in '' $ac_executable_extensions; do
39529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39530    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39532    break 2
39533  fi
39534done
39535  done
39536IFS=$as_save_IFS
39537
39538  ;;
39539esac
39540fi
39541BUILD_CXX=$ac_cv_path_BUILD_CXX
39542if test -n "$BUILD_CXX"; then
39543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39544$as_echo "$BUILD_CXX" >&6; }
39545else
39546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39547$as_echo "no" >&6; }
39548fi
39549
39550
39551        if test "x$BUILD_CXX" = x; then
39552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39553        fi
39554      else
39555        # Otherwise we believe it is a complete path. Use it as it is.
39556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39557$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39559$as_echo_n "checking for BUILD_CXX... " >&6; }
39560        if test ! -x "$tool_specified"; then
39561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39562$as_echo "not found" >&6; }
39563          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39564        fi
39565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39566$as_echo "$tool_specified" >&6; }
39567      fi
39568    fi
39569  fi
39570
39571
39572
39573  # Only process if variable expands to non-empty
39574
39575  if test "x$BUILD_CXX" != x; then
39576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39577
39578  # First separate the path from the arguments. This will split at the first
39579  # space.
39580  complete="$BUILD_CXX"
39581  path="${complete%% *}"
39582  tmp="$complete EOL"
39583  arguments="${tmp#* }"
39584
39585  # Input might be given as Windows format, start by converting to
39586  # unix format.
39587  new_path=`$CYGPATH -u "$path"`
39588
39589  # Now try to locate executable using which
39590  new_path=`$WHICH "$new_path" 2> /dev/null`
39591  # bat and cmd files are not always considered executable in cygwin causing which
39592  # to not find them
39593  if test "x$new_path" = x \
39594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39596    new_path=`$CYGPATH -u "$path"`
39597  fi
39598  if test "x$new_path" = x; then
39599    # Oops. Which didn't find the executable.
39600    # The splitting of arguments from the executable at a space might have been incorrect,
39601    # since paths with space are more likely in Windows. Give it another try with the whole
39602    # argument.
39603    path="$complete"
39604    arguments="EOL"
39605    new_path=`$CYGPATH -u "$path"`
39606    new_path=`$WHICH "$new_path" 2> /dev/null`
39607    # bat and cmd files are not always considered executable in cygwin causing which
39608    # to not find them
39609    if test "x$new_path" = x \
39610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39612      new_path=`$CYGPATH -u "$path"`
39613    fi
39614    if test "x$new_path" = x; then
39615      # It's still not found. Now this is an unrecoverable error.
39616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39617$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39618      has_space=`$ECHO "$complete" | $GREP " "`
39619      if test "x$has_space" != x; then
39620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39622      fi
39623      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39624    fi
39625  fi
39626
39627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39630  # "foo.exe" is OK but "foo" is an error.
39631  #
39632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39633  # It is also a way to make sure we got the proper file name for the real test later on.
39634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39635  if test "x$test_shortpath" = x; then
39636    # Short path failed, file does not exist as specified.
39637    # Try adding .exe or .cmd
39638    if test -f "${new_path}.exe"; then
39639      input_to_shortpath="${new_path}.exe"
39640    elif test -f "${new_path}.cmd"; then
39641      input_to_shortpath="${new_path}.cmd"
39642    else
39643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39644$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39647      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39648    fi
39649  else
39650    input_to_shortpath="$new_path"
39651  fi
39652
39653  # Call helper function which possibly converts this using DOS-style short mode.
39654  # If so, the updated path is stored in $new_path.
39655  new_path="$input_to_shortpath"
39656
39657  input_path="$input_to_shortpath"
39658  # Check if we need to convert this using DOS-style short mode. If the path
39659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39660  # take no chances and rewrite it.
39661  # Note: m4 eats our [], so we need to use [ and ] instead.
39662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39663  if test "x$has_forbidden_chars" != x; then
39664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39668      # Going to short mode and back again did indeed matter. Since short mode is
39669      # case insensitive, let's make it lowercase to improve readability.
39670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39671      # Now convert it back to Unix-style (cygpath)
39672      input_path=`$CYGPATH -u "$shortmode_path"`
39673      new_path="$input_path"
39674    fi
39675  fi
39676
39677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39678  if test "x$test_cygdrive_prefix" = x; then
39679    # As a simple fix, exclude /usr/bin since it's not a real path.
39680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39682      # a path prefixed by /cygdrive for fixpath to work.
39683      new_path="$CYGWIN_ROOT_PATH$input_path"
39684    fi
39685  fi
39686
39687  # remove trailing .exe if any
39688  new_path="${new_path/%.exe/}"
39689
39690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39691
39692  # First separate the path from the arguments. This will split at the first
39693  # space.
39694  complete="$BUILD_CXX"
39695  path="${complete%% *}"
39696  tmp="$complete EOL"
39697  arguments="${tmp#* }"
39698
39699  # Input might be given as Windows format, start by converting to
39700  # unix format.
39701  new_path="$path"
39702
39703  windows_path="$new_path"
39704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39705    unix_path=`$CYGPATH -u "$windows_path"`
39706    new_path="$unix_path"
39707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39709    new_path="$unix_path"
39710  fi
39711
39712
39713  # Now try to locate executable using which
39714  new_path=`$WHICH "$new_path" 2> /dev/null`
39715
39716  if test "x$new_path" = x; then
39717    # Oops. Which didn't find the executable.
39718    # The splitting of arguments from the executable at a space might have been incorrect,
39719    # since paths with space are more likely in Windows. Give it another try with the whole
39720    # argument.
39721    path="$complete"
39722    arguments="EOL"
39723    new_path="$path"
39724
39725  windows_path="$new_path"
39726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39727    unix_path=`$CYGPATH -u "$windows_path"`
39728    new_path="$unix_path"
39729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39731    new_path="$unix_path"
39732  fi
39733
39734
39735    new_path=`$WHICH "$new_path" 2> /dev/null`
39736    # bat and cmd files are not always considered executable in MSYS causing which
39737    # to not find them
39738    if test "x$new_path" = x \
39739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39741      new_path="$path"
39742
39743  windows_path="$new_path"
39744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39745    unix_path=`$CYGPATH -u "$windows_path"`
39746    new_path="$unix_path"
39747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39749    new_path="$unix_path"
39750  fi
39751
39752    fi
39753
39754    if test "x$new_path" = x; then
39755      # It's still not found. Now this is an unrecoverable error.
39756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39757$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39758      has_space=`$ECHO "$complete" | $GREP " "`
39759      if test "x$has_space" != x; then
39760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39762      fi
39763      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39764    fi
39765  fi
39766
39767  # Now new_path has a complete unix path to the binary
39768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39769    # Keep paths in /bin as-is, but remove trailing .exe if any
39770    new_path="${new_path/%.exe/}"
39771    # Do not save /bin paths to all_fixpath_prefixes!
39772  else
39773    # Not in mixed or Windows style, start by that.
39774    new_path=`cmd //c echo $new_path`
39775
39776  input_path="$new_path"
39777  # Check if we need to convert this using DOS-style short mode. If the path
39778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39779  # take no chances and rewrite it.
39780  # Note: m4 eats our [], so we need to use [ and ] instead.
39781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39782  if test "x$has_forbidden_chars" != x; then
39783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39785  fi
39786
39787    # Output is in $new_path
39788
39789  windows_path="$new_path"
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791    unix_path=`$CYGPATH -u "$windows_path"`
39792    new_path="$unix_path"
39793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39795    new_path="$unix_path"
39796  fi
39797
39798    # remove trailing .exe if any
39799    new_path="${new_path/%.exe/}"
39800
39801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39803  fi
39804
39805    else
39806      # We're on a unix platform. Hooray! :)
39807      # First separate the path from the arguments. This will split at the first
39808      # space.
39809      complete="$BUILD_CXX"
39810      path="${complete%% *}"
39811      tmp="$complete EOL"
39812      arguments="${tmp#* }"
39813
39814      # Cannot rely on the command "which" here since it doesn't always work.
39815      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39816      if test -z "$is_absolute_path"; then
39817        # Path to executable is not absolute. Find it.
39818        IFS_save="$IFS"
39819        IFS=:
39820        for p in $PATH; do
39821          if test -f "$p/$path" && test -x "$p/$path"; then
39822            new_path="$p/$path"
39823            break
39824          fi
39825        done
39826        IFS="$IFS_save"
39827      else
39828        # This is an absolute path, we can use it without further modifications.
39829        new_path="$path"
39830      fi
39831
39832      if test "x$new_path" = x; then
39833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39834$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39835        has_space=`$ECHO "$complete" | $GREP " "`
39836        if test "x$has_space" != x; then
39837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39839        fi
39840        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39841      fi
39842    fi
39843
39844    # Now join together the path and the arguments once again
39845    if test "x$arguments" != xEOL; then
39846      new_complete="$new_path ${arguments% *}"
39847    else
39848      new_complete="$new_path"
39849    fi
39850
39851    if test "x$complete" != "x$new_complete"; then
39852      BUILD_CXX="$new_complete"
39853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39854$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39855    fi
39856  fi
39857
39858
39859
39860  # Publish this variable in the help.
39861
39862
39863  if test "x$BUILD_LD" = x; then
39864    # The variable is not set by user, try to locate tool using the code snippet
39865    for ac_prog in ld
39866do
39867  # Extract the first word of "$ac_prog", so it can be a program name with args.
39868set dummy $ac_prog; ac_word=$2
39869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39870$as_echo_n "checking for $ac_word... " >&6; }
39871if ${ac_cv_path_BUILD_LD+:} false; then :
39872  $as_echo_n "(cached) " >&6
39873else
39874  case $BUILD_LD in
39875  [\\/]* | ?:[\\/]*)
39876  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39877  ;;
39878  *)
39879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39880for as_dir in $PATH
39881do
39882  IFS=$as_save_IFS
39883  test -z "$as_dir" && as_dir=.
39884    for ac_exec_ext in '' $ac_executable_extensions; do
39885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39886    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39888    break 2
39889  fi
39890done
39891  done
39892IFS=$as_save_IFS
39893
39894  ;;
39895esac
39896fi
39897BUILD_LD=$ac_cv_path_BUILD_LD
39898if test -n "$BUILD_LD"; then
39899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39900$as_echo "$BUILD_LD" >&6; }
39901else
39902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39903$as_echo "no" >&6; }
39904fi
39905
39906
39907  test -n "$BUILD_LD" && break
39908done
39909
39910  else
39911    # The variable is set, but is it from the command line or the environment?
39912
39913    # Try to remove the string !BUILD_LD! from our list.
39914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39916      # If it failed, the variable was not from the command line. Ignore it,
39917      # but warn the user (except for BASH, which is always set by the calling BASH).
39918      if test "xBUILD_LD" != xBASH; then
39919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39920$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39921      fi
39922      # Try to locate tool using the code snippet
39923      for ac_prog in ld
39924do
39925  # Extract the first word of "$ac_prog", so it can be a program name with args.
39926set dummy $ac_prog; ac_word=$2
39927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39928$as_echo_n "checking for $ac_word... " >&6; }
39929if ${ac_cv_path_BUILD_LD+:} false; then :
39930  $as_echo_n "(cached) " >&6
39931else
39932  case $BUILD_LD in
39933  [\\/]* | ?:[\\/]*)
39934  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39935  ;;
39936  *)
39937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39938for as_dir in $PATH
39939do
39940  IFS=$as_save_IFS
39941  test -z "$as_dir" && as_dir=.
39942    for ac_exec_ext in '' $ac_executable_extensions; do
39943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39944    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39946    break 2
39947  fi
39948done
39949  done
39950IFS=$as_save_IFS
39951
39952  ;;
39953esac
39954fi
39955BUILD_LD=$ac_cv_path_BUILD_LD
39956if test -n "$BUILD_LD"; then
39957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39958$as_echo "$BUILD_LD" >&6; }
39959else
39960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39961$as_echo "no" >&6; }
39962fi
39963
39964
39965  test -n "$BUILD_LD" && break
39966done
39967
39968    else
39969      # If it succeeded, then it was overridden by the user. We will use it
39970      # for the tool.
39971
39972      # First remove it from the list of overridden variables, so we can test
39973      # for unknown variables in the end.
39974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39975
39976      # Check if the provided tool contains a complete path.
39977      tool_specified="$BUILD_LD"
39978      tool_basename="${tool_specified##*/}"
39979      if test "x$tool_basename" = "x$tool_specified"; then
39980        # A command without a complete path is provided, search $PATH.
39981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39982$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39983        # Extract the first word of "$tool_basename", so it can be a program name with args.
39984set dummy $tool_basename; ac_word=$2
39985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39986$as_echo_n "checking for $ac_word... " >&6; }
39987if ${ac_cv_path_BUILD_LD+:} false; then :
39988  $as_echo_n "(cached) " >&6
39989else
39990  case $BUILD_LD in
39991  [\\/]* | ?:[\\/]*)
39992  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39993  ;;
39994  *)
39995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39996for as_dir in $PATH
39997do
39998  IFS=$as_save_IFS
39999  test -z "$as_dir" && as_dir=.
40000    for ac_exec_ext in '' $ac_executable_extensions; do
40001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40002    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40004    break 2
40005  fi
40006done
40007  done
40008IFS=$as_save_IFS
40009
40010  ;;
40011esac
40012fi
40013BUILD_LD=$ac_cv_path_BUILD_LD
40014if test -n "$BUILD_LD"; then
40015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40016$as_echo "$BUILD_LD" >&6; }
40017else
40018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40019$as_echo "no" >&6; }
40020fi
40021
40022
40023        if test "x$BUILD_LD" = x; then
40024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40025        fi
40026      else
40027        # Otherwise we believe it is a complete path. Use it as it is.
40028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40029$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40031$as_echo_n "checking for BUILD_LD... " >&6; }
40032        if test ! -x "$tool_specified"; then
40033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40034$as_echo "not found" >&6; }
40035          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40036        fi
40037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40038$as_echo "$tool_specified" >&6; }
40039      fi
40040    fi
40041  fi
40042
40043
40044
40045  # Only process if variable expands to non-empty
40046
40047  if test "x$BUILD_LD" != x; then
40048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40049
40050  # First separate the path from the arguments. This will split at the first
40051  # space.
40052  complete="$BUILD_LD"
40053  path="${complete%% *}"
40054  tmp="$complete EOL"
40055  arguments="${tmp#* }"
40056
40057  # Input might be given as Windows format, start by converting to
40058  # unix format.
40059  new_path=`$CYGPATH -u "$path"`
40060
40061  # Now try to locate executable using which
40062  new_path=`$WHICH "$new_path" 2> /dev/null`
40063  # bat and cmd files are not always considered executable in cygwin causing which
40064  # to not find them
40065  if test "x$new_path" = x \
40066      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40067      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40068    new_path=`$CYGPATH -u "$path"`
40069  fi
40070  if test "x$new_path" = x; then
40071    # Oops. Which didn't find the executable.
40072    # The splitting of arguments from the executable at a space might have been incorrect,
40073    # since paths with space are more likely in Windows. Give it another try with the whole
40074    # argument.
40075    path="$complete"
40076    arguments="EOL"
40077    new_path=`$CYGPATH -u "$path"`
40078    new_path=`$WHICH "$new_path" 2> /dev/null`
40079    # bat and cmd files are not always considered executable in cygwin causing which
40080    # to not find them
40081    if test "x$new_path" = x \
40082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40084      new_path=`$CYGPATH -u "$path"`
40085    fi
40086    if test "x$new_path" = x; then
40087      # It's still not found. Now this is an unrecoverable error.
40088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40089$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40090      has_space=`$ECHO "$complete" | $GREP " "`
40091      if test "x$has_space" != x; then
40092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40094      fi
40095      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40096    fi
40097  fi
40098
40099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40102  # "foo.exe" is OK but "foo" is an error.
40103  #
40104  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40105  # It is also a way to make sure we got the proper file name for the real test later on.
40106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40107  if test "x$test_shortpath" = x; then
40108    # Short path failed, file does not exist as specified.
40109    # Try adding .exe or .cmd
40110    if test -f "${new_path}.exe"; then
40111      input_to_shortpath="${new_path}.exe"
40112    elif test -f "${new_path}.cmd"; then
40113      input_to_shortpath="${new_path}.cmd"
40114    else
40115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40116$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40119      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40120    fi
40121  else
40122    input_to_shortpath="$new_path"
40123  fi
40124
40125  # Call helper function which possibly converts this using DOS-style short mode.
40126  # If so, the updated path is stored in $new_path.
40127  new_path="$input_to_shortpath"
40128
40129  input_path="$input_to_shortpath"
40130  # Check if we need to convert this using DOS-style short mode. If the path
40131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40132  # take no chances and rewrite it.
40133  # Note: m4 eats our [], so we need to use [ and ] instead.
40134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40135  if test "x$has_forbidden_chars" != x; then
40136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40140      # Going to short mode and back again did indeed matter. Since short mode is
40141      # case insensitive, let's make it lowercase to improve readability.
40142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40143      # Now convert it back to Unix-style (cygpath)
40144      input_path=`$CYGPATH -u "$shortmode_path"`
40145      new_path="$input_path"
40146    fi
40147  fi
40148
40149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40150  if test "x$test_cygdrive_prefix" = x; then
40151    # As a simple fix, exclude /usr/bin since it's not a real path.
40152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40154      # a path prefixed by /cygdrive for fixpath to work.
40155      new_path="$CYGWIN_ROOT_PATH$input_path"
40156    fi
40157  fi
40158
40159  # remove trailing .exe if any
40160  new_path="${new_path/%.exe/}"
40161
40162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40163
40164  # First separate the path from the arguments. This will split at the first
40165  # space.
40166  complete="$BUILD_LD"
40167  path="${complete%% *}"
40168  tmp="$complete EOL"
40169  arguments="${tmp#* }"
40170
40171  # Input might be given as Windows format, start by converting to
40172  # unix format.
40173  new_path="$path"
40174
40175  windows_path="$new_path"
40176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40177    unix_path=`$CYGPATH -u "$windows_path"`
40178    new_path="$unix_path"
40179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40181    new_path="$unix_path"
40182  fi
40183
40184
40185  # Now try to locate executable using which
40186  new_path=`$WHICH "$new_path" 2> /dev/null`
40187
40188  if test "x$new_path" = x; then
40189    # Oops. Which didn't find the executable.
40190    # The splitting of arguments from the executable at a space might have been incorrect,
40191    # since paths with space are more likely in Windows. Give it another try with the whole
40192    # argument.
40193    path="$complete"
40194    arguments="EOL"
40195    new_path="$path"
40196
40197  windows_path="$new_path"
40198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40199    unix_path=`$CYGPATH -u "$windows_path"`
40200    new_path="$unix_path"
40201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40203    new_path="$unix_path"
40204  fi
40205
40206
40207    new_path=`$WHICH "$new_path" 2> /dev/null`
40208    # bat and cmd files are not always considered executable in MSYS causing which
40209    # to not find them
40210    if test "x$new_path" = x \
40211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40213      new_path="$path"
40214
40215  windows_path="$new_path"
40216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40217    unix_path=`$CYGPATH -u "$windows_path"`
40218    new_path="$unix_path"
40219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40221    new_path="$unix_path"
40222  fi
40223
40224    fi
40225
40226    if test "x$new_path" = x; then
40227      # It's still not found. Now this is an unrecoverable error.
40228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40229$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40230      has_space=`$ECHO "$complete" | $GREP " "`
40231      if test "x$has_space" != x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40234      fi
40235      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40236    fi
40237  fi
40238
40239  # Now new_path has a complete unix path to the binary
40240  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40241    # Keep paths in /bin as-is, but remove trailing .exe if any
40242    new_path="${new_path/%.exe/}"
40243    # Do not save /bin paths to all_fixpath_prefixes!
40244  else
40245    # Not in mixed or Windows style, start by that.
40246    new_path=`cmd //c echo $new_path`
40247
40248  input_path="$new_path"
40249  # Check if we need to convert this using DOS-style short mode. If the path
40250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40251  # take no chances and rewrite it.
40252  # Note: m4 eats our [], so we need to use [ and ] instead.
40253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40254  if test "x$has_forbidden_chars" != x; then
40255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40257  fi
40258
40259    # Output is in $new_path
40260
40261  windows_path="$new_path"
40262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40263    unix_path=`$CYGPATH -u "$windows_path"`
40264    new_path="$unix_path"
40265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40267    new_path="$unix_path"
40268  fi
40269
40270    # remove trailing .exe if any
40271    new_path="${new_path/%.exe/}"
40272
40273    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40274    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40275  fi
40276
40277    else
40278      # We're on a unix platform. Hooray! :)
40279      # First separate the path from the arguments. This will split at the first
40280      # space.
40281      complete="$BUILD_LD"
40282      path="${complete%% *}"
40283      tmp="$complete EOL"
40284      arguments="${tmp#* }"
40285
40286      # Cannot rely on the command "which" here since it doesn't always work.
40287      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40288      if test -z "$is_absolute_path"; then
40289        # Path to executable is not absolute. Find it.
40290        IFS_save="$IFS"
40291        IFS=:
40292        for p in $PATH; do
40293          if test -f "$p/$path" && test -x "$p/$path"; then
40294            new_path="$p/$path"
40295            break
40296          fi
40297        done
40298        IFS="$IFS_save"
40299      else
40300        # This is an absolute path, we can use it without further modifications.
40301        new_path="$path"
40302      fi
40303
40304      if test "x$new_path" = x; then
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40306$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40307        has_space=`$ECHO "$complete" | $GREP " "`
40308        if test "x$has_space" != x; then
40309          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40310$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40311        fi
40312        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40313      fi
40314    fi
40315
40316    # Now join together the path and the arguments once again
40317    if test "x$arguments" != xEOL; then
40318      new_complete="$new_path ${arguments% *}"
40319    else
40320      new_complete="$new_path"
40321    fi
40322
40323    if test "x$complete" != "x$new_complete"; then
40324      BUILD_LD="$new_complete"
40325      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40326$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40327    fi
40328  fi
40329
40330  else
40331    # If we are not cross compiling, use the normal target compilers for
40332    # building the build platform executables.
40333    BUILD_CC="$CC"
40334    BUILD_CXX="$CXX"
40335    BUILD_LD="$LD"
40336  fi
40337
40338
40339
40340
40341
40342
40343  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40344    # For hotspot, we need these in Windows mixed path,
40345    # so rewrite them all. Need added .exe suffix.
40346    HOTSPOT_CXX="$CXX.exe"
40347    HOTSPOT_LD="$LD.exe"
40348    HOTSPOT_MT="$MT.exe"
40349    HOTSPOT_RC="$RC.exe"
40350
40351  unix_path="$HOTSPOT_CXX"
40352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40353    windows_path=`$CYGPATH -m "$unix_path"`
40354    HOTSPOT_CXX="$windows_path"
40355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40356    windows_path=`cmd //c echo $unix_path`
40357    HOTSPOT_CXX="$windows_path"
40358  fi
40359
40360
40361  unix_path="$HOTSPOT_LD"
40362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40363    windows_path=`$CYGPATH -m "$unix_path"`
40364    HOTSPOT_LD="$windows_path"
40365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40366    windows_path=`cmd //c echo $unix_path`
40367    HOTSPOT_LD="$windows_path"
40368  fi
40369
40370
40371  unix_path="$HOTSPOT_MT"
40372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40373    windows_path=`$CYGPATH -m "$unix_path"`
40374    HOTSPOT_MT="$windows_path"
40375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40376    windows_path=`cmd //c echo $unix_path`
40377    HOTSPOT_MT="$windows_path"
40378  fi
40379
40380
40381  unix_path="$HOTSPOT_RC"
40382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383    windows_path=`$CYGPATH -m "$unix_path"`
40384    HOTSPOT_RC="$windows_path"
40385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386    windows_path=`cmd //c echo $unix_path`
40387    HOTSPOT_RC="$windows_path"
40388  fi
40389
40390
40391
40392  else
40393    HOTSPOT_CXX="$CXX"
40394    HOTSPOT_LD="$LD"
40395  fi
40396
40397
40398
40399  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40400    USE_CLANG=true
40401  fi
40402
40403
40404
40405
40406
40407  # The package path is used only on macosx?
40408  # FIXME: clean this up, and/or move it elsewhere.
40409  PACKAGE_PATH=/opt/local
40410
40411
40412  # Check for extra potential brokenness.
40413  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40414    # On Windows, double-check that we got the right compiler.
40415    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40416    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40417    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40418      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40419        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
40420      fi
40421    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40422      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40423        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40424      fi
40425    fi
40426  fi
40427
40428  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40429    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40430    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40431    # This is later checked when setting flags.
40432
40433    # "-Og" suppported for GCC 4.8 and later
40434    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40435
40436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40437$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40438  supports=yes
40439
40440  saved_cflags="$CFLAGS"
40441  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40442  ac_ext=c
40443ac_cpp='$CPP $CPPFLAGS'
40444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40446ac_compiler_gnu=$ac_cv_c_compiler_gnu
40447
40448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40449/* end confdefs.h.  */
40450int i;
40451_ACEOF
40452if ac_fn_c_try_compile "$LINENO"; then :
40453
40454else
40455  supports=no
40456fi
40457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40458  ac_ext=cpp
40459ac_cpp='$CXXCPP $CPPFLAGS'
40460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40463
40464  CFLAGS="$saved_cflags"
40465
40466  saved_cxxflags="$CXXFLAGS"
40467  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40468  ac_ext=cpp
40469ac_cpp='$CXXCPP $CPPFLAGS'
40470ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40471ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40472ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40473
40474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40475/* end confdefs.h.  */
40476int i;
40477_ACEOF
40478if ac_fn_cxx_try_compile "$LINENO"; then :
40479
40480else
40481  supports=no
40482fi
40483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40484  ac_ext=cpp
40485ac_cpp='$CXXCPP $CPPFLAGS'
40486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40489
40490  CXXFLAGS="$saved_cxxflags"
40491
40492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40493$as_echo "$supports" >&6; }
40494  if test "x$supports" = "xyes" ; then
40495    HAS_CFLAG_OPTIMIZE_DEBUG=true
40496  else
40497    HAS_CFLAG_OPTIMIZE_DEBUG=false
40498  fi
40499
40500
40501    # "-z relro" supported in GNU binutils 2.17 and later
40502    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40503
40504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40505$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40506  supports=yes
40507
40508  saved_ldflags="$LDFLAGS"
40509  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40510  ac_ext=c
40511ac_cpp='$CPP $CPPFLAGS'
40512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40514ac_compiler_gnu=$ac_cv_c_compiler_gnu
40515
40516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40517/* end confdefs.h.  */
40518
40519int
40520main ()
40521{
40522
40523  ;
40524  return 0;
40525}
40526_ACEOF
40527if ac_fn_c_try_link "$LINENO"; then :
40528
40529else
40530  supports=no
40531fi
40532rm -f core conftest.err conftest.$ac_objext \
40533    conftest$ac_exeext conftest.$ac_ext
40534  ac_ext=cpp
40535ac_cpp='$CXXCPP $CPPFLAGS'
40536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40539
40540  LDFLAGS="$saved_ldflags"
40541
40542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40543$as_echo "$supports" >&6; }
40544  if test "x$supports" = "xyes" ; then
40545    HAS_LINKER_RELRO=true
40546  else
40547    HAS_LINKER_RELRO=false
40548  fi
40549
40550
40551    # "-z now" supported in GNU binutils 2.11 and later
40552    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40553
40554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40555$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40556  supports=yes
40557
40558  saved_ldflags="$LDFLAGS"
40559  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40560  ac_ext=c
40561ac_cpp='$CPP $CPPFLAGS'
40562ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40563ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40564ac_compiler_gnu=$ac_cv_c_compiler_gnu
40565
40566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40567/* end confdefs.h.  */
40568
40569int
40570main ()
40571{
40572
40573  ;
40574  return 0;
40575}
40576_ACEOF
40577if ac_fn_c_try_link "$LINENO"; then :
40578
40579else
40580  supports=no
40581fi
40582rm -f core conftest.err conftest.$ac_objext \
40583    conftest$ac_exeext conftest.$ac_ext
40584  ac_ext=cpp
40585ac_cpp='$CXXCPP $CPPFLAGS'
40586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40589
40590  LDFLAGS="$saved_ldflags"
40591
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40593$as_echo "$supports" >&6; }
40594  if test "x$supports" = "xyes" ; then
40595    HAS_LINKER_NOW=true
40596  else
40597    HAS_LINKER_NOW=false
40598  fi
40599
40600  fi
40601
40602  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40603  # in executable.'
40604  USING_BROKEN_SUSE_LD=no
40605  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40607$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40608    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40609    $ECHO "int main() { }" > main.c
40610    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40612$as_echo "no" >&6; }
40613      USING_BROKEN_SUSE_LD=no
40614    else
40615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40616$as_echo "yes" >&6; }
40617      USING_BROKEN_SUSE_LD=yes
40618    fi
40619    rm -rf version-script.map main.c a.out
40620  fi
40621
40622
40623
40624# Setup the JTReg Regression Test Harness.
40625
40626
40627# Check whether --with-jtreg was given.
40628if test "${with_jtreg+set}" = set; then :
40629  withval=$with_jtreg;
40630else
40631  with_jtreg=no
40632fi
40633
40634
40635  if test "x$with_jtreg" = xno; then
40636    # jtreg disabled
40637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40638$as_echo_n "checking for jtreg... " >&6; }
40639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40640$as_echo "no" >&6; }
40641  else
40642    if test "x$with_jtreg" != xyes; then
40643      # with path specified.
40644      JT_HOME="$with_jtreg"
40645    fi
40646
40647    if test "x$JT_HOME" != x; then
40648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40649$as_echo_n "checking for jtreg... " >&6; }
40650
40651      # use JT_HOME enviroment var.
40652
40653  # Only process if variable expands to non-empty
40654
40655  if test "x$JT_HOME" != x; then
40656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40657
40658  # Input might be given as Windows format, start by converting to
40659  # unix format.
40660  path="$JT_HOME"
40661  new_path=`$CYGPATH -u "$path"`
40662
40663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40666  # "foo.exe" is OK but "foo" is an error.
40667  #
40668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40669  # It is also a way to make sure we got the proper file name for the real test later on.
40670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40671  if test "x$test_shortpath" = x; then
40672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40673$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40674    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40675  fi
40676
40677  # Call helper function which possibly converts this using DOS-style short mode.
40678  # If so, the updated path is stored in $new_path.
40679
40680  input_path="$new_path"
40681  # Check if we need to convert this using DOS-style short mode. If the path
40682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40683  # take no chances and rewrite it.
40684  # Note: m4 eats our [], so we need to use [ and ] instead.
40685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40686  if test "x$has_forbidden_chars" != x; then
40687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40691      # Going to short mode and back again did indeed matter. Since short mode is
40692      # case insensitive, let's make it lowercase to improve readability.
40693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40694      # Now convert it back to Unix-style (cygpath)
40695      input_path=`$CYGPATH -u "$shortmode_path"`
40696      new_path="$input_path"
40697    fi
40698  fi
40699
40700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40701  if test "x$test_cygdrive_prefix" = x; then
40702    # As a simple fix, exclude /usr/bin since it's not a real path.
40703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40705      # a path prefixed by /cygdrive for fixpath to work.
40706      new_path="$CYGWIN_ROOT_PATH$input_path"
40707    fi
40708  fi
40709
40710
40711  if test "x$path" != "x$new_path"; then
40712    JT_HOME="$new_path"
40713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40714$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40715  fi
40716
40717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40718
40719  path="$JT_HOME"
40720  has_colon=`$ECHO $path | $GREP ^.:`
40721  new_path="$path"
40722  if test "x$has_colon" = x; then
40723    # Not in mixed or Windows style, start by that.
40724    new_path=`cmd //c echo $path`
40725  fi
40726
40727
40728  input_path="$new_path"
40729  # Check if we need to convert this using DOS-style short mode. If the path
40730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40731  # take no chances and rewrite it.
40732  # Note: m4 eats our [], so we need to use [ and ] instead.
40733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40734  if test "x$has_forbidden_chars" != x; then
40735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40737  fi
40738
40739
40740  windows_path="$new_path"
40741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40742    unix_path=`$CYGPATH -u "$windows_path"`
40743    new_path="$unix_path"
40744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40746    new_path="$unix_path"
40747  fi
40748
40749  if test "x$path" != "x$new_path"; then
40750    JT_HOME="$new_path"
40751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40752$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40753  fi
40754
40755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40757
40758    else
40759      # We're on a unix platform. Hooray! :)
40760      path="$JT_HOME"
40761      has_space=`$ECHO "$path" | $GREP " "`
40762      if test "x$has_space" != x; then
40763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40764$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40766      fi
40767
40768      # Use eval to expand a potential ~
40769      eval path="$path"
40770      if test ! -f "$path" && test ! -d "$path"; then
40771        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40772      fi
40773
40774      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40775    fi
40776  fi
40777
40778
40779      # jtreg win32 script works for everybody
40780      JTREGEXE="$JT_HOME/bin/jtreg"
40781
40782      if test ! -f "$JTREGEXE"; then
40783        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40784      fi
40785
40786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40787$as_echo "$JTREGEXE" >&6; }
40788    else
40789      # try to find jtreg on path
40790
40791
40792
40793  # Publish this variable in the help.
40794
40795
40796  if test "x$JTREGEXE" = x; then
40797    # The variable is not set by user, try to locate tool using the code snippet
40798    for ac_prog in jtreg
40799do
40800  # Extract the first word of "$ac_prog", so it can be a program name with args.
40801set dummy $ac_prog; ac_word=$2
40802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40803$as_echo_n "checking for $ac_word... " >&6; }
40804if ${ac_cv_path_JTREGEXE+:} false; then :
40805  $as_echo_n "(cached) " >&6
40806else
40807  case $JTREGEXE in
40808  [\\/]* | ?:[\\/]*)
40809  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40810  ;;
40811  *)
40812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40813for as_dir in $PATH
40814do
40815  IFS=$as_save_IFS
40816  test -z "$as_dir" && as_dir=.
40817    for ac_exec_ext in '' $ac_executable_extensions; do
40818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40819    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40821    break 2
40822  fi
40823done
40824  done
40825IFS=$as_save_IFS
40826
40827  ;;
40828esac
40829fi
40830JTREGEXE=$ac_cv_path_JTREGEXE
40831if test -n "$JTREGEXE"; then
40832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40833$as_echo "$JTREGEXE" >&6; }
40834else
40835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40836$as_echo "no" >&6; }
40837fi
40838
40839
40840  test -n "$JTREGEXE" && break
40841done
40842
40843  else
40844    # The variable is set, but is it from the command line or the environment?
40845
40846    # Try to remove the string !JTREGEXE! from our list.
40847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40849      # If it failed, the variable was not from the command line. Ignore it,
40850      # but warn the user (except for BASH, which is always set by the calling BASH).
40851      if test "xJTREGEXE" != xBASH; then
40852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40853$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40854      fi
40855      # Try to locate tool using the code snippet
40856      for ac_prog in jtreg
40857do
40858  # Extract the first word of "$ac_prog", so it can be a program name with args.
40859set dummy $ac_prog; ac_word=$2
40860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40861$as_echo_n "checking for $ac_word... " >&6; }
40862if ${ac_cv_path_JTREGEXE+:} false; then :
40863  $as_echo_n "(cached) " >&6
40864else
40865  case $JTREGEXE in
40866  [\\/]* | ?:[\\/]*)
40867  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40868  ;;
40869  *)
40870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40871for as_dir in $PATH
40872do
40873  IFS=$as_save_IFS
40874  test -z "$as_dir" && as_dir=.
40875    for ac_exec_ext in '' $ac_executable_extensions; do
40876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40877    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40879    break 2
40880  fi
40881done
40882  done
40883IFS=$as_save_IFS
40884
40885  ;;
40886esac
40887fi
40888JTREGEXE=$ac_cv_path_JTREGEXE
40889if test -n "$JTREGEXE"; then
40890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40891$as_echo "$JTREGEXE" >&6; }
40892else
40893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40894$as_echo "no" >&6; }
40895fi
40896
40897
40898  test -n "$JTREGEXE" && break
40899done
40900
40901    else
40902      # If it succeeded, then it was overridden by the user. We will use it
40903      # for the tool.
40904
40905      # First remove it from the list of overridden variables, so we can test
40906      # for unknown variables in the end.
40907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40908
40909      # Check if the provided tool contains a complete path.
40910      tool_specified="$JTREGEXE"
40911      tool_basename="${tool_specified##*/}"
40912      if test "x$tool_basename" = "x$tool_specified"; then
40913        # A command without a complete path is provided, search $PATH.
40914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40915$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40916        # Extract the first word of "$tool_basename", so it can be a program name with args.
40917set dummy $tool_basename; ac_word=$2
40918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40919$as_echo_n "checking for $ac_word... " >&6; }
40920if ${ac_cv_path_JTREGEXE+:} false; then :
40921  $as_echo_n "(cached) " >&6
40922else
40923  case $JTREGEXE in
40924  [\\/]* | ?:[\\/]*)
40925  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40926  ;;
40927  *)
40928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40929for as_dir in $PATH
40930do
40931  IFS=$as_save_IFS
40932  test -z "$as_dir" && as_dir=.
40933    for ac_exec_ext in '' $ac_executable_extensions; do
40934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40935    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40937    break 2
40938  fi
40939done
40940  done
40941IFS=$as_save_IFS
40942
40943  ;;
40944esac
40945fi
40946JTREGEXE=$ac_cv_path_JTREGEXE
40947if test -n "$JTREGEXE"; then
40948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40949$as_echo "$JTREGEXE" >&6; }
40950else
40951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40952$as_echo "no" >&6; }
40953fi
40954
40955
40956        if test "x$JTREGEXE" = x; then
40957          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40958        fi
40959      else
40960        # Otherwise we believe it is a complete path. Use it as it is.
40961        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40962$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40964$as_echo_n "checking for JTREGEXE... " >&6; }
40965        if test ! -x "$tool_specified"; then
40966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40967$as_echo "not found" >&6; }
40968          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40969        fi
40970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40971$as_echo "$tool_specified" >&6; }
40972      fi
40973    fi
40974  fi
40975
40976
40977
40978  if test "x$JTREGEXE" = x; then
40979    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40980  fi
40981
40982
40983      JT_HOME="`$DIRNAME $JTREGEXE`"
40984    fi
40985  fi
40986
40987
40988
40989
40990
40991
40992  # Option used to tell the compiler whether to create 32- or 64-bit executables
40993  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40994    COMPILER_TARGET_BITS_FLAG="-q"
40995  else
40996    COMPILER_TARGET_BITS_FLAG="-m"
40997  fi
40998
40999
41000  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41001  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41002    ARFLAGS="-r"
41003  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41004    ARFLAGS="-X64"
41005  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41006    # lib.exe is used as AR to create static libraries.
41007    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41008  else
41009    ARFLAGS=""
41010  fi
41011
41012
41013  ## Setup strip.
41014  # FIXME: should this really be per platform, or should it be per toolchain type?
41015  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41016  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41017  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41018    STRIPFLAGS="-g"
41019  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41020    STRIPFLAGS="-x"
41021  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41022    STRIPFLAGS="-S"
41023  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41024    STRIPFLAGS="-X32_64"
41025  fi
41026
41027  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41028    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41029  fi
41030
41031
41032  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41033    CC_OUT_OPTION=-Fo
41034    EXE_OUT_OPTION=-out:
41035    LD_OUT_OPTION=-out:
41036    AR_OUT_OPTION=-out:
41037  else
41038    # The option used to specify the target .o,.a or .so file.
41039    # When compiling, how to specify the to be created object file.
41040    CC_OUT_OPTION='-o$(SPACE)'
41041    # When linking, how to specify the to be created executable.
41042    EXE_OUT_OPTION='-o$(SPACE)'
41043    # When linking, how to specify the to be created dynamically linkable library.
41044    LD_OUT_OPTION='-o$(SPACE)'
41045    # When archiving, how to specify the to be create static archive for object files.
41046    AR_OUT_OPTION='rcs$(SPACE)'
41047  fi
41048
41049
41050
41051
41052
41053  # On Windows, we need to set RC flags.
41054  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41055    RC_FLAGS="-nologo -l0x409"
41056    if test "x$VARIANT" = xOPT; then
41057      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41058    fi
41059
41060    # The version variables used to create RC_FLAGS may be overridden
41061    # in a custom configure script, or possibly the command line.
41062    # Let those variables be expanded at make time in spec.gmk.
41063    # The \$ are escaped to the shell, and the $(...) variables
41064    # are evaluated by make.
41065    RC_FLAGS="$RC_FLAGS \
41066        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41067        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41068        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41069        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41070        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41071        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41072        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41073  fi
41074
41075
41076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41077    # silence copyright notice and other headers.
41078    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41079  fi
41080
41081  if test "x$SYSROOT" != "x"; then
41082    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41083      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41084        # Solaris Studio does not have a concept of sysroot. Instead we must
41085        # make sure the default include and lib dirs are appended to each
41086        # compile and link command line.
41087        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41088        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41089            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41090            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41091      fi
41092    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41093      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41094      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41095      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41096    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41097      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41098      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41099    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41100      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41101      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41102    fi
41103    # Propagate the sysroot args to hotspot
41104    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41105    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41106    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41107  fi
41108
41109  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41110  # set this here so it doesn't have to be peppered throughout the forest
41111  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41112    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41113    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41114  fi
41115
41116
41117
41118
41119
41120# FIXME: Currently we must test this after toolchain but before flags. Fix!
41121
41122# Now we can test some aspects on the target using configure macros.
41123
41124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41125$as_echo_n "checking for ANSI C header files... " >&6; }
41126if ${ac_cv_header_stdc+:} false; then :
41127  $as_echo_n "(cached) " >&6
41128else
41129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41130/* end confdefs.h.  */
41131#include <stdlib.h>
41132#include <stdarg.h>
41133#include <string.h>
41134#include <float.h>
41135
41136int
41137main ()
41138{
41139
41140  ;
41141  return 0;
41142}
41143_ACEOF
41144if ac_fn_cxx_try_compile "$LINENO"; then :
41145  ac_cv_header_stdc=yes
41146else
41147  ac_cv_header_stdc=no
41148fi
41149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41150
41151if test $ac_cv_header_stdc = yes; then
41152  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41154/* end confdefs.h.  */
41155#include <string.h>
41156
41157_ACEOF
41158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41159  $EGREP "memchr" >/dev/null 2>&1; then :
41160
41161else
41162  ac_cv_header_stdc=no
41163fi
41164rm -f conftest*
41165
41166fi
41167
41168if test $ac_cv_header_stdc = yes; then
41169  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41171/* end confdefs.h.  */
41172#include <stdlib.h>
41173
41174_ACEOF
41175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41176  $EGREP "free" >/dev/null 2>&1; then :
41177
41178else
41179  ac_cv_header_stdc=no
41180fi
41181rm -f conftest*
41182
41183fi
41184
41185if test $ac_cv_header_stdc = yes; then
41186  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41187  if test "$cross_compiling" = yes; then :
41188  :
41189else
41190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41191/* end confdefs.h.  */
41192#include <ctype.h>
41193#include <stdlib.h>
41194#if ((' ' & 0x0FF) == 0x020)
41195# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41196# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41197#else
41198# define ISLOWER(c) \
41199		   (('a' <= (c) && (c) <= 'i') \
41200		     || ('j' <= (c) && (c) <= 'r') \
41201		     || ('s' <= (c) && (c) <= 'z'))
41202# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41203#endif
41204
41205#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41206int
41207main ()
41208{
41209  int i;
41210  for (i = 0; i < 256; i++)
41211    if (XOR (islower (i), ISLOWER (i))
41212	|| toupper (i) != TOUPPER (i))
41213      return 2;
41214  return 0;
41215}
41216_ACEOF
41217if ac_fn_cxx_try_run "$LINENO"; then :
41218
41219else
41220  ac_cv_header_stdc=no
41221fi
41222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41223  conftest.$ac_objext conftest.beam conftest.$ac_ext
41224fi
41225
41226fi
41227fi
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41229$as_echo "$ac_cv_header_stdc" >&6; }
41230if test $ac_cv_header_stdc = yes; then
41231
41232$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41233
41234fi
41235
41236# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41237for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41238		  inttypes.h stdint.h unistd.h
41239do :
41240  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41241ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41242"
41243if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41244  cat >>confdefs.h <<_ACEOF
41245#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41246_ACEOF
41247
41248fi
41249
41250done
41251
41252
41253
41254  ###############################################################################
41255  #
41256  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41257  # (The JVM can use 32 or 64 bit Java pointers but that decision
41258  # is made at runtime.)
41259  #
41260
41261  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41262    # Always specify -m flag on Solaris
41263    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41264
41265  # When we add flags to the "official" CFLAGS etc, we need to
41266  # keep track of these additions in ADDED_CFLAGS etc. These
41267  # will later be checked to make sure only controlled additions
41268  # have been made to CFLAGS etc.
41269  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41270  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41271  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41272
41273  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41274  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41275  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41276
41277  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41278  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41279  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41280
41281  elif test "x$COMPILE_TYPE" = xreduced; then
41282    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41283      # Specify -m if running reduced on unix platforms
41284
41285  # When we add flags to the "official" CFLAGS etc, we need to
41286  # keep track of these additions in ADDED_CFLAGS etc. These
41287  # will later be checked to make sure only controlled additions
41288  # have been made to CFLAGS etc.
41289  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41290  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41291  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41292
41293  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41294  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41295  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41296
41297  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41298  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41299  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41300
41301    fi
41302  fi
41303
41304  # Make compilation sanity check
41305  for ac_header in stdio.h
41306do :
41307  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41308if test "x$ac_cv_header_stdio_h" = xyes; then :
41309  cat >>confdefs.h <<_ACEOF
41310#define HAVE_STDIO_H 1
41311_ACEOF
41312
41313else
41314
41315    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41316$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41317    if test "x$COMPILE_TYPE" = xreduced; then
41318      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41319$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41320    elif test "x$COMPILE_TYPE" = xcross; then
41321      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41322$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41323    fi
41324    as_fn_error $? "Cannot continue." "$LINENO" 5
41325
41326fi
41327
41328done
41329
41330
41331  # The cast to long int works around a bug in the HP C Compiler
41332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41334# This bug is HP SR number 8606223364.
41335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41336$as_echo_n "checking size of int *... " >&6; }
41337if ${ac_cv_sizeof_int_p+:} false; then :
41338  $as_echo_n "(cached) " >&6
41339else
41340  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41341
41342else
41343  if test "$ac_cv_type_int_p" = yes; then
41344     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41346as_fn_error 77 "cannot compute sizeof (int *)
41347See \`config.log' for more details" "$LINENO" 5; }
41348   else
41349     ac_cv_sizeof_int_p=0
41350   fi
41351fi
41352
41353fi
41354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41355$as_echo "$ac_cv_sizeof_int_p" >&6; }
41356
41357
41358
41359cat >>confdefs.h <<_ACEOF
41360#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41361_ACEOF
41362
41363
41364
41365  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41366  if test "x$ac_cv_sizeof_int_p" = x; then
41367    # The test failed, lets stick to the assumed value.
41368    { $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
41369$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41370  else
41371    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41372
41373    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41374      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41375      # Let's try to implicitely set the compilers target architecture and retry the test
41376      { $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
41377$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;}
41378      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41379$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41380
41381  # When we add flags to the "official" CFLAGS etc, we need to
41382  # keep track of these additions in ADDED_CFLAGS etc. These
41383  # will later be checked to make sure only controlled additions
41384  # have been made to CFLAGS etc.
41385  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41386  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41387  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41388
41389  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41390  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41391  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41392
41393  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41394  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41395  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41396
41397
41398      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41399      unset ac_cv_sizeof_int_p
41400      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41401      cat >>confdefs.h <<_ACEOF
41402#undef SIZEOF_INT_P
41403_ACEOF
41404
41405      # The cast to long int works around a bug in the HP C Compiler
41406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41408# This bug is HP SR number 8606223364.
41409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41410$as_echo_n "checking size of int *... " >&6; }
41411if ${ac_cv_sizeof_int_p+:} false; then :
41412  $as_echo_n "(cached) " >&6
41413else
41414  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41415
41416else
41417  if test "$ac_cv_type_int_p" = yes; then
41418     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41420as_fn_error 77 "cannot compute sizeof (int *)
41421See \`config.log' for more details" "$LINENO" 5; }
41422   else
41423     ac_cv_sizeof_int_p=0
41424   fi
41425fi
41426
41427fi
41428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41429$as_echo "$ac_cv_sizeof_int_p" >&6; }
41430
41431
41432
41433cat >>confdefs.h <<_ACEOF
41434#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41435_ACEOF
41436
41437
41438
41439      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41440
41441      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41442        as_fn_error $? "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)" "$LINENO" 5
41443      fi
41444    fi
41445  fi
41446
41447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41448$as_echo_n "checking for target address size... " >&6; }
41449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41450$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41451
41452
41453  ###############################################################################
41454  #
41455  # Is the target little of big endian?
41456  #
41457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41458$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41459if ${ac_cv_c_bigendian+:} false; then :
41460  $as_echo_n "(cached) " >&6
41461else
41462  ac_cv_c_bigendian=unknown
41463    # See if we're dealing with a universal compiler.
41464    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41465/* end confdefs.h.  */
41466#ifndef __APPLE_CC__
41467	       not a universal capable compiler
41468	     #endif
41469	     typedef int dummy;
41470
41471_ACEOF
41472if ac_fn_cxx_try_compile "$LINENO"; then :
41473
41474	# Check for potential -arch flags.  It is not universal unless
41475	# there are at least two -arch flags with different values.
41476	ac_arch=
41477	ac_prev=
41478	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41479	 if test -n "$ac_prev"; then
41480	   case $ac_word in
41481	     i?86 | x86_64 | ppc | ppc64)
41482	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41483		 ac_arch=$ac_word
41484	       else
41485		 ac_cv_c_bigendian=universal
41486		 break
41487	       fi
41488	       ;;
41489	   esac
41490	   ac_prev=
41491	 elif test "x$ac_word" = "x-arch"; then
41492	   ac_prev=arch
41493	 fi
41494       done
41495fi
41496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41497    if test $ac_cv_c_bigendian = unknown; then
41498      # See if sys/param.h defines the BYTE_ORDER macro.
41499      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41500/* end confdefs.h.  */
41501#include <sys/types.h>
41502	     #include <sys/param.h>
41503
41504int
41505main ()
41506{
41507#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41508		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41509		     && LITTLE_ENDIAN)
41510	      bogus endian macros
41511	     #endif
41512
41513  ;
41514  return 0;
41515}
41516_ACEOF
41517if ac_fn_cxx_try_compile "$LINENO"; then :
41518  # It does; now see whether it defined to BIG_ENDIAN or not.
41519	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41520/* end confdefs.h.  */
41521#include <sys/types.h>
41522		#include <sys/param.h>
41523
41524int
41525main ()
41526{
41527#if BYTE_ORDER != BIG_ENDIAN
41528		 not big endian
41529		#endif
41530
41531  ;
41532  return 0;
41533}
41534_ACEOF
41535if ac_fn_cxx_try_compile "$LINENO"; then :
41536  ac_cv_c_bigendian=yes
41537else
41538  ac_cv_c_bigendian=no
41539fi
41540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41541fi
41542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41543    fi
41544    if test $ac_cv_c_bigendian = unknown; then
41545      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41546      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41547/* end confdefs.h.  */
41548#include <limits.h>
41549
41550int
41551main ()
41552{
41553#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41554	      bogus endian macros
41555	     #endif
41556
41557  ;
41558  return 0;
41559}
41560_ACEOF
41561if ac_fn_cxx_try_compile "$LINENO"; then :
41562  # It does; now see whether it defined to _BIG_ENDIAN or not.
41563	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41564/* end confdefs.h.  */
41565#include <limits.h>
41566
41567int
41568main ()
41569{
41570#ifndef _BIG_ENDIAN
41571		 not big endian
41572		#endif
41573
41574  ;
41575  return 0;
41576}
41577_ACEOF
41578if ac_fn_cxx_try_compile "$LINENO"; then :
41579  ac_cv_c_bigendian=yes
41580else
41581  ac_cv_c_bigendian=no
41582fi
41583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41584fi
41585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41586    fi
41587    if test $ac_cv_c_bigendian = unknown; then
41588      # Compile a test program.
41589      if test "$cross_compiling" = yes; then :
41590  # Try to guess by grepping values from an object file.
41591	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41592/* end confdefs.h.  */
41593short int ascii_mm[] =
41594		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41595		short int ascii_ii[] =
41596		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41597		int use_ascii (int i) {
41598		  return ascii_mm[i] + ascii_ii[i];
41599		}
41600		short int ebcdic_ii[] =
41601		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41602		short int ebcdic_mm[] =
41603		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41604		int use_ebcdic (int i) {
41605		  return ebcdic_mm[i] + ebcdic_ii[i];
41606		}
41607		extern int foo;
41608
41609int
41610main ()
41611{
41612return use_ascii (foo) == use_ebcdic (foo);
41613  ;
41614  return 0;
41615}
41616_ACEOF
41617if ac_fn_cxx_try_compile "$LINENO"; then :
41618  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41619	      ac_cv_c_bigendian=yes
41620	    fi
41621	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41622	      if test "$ac_cv_c_bigendian" = unknown; then
41623		ac_cv_c_bigendian=no
41624	      else
41625		# finding both strings is unlikely to happen, but who knows?
41626		ac_cv_c_bigendian=unknown
41627	      fi
41628	    fi
41629fi
41630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41631else
41632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41633/* end confdefs.h.  */
41634$ac_includes_default
41635int
41636main ()
41637{
41638
41639	     /* Are we little or big endian?  From Harbison&Steele.  */
41640	     union
41641	     {
41642	       long int l;
41643	       char c[sizeof (long int)];
41644	     } u;
41645	     u.l = 1;
41646	     return u.c[sizeof (long int) - 1] == 1;
41647
41648  ;
41649  return 0;
41650}
41651_ACEOF
41652if ac_fn_cxx_try_run "$LINENO"; then :
41653  ac_cv_c_bigendian=no
41654else
41655  ac_cv_c_bigendian=yes
41656fi
41657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41658  conftest.$ac_objext conftest.beam conftest.$ac_ext
41659fi
41660
41661    fi
41662fi
41663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41664$as_echo "$ac_cv_c_bigendian" >&6; }
41665 case $ac_cv_c_bigendian in #(
41666   yes)
41667     ENDIAN="big";; #(
41668   no)
41669     ENDIAN="little" ;; #(
41670   universal)
41671     ENDIAN="universal_endianness"
41672     ;; #(
41673   *)
41674     ENDIAN="unknown" ;;
41675 esac
41676
41677
41678  if test "x$ENDIAN" = xuniversal_endianness; then
41679    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41680  fi
41681  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41682    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
41683  fi
41684
41685
41686# Configure flags for the tools
41687
41688  ###############################################################################
41689  #
41690  # How to compile shared libraries.
41691  #
41692
41693  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41694    PICFLAG="-fPIC"
41695    C_FLAG_REORDER=''
41696    CXX_FLAG_REORDER=''
41697
41698    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41699      # Linking is different on MacOSX
41700      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41701      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41702      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41703      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41704      SET_SHARED_LIBRARY_MAPFILE=''
41705    else
41706      # Default works for linux, might work on other platforms as well.
41707      SHARED_LIBRARY_FLAGS='-shared'
41708      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41709      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41710      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41711      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41712    fi
41713  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41714    PICFLAG=''
41715    C_FLAG_REORDER=''
41716    CXX_FLAG_REORDER=''
41717
41718    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41719      # Linking is different on MacOSX
41720      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41721      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41722      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41723      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41724      SET_SHARED_LIBRARY_MAPFILE=''
41725    else
41726      # Default works for linux, might work on other platforms as well.
41727      SHARED_LIBRARY_FLAGS='-shared'
41728      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41729      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41730      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41731      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41732    fi
41733  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41734    PICFLAG="-KPIC"
41735    C_FLAG_REORDER='-xF'
41736    CXX_FLAG_REORDER='-xF'
41737    SHARED_LIBRARY_FLAGS="-G"
41738    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41739    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41740    SET_SHARED_LIBRARY_NAME=''
41741    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41742  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41743    PICFLAG="-qpic=large"
41744    C_FLAG_REORDER=''
41745    CXX_FLAG_REORDER=''
41746    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41747    SET_EXECUTABLE_ORIGIN=""
41748    SET_SHARED_LIBRARY_ORIGIN=''
41749    SET_SHARED_LIBRARY_NAME=''
41750    SET_SHARED_LIBRARY_MAPFILE=''
41751  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41752    PICFLAG=""
41753    C_FLAG_REORDER=''
41754    CXX_FLAG_REORDER=''
41755    SHARED_LIBRARY_FLAGS="-LD"
41756    SET_EXECUTABLE_ORIGIN=''
41757    SET_SHARED_LIBRARY_ORIGIN=''
41758    SET_SHARED_LIBRARY_NAME=''
41759    SET_SHARED_LIBRARY_MAPFILE=''
41760  fi
41761
41762
41763
41764
41765
41766
41767
41768
41769  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41770    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41771    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41772    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41773  fi
41774  # The (cross) compiler is now configured, we can now test capabilities
41775  # of the target platform.
41776
41777
41778
41779  ###############################################################################
41780  #
41781  # Setup the opt flags for different compilers
41782  # and different operating systems.
41783  #
41784
41785  # FIXME: this was indirectly the old default, but just inherited.
41786  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41787  #   C_FLAG_DEPS="-MMD -MF"
41788  # fi
41789
41790  # Generate make dependency files
41791  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41792    C_FLAG_DEPS="-MMD -MF"
41793  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41794    C_FLAG_DEPS="-MMD -MF"
41795  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41796    C_FLAG_DEPS="-xMMD -xMF"
41797  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41798    C_FLAG_DEPS="-qmakedep=gcc -MF"
41799  fi
41800  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41801
41802
41803
41804  # Debug symbols
41805  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41806    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41807      # reduce from default "-g2" option to save space
41808      CFLAGS_DEBUG_SYMBOLS="-g1"
41809      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41810    else
41811      CFLAGS_DEBUG_SYMBOLS="-g"
41812      CXXFLAGS_DEBUG_SYMBOLS="-g"
41813    fi
41814  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41815    CFLAGS_DEBUG_SYMBOLS="-g"
41816    CXXFLAGS_DEBUG_SYMBOLS="-g"
41817  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41818    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41819    # FIXME: likely a bug, this disables debug symbols rather than enables them
41820    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41821  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41822    CFLAGS_DEBUG_SYMBOLS="-g"
41823    CXXFLAGS_DEBUG_SYMBOLS="-g"
41824  fi
41825
41826
41827
41828  # bounds, memory and behavior checking options
41829  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41830    case $DEBUG_LEVEL in
41831    release )
41832      # no adjustment
41833      ;;
41834    fastdebug )
41835      # no adjustment
41836      ;;
41837    slowdebug )
41838      # Add runtime stack smashing and undefined behavior checks.
41839      # Not all versions of gcc support -fstack-protector
41840      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
41841
41842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
41843$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
41844  supports=yes
41845
41846  saved_cflags="$CFLAGS"
41847  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
41848  ac_ext=c
41849ac_cpp='$CPP $CPPFLAGS'
41850ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41851ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41852ac_compiler_gnu=$ac_cv_c_compiler_gnu
41853
41854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41855/* end confdefs.h.  */
41856int i;
41857_ACEOF
41858if ac_fn_c_try_compile "$LINENO"; then :
41859
41860else
41861  supports=no
41862fi
41863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41864  ac_ext=cpp
41865ac_cpp='$CXXCPP $CPPFLAGS'
41866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41869
41870  CFLAGS="$saved_cflags"
41871
41872  saved_cxxflags="$CXXFLAGS"
41873  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
41874  ac_ext=cpp
41875ac_cpp='$CXXCPP $CPPFLAGS'
41876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41879
41880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41881/* end confdefs.h.  */
41882int i;
41883_ACEOF
41884if ac_fn_cxx_try_compile "$LINENO"; then :
41885
41886else
41887  supports=no
41888fi
41889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41890  ac_ext=cpp
41891ac_cpp='$CXXCPP $CPPFLAGS'
41892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41895
41896  CXXFLAGS="$saved_cxxflags"
41897
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41899$as_echo "$supports" >&6; }
41900  if test "x$supports" = "xyes" ; then
41901    :
41902  else
41903    STACK_PROTECTOR_CFLAG=""
41904  fi
41905
41906
41907      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41908      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41909      ;;
41910    esac
41911  fi
41912
41913  # Optimization levels
41914  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41915    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41916
41917    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41918      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41919      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41920      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41921      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41922      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41923      C_O_FLAG_NONE="-xregs=no%frameptr"
41924      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41925      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41926      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41927      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41928      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41929      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41930        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41931        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41932      fi
41933    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41934      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41935      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41936      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41937      C_O_FLAG_DEBUG=""
41938      C_O_FLAG_NONE=""
41939      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41940      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41941      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41942      C_O_FLAG_DEBUG=""
41943      CXX_O_FLAG_NONE=""
41944    fi
41945  else
41946    # The remaining toolchains share opt flags between CC and CXX;
41947    # setup for C and duplicate afterwards.
41948    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41949      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41950        # On MacOSX we optimize for size, something
41951        # we should do for all platforms?
41952        C_O_FLAG_HIGHEST="-Os"
41953        C_O_FLAG_HI="-Os"
41954        C_O_FLAG_NORM="-Os"
41955      else
41956        C_O_FLAG_HIGHEST="-O3"
41957        C_O_FLAG_HI="-O3"
41958        C_O_FLAG_NORM="-O2"
41959      fi
41960      C_O_FLAG_DEBUG="-O0"
41961      C_O_FLAG_NONE="-O0"
41962    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41963      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41964        # On MacOSX we optimize for size, something
41965        # we should do for all platforms?
41966        C_O_FLAG_HIGHEST="-Os"
41967        C_O_FLAG_HI="-Os"
41968        C_O_FLAG_NORM="-Os"
41969      else
41970        C_O_FLAG_HIGHEST="-O3"
41971        C_O_FLAG_HI="-O3"
41972        C_O_FLAG_NORM="-O2"
41973      fi
41974      C_O_FLAG_DEBUG="-O0"
41975      C_O_FLAG_NONE="-O0"
41976    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41977      C_O_FLAG_HIGHEST="-O3"
41978      C_O_FLAG_HI="-O3 -qstrict"
41979      C_O_FLAG_NORM="-O2"
41980      C_O_FLAG_DEBUG="-qnoopt"
41981      C_O_FLAG_NONE="-qnoop"
41982    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41983      C_O_FLAG_HIGHEST="-O2"
41984      C_O_FLAG_HI="-O1"
41985      C_O_FLAG_NORM="-O1"
41986      C_O_FLAG_DEBUG="-Od"
41987      C_O_FLAG_NONE="-Od"
41988    fi
41989    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41990    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41991    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41992    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41993    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41994  fi
41995
41996  # Adjust optimization flags according to debug level.
41997  case $DEBUG_LEVEL in
41998    release )
41999      # no adjustment
42000      ;;
42001    fastdebug )
42002      # Not quite so much optimization
42003      C_O_FLAG_HI="$C_O_FLAG_NORM"
42004      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42005      ;;
42006    slowdebug )
42007      # Disable optimization
42008      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42009      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42010      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42011      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42012      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42013      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42014      ;;
42015  esac
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029  # Special extras...
42030  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42031    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42032      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42033      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42034    fi
42035    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42036    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42037  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42038    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42039    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42040  fi
42041
42042  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42043    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42044$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42045  fi
42046
42047  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42048    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42049$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42050  fi
42051
42052  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42053    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42054$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42055  fi
42056
42057
42058# Check whether --with-extra-cflags was given.
42059if test "${with_extra_cflags+set}" = set; then :
42060  withval=$with_extra_cflags;
42061fi
42062
42063
42064
42065# Check whether --with-extra-cxxflags was given.
42066if test "${with_extra_cxxflags+set}" = set; then :
42067  withval=$with_extra_cxxflags;
42068fi
42069
42070
42071
42072# Check whether --with-extra-ldflags was given.
42073if test "${with_extra_ldflags+set}" = set; then :
42074  withval=$with_extra_ldflags;
42075fi
42076
42077
42078  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42079  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42080  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42081
42082  # Hotspot needs these set in their legacy form
42083  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42084  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42085  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42086
42087
42088
42089
42090
42091  ###############################################################################
42092  #
42093  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42094  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42095  #
42096
42097  # Setup compiler/platform specific flags into
42098  #    CFLAGS_JDK    - C Compiler flags
42099  #    CXXFLAGS_JDK  - C++ Compiler flags
42100  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42101  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42102    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42103      # Force compatibility with i586 on 32 bit intel platforms.
42104      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42105    fi
42106    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42107        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42108    case $OPENJDK_TARGET_CPU_ARCH in
42109      arm )
42110        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42111        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42112        ;;
42113      ppc )
42114        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42115        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42116        ;;
42117      * )
42118        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42119        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42120        ;;
42121    esac
42122  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42123    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42124    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42125      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42126    fi
42127
42128    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42129    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42130  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42131    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42132    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42133  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42134    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42135        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42136        -DWIN32_LEAN_AND_MEAN \
42137        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42138        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42139        -DWIN32 -DIAL"
42140    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42141      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42142    else
42143      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42144    fi
42145    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42146    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42147    # studio.
42148    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42149      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42150          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42151    fi
42152  fi
42153
42154  ###############################################################################
42155
42156  # Adjust flags according to debug level.
42157  case $DEBUG_LEVEL in
42158    fastdebug | slowdebug )
42159      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42160      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42161      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42162      ;;
42163    release )
42164      ;;
42165    * )
42166      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42167      ;;
42168  esac
42169
42170  # Setup LP64
42171  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42172
42173  # Set some common defines. These works for all compilers, but assume
42174  # -D is universally accepted.
42175
42176  # Setup endianness
42177  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42178    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42179    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42180    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42181    #   Note: -Dmacro         is the same as    #define macro 1
42182    #         -Dmacro=        is the same as    #define macro
42183    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42184      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42185    else
42186      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42187    fi
42188  else
42189    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42190    # are defined in the system?
42191    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42192      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42193    else
42194      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42195    fi
42196  fi
42197
42198  # Setup target OS define. Use OS target name but in upper case.
42199  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42200  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42201
42202  # Setup target CPU
42203  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42204
42205  # Setup debug/release defines
42206  if test "x$DEBUG_LEVEL" = xrelease; then
42207    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42208    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42209      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42210    fi
42211  else
42212    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42213  fi
42214
42215  # Setup release name
42216  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42217
42218
42219  # Set some additional per-OS defines.
42220  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42221    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42222  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42223    # FIXME: PPC64 should not be here.
42224    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42225  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42226    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42227  fi
42228
42229  # Additional macosx handling
42230  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42231    # Setting these parameters makes it an error to link to macosx APIs that are
42232    # newer than the given OS version and makes the linked binaries compatible
42233    # even if built on a newer version of the OS.
42234    # The expected format is X.Y.Z
42235    MACOSX_VERSION_MIN=10.7.0
42236
42237
42238    # The macro takes the version with no dots, ex: 1070
42239    # Let the flags variables get resolved in make for easier override on make
42240    # command line.
42241    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42242    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42243  fi
42244
42245  # Setup some hard coded includes
42246  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42247      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42248      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42249      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42250
42251  # The shared libraries are compiled using the picflag.
42252  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42253  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42254
42255  # Executable flags
42256  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42257  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42258
42259
42260
42261
42262
42263
42264  # Flags for compiling test libraries
42265  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42266  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42267
42268  # Flags for compiling test executables
42269  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42270  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42271
42272
42273
42274
42275
42276
42277  # Setup LDFLAGS et al.
42278  #
42279
42280  # Now this is odd. The JDK native libraries have to link against libjvm.so
42281  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42282  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42283  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42284  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42285  # libraries will link to whatever is in memory. Yuck.
42286  #
42287  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42288  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42289    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42290    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42291      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42292    fi
42293    # TODO: make -debug optional "--disable-full-debug-symbols"
42294    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42295  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42296    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42297    # We have previously set HAS_GNU_HASH if this is the case
42298    if test -n "$HAS_GNU_HASH"; then
42299      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42300    fi
42301    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42302      # And since we now know that the linker is gnu, then add -z defs, to forbid
42303      # undefined symbols in object files.
42304      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42305      case $DEBUG_LEVEL in
42306        release )
42307          # tell linker to optimize libraries.
42308          # Should this be supplied to the OSS linker as well?
42309          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42310          ;;
42311        slowdebug )
42312          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42313            # do relocations at load
42314            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42315            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42316          fi
42317          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42318            # mark relocations read only
42319            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42320            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42321          fi
42322          ;;
42323        fastdebug )
42324          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42325            # mark relocations read only
42326            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42327            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42328          fi
42329          ;;
42330        * )
42331          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42332          ;;
42333        esac
42334    fi
42335  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42336    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42337    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42338  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42339    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42340  fi
42341
42342  # Customize LDFLAGS for executables
42343
42344  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42345
42346  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42347    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42348      LDFLAGS_STACK_SIZE=1048576
42349    else
42350      LDFLAGS_STACK_SIZE=327680
42351    fi
42352    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42353  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42354    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42355  fi
42356
42357  # Customize LDFLAGS for libs
42358  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42359
42360  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42361    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42362    LDFLAGS_JDKLIB_SUFFIX=""
42363  else
42364    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42365        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42366
42367    # On some platforms (mac) the linker warns about non existing -L dirs.
42368    # Add server first if available. Linking aginst client does not always produce the same results.
42369    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42370    # Default to server for other variants.
42371    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42372      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42373    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42374      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42375    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42376      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42377    else
42378      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42379    fi
42380
42381    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42382    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42383      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42384    fi
42385  fi
42386
42387
42388
42389
42390
42391
42392
42393  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42394  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42395  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42396  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42397
42398
42399
42400
42401
42402
42403
42404  # Some Zero and Shark settings.
42405  # ZERO_ARCHFLAG tells the compiler which mode to build for
42406  case "${OPENJDK_TARGET_CPU}" in
42407    s390)
42408      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42409      ;;
42410    *)
42411      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42412  esac
42413
42414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42415$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42416  supports=yes
42417
42418  saved_cflags="$CFLAGS"
42419  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42420  ac_ext=c
42421ac_cpp='$CPP $CPPFLAGS'
42422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42424ac_compiler_gnu=$ac_cv_c_compiler_gnu
42425
42426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42427/* end confdefs.h.  */
42428int i;
42429_ACEOF
42430if ac_fn_c_try_compile "$LINENO"; then :
42431
42432else
42433  supports=no
42434fi
42435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42436  ac_ext=cpp
42437ac_cpp='$CXXCPP $CPPFLAGS'
42438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42441
42442  CFLAGS="$saved_cflags"
42443
42444  saved_cxxflags="$CXXFLAGS"
42445  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42446  ac_ext=cpp
42447ac_cpp='$CXXCPP $CPPFLAGS'
42448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42451
42452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42453/* end confdefs.h.  */
42454int i;
42455_ACEOF
42456if ac_fn_cxx_try_compile "$LINENO"; then :
42457
42458else
42459  supports=no
42460fi
42461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42462  ac_ext=cpp
42463ac_cpp='$CXXCPP $CPPFLAGS'
42464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42467
42468  CXXFLAGS="$saved_cxxflags"
42469
42470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42471$as_echo "$supports" >&6; }
42472  if test "x$supports" = "xyes" ; then
42473    :
42474  else
42475    ZERO_ARCHFLAG=""
42476  fi
42477
42478
42479
42480  # Check that the compiler supports -mX (or -qX on AIX) flags
42481  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42482
42483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42484$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42485  supports=yes
42486
42487  saved_cflags="$CFLAGS"
42488  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42489  ac_ext=c
42490ac_cpp='$CPP $CPPFLAGS'
42491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42493ac_compiler_gnu=$ac_cv_c_compiler_gnu
42494
42495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42496/* end confdefs.h.  */
42497int i;
42498_ACEOF
42499if ac_fn_c_try_compile "$LINENO"; then :
42500
42501else
42502  supports=no
42503fi
42504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42505  ac_ext=cpp
42506ac_cpp='$CXXCPP $CPPFLAGS'
42507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42510
42511  CFLAGS="$saved_cflags"
42512
42513  saved_cxxflags="$CXXFLAGS"
42514  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42515  ac_ext=cpp
42516ac_cpp='$CXXCPP $CPPFLAGS'
42517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42520
42521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42522/* end confdefs.h.  */
42523int i;
42524_ACEOF
42525if ac_fn_cxx_try_compile "$LINENO"; then :
42526
42527else
42528  supports=no
42529fi
42530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42531  ac_ext=cpp
42532ac_cpp='$CXXCPP $CPPFLAGS'
42533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42536
42537  CXXFLAGS="$saved_cxxflags"
42538
42539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42540$as_echo "$supports" >&6; }
42541  if test "x$supports" = "xyes" ; then
42542    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42543  else
42544    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42545  fi
42546
42547
42548
42549  # Check whether --enable-warnings-as-errors was given.
42550if test "${enable_warnings_as_errors+set}" = set; then :
42551  enableval=$enable_warnings_as_errors;
42552fi
42553
42554
42555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42556$as_echo_n "checking if native warnings are errors... " >&6; }
42557  if test "x$enable_warnings_as_errors" = "xyes"; then
42558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42559$as_echo "yes (explicitely set)" >&6; }
42560    WARNINGS_AS_ERRORS=true
42561  elif test "x$enable_warnings_as_errors" = "xno"; then
42562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42563$as_echo "no" >&6; }
42564    WARNINGS_AS_ERRORS=false
42565  elif test "x$enable_warnings_as_errors" = "x"; then
42566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42567$as_echo "yes (default)" >&6; }
42568    WARNINGS_AS_ERRORS=true
42569  else
42570    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42571  fi
42572
42573
42574  case "${TOOLCHAIN_TYPE}" in
42575    microsoft)
42576      DISABLE_WARNING_PREFIX="-wd"
42577      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42578      ;;
42579    solstudio)
42580      DISABLE_WARNING_PREFIX="-erroff="
42581      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42582      ;;
42583    gcc)
42584      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42585
42586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42587$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42588  supports=yes
42589
42590  saved_cflags="$CFLAGS"
42591  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42592  ac_ext=c
42593ac_cpp='$CPP $CPPFLAGS'
42594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42596ac_compiler_gnu=$ac_cv_c_compiler_gnu
42597
42598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42599/* end confdefs.h.  */
42600int i;
42601_ACEOF
42602if ac_fn_c_try_compile "$LINENO"; then :
42603
42604else
42605  supports=no
42606fi
42607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42608  ac_ext=cpp
42609ac_cpp='$CXXCPP $CPPFLAGS'
42610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42613
42614  CFLAGS="$saved_cflags"
42615
42616  saved_cxxflags="$CXXFLAGS"
42617  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42618  ac_ext=cpp
42619ac_cpp='$CXXCPP $CPPFLAGS'
42620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42623
42624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42625/* end confdefs.h.  */
42626int i;
42627_ACEOF
42628if ac_fn_cxx_try_compile "$LINENO"; then :
42629
42630else
42631  supports=no
42632fi
42633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42634  ac_ext=cpp
42635ac_cpp='$CXXCPP $CPPFLAGS'
42636ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42637ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42638ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42639
42640  CXXFLAGS="$saved_cxxflags"
42641
42642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42643$as_echo "$supports" >&6; }
42644  if test "x$supports" = "xyes" ; then
42645    GCC_CAN_DISABLE_WARNINGS=true
42646  else
42647    GCC_CAN_DISABLE_WARNINGS=false
42648
42649  fi
42650
42651      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42652        DISABLE_WARNING_PREFIX="-Wno-"
42653      else
42654        DISABLE_WARNING_PREFIX=
42655      fi
42656      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42657      ;;
42658    clang)
42659      DISABLE_WARNING_PREFIX="-Wno-"
42660      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42661      ;;
42662  esac
42663
42664
42665
42666
42667# Setup debug symbols (need objcopy from the toolchain for that)
42668
42669  #
42670  # ENABLE_DEBUG_SYMBOLS
42671  # This must be done after the toolchain is setup, since we're looking at objcopy.
42672  #
42673  # Check whether --enable-debug-symbols was given.
42674if test "${enable_debug_symbols+set}" = set; then :
42675  enableval=$enable_debug_symbols;
42676fi
42677
42678
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42680$as_echo_n "checking if we should generate debug symbols... " >&6; }
42681
42682  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42683    # explicit enabling of enable-debug-symbols and can't find objcopy
42684    #   this is an error
42685    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42686  fi
42687
42688  if test "x$enable_debug_symbols" = "xyes"; then
42689    ENABLE_DEBUG_SYMBOLS=true
42690  elif test "x$enable_debug_symbols" = "xno"; then
42691    ENABLE_DEBUG_SYMBOLS=false
42692  else
42693    # Default is on if objcopy is found
42694    if test "x$OBJCOPY" != x; then
42695      ENABLE_DEBUG_SYMBOLS=true
42696    # MacOS X and Windows don't use objcopy but default is on for those OSes
42697    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42698      ENABLE_DEBUG_SYMBOLS=true
42699    else
42700      ENABLE_DEBUG_SYMBOLS=false
42701    fi
42702  fi
42703
42704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42705$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42706
42707  #
42708  # ZIP_DEBUGINFO_FILES
42709  #
42710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42711$as_echo_n "checking if we should zip debug-info files... " >&6; }
42712  # Check whether --enable-zip-debug-info was given.
42713if test "${enable_zip_debug_info+set}" = set; then :
42714  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42715else
42716  enable_zip_debug_info="yes"
42717fi
42718
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42720$as_echo "${enable_zip_debug_info}" >&6; }
42721
42722  if test "x${enable_zip_debug_info}" = "xno"; then
42723    ZIP_DEBUGINFO_FILES=false
42724  else
42725    ZIP_DEBUGINFO_FILES=true
42726  fi
42727
42728
42729
42730
42731
42732  # Check whether --enable-native-coverage was given.
42733if test "${enable_native_coverage+set}" = set; then :
42734  enableval=$enable_native_coverage;
42735fi
42736
42737  GCOV_ENABLED="false"
42738  if test "x$enable_native_coverage" = "xyes"; then
42739    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42741$as_echo_n "checking if native coverage is enabled... " >&6; }
42742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42743$as_echo "yes" >&6; }
42744      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42745      GCOV_LDFLAGS="-fprofile-arcs"
42746      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42747      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42748      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42749      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42750      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42751      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42752      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42753      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42754      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42755      GCOV_ENABLED="true"
42756    else
42757      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42758    fi
42759  elif test "x$enable_native_coverage" = "xno"; then
42760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42761$as_echo_n "checking if native coverage is enabled... " >&6; }
42762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42763$as_echo "no" >&6; }
42764  elif test "x$enable_native_coverage" != "x"; then
42765    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42766  fi
42767
42768
42769
42770
42771###############################################################################
42772#
42773# Check dependencies for external and internal libraries.
42774#
42775###############################################################################
42776
42777# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42778
42779  # When using cygwin or msys, we need a wrapper binary that renames
42780  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42781  # @files and rewrites these too! This wrapper binary is
42782  # called fixpath.
42783  FIXPATH=
42784  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42786$as_echo_n "checking if fixpath can be created... " >&6; }
42787    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42788    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42789    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42790    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42791      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42792      FIXPATH="$FIXPATH_BIN -c"
42793    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42794      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42795      # @ was chosen as separator to minimize risk of other tools messing around with it
42796      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42797          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42798      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42799      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42800    fi
42801    FIXPATH_SRC_W="$FIXPATH_SRC"
42802    FIXPATH_BIN_W="$FIXPATH_BIN"
42803
42804  unix_path="$FIXPATH_SRC_W"
42805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42806    windows_path=`$CYGPATH -m "$unix_path"`
42807    FIXPATH_SRC_W="$windows_path"
42808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42809    windows_path=`cmd //c echo $unix_path`
42810    FIXPATH_SRC_W="$windows_path"
42811  fi
42812
42813
42814  unix_path="$FIXPATH_BIN_W"
42815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42816    windows_path=`$CYGPATH -m "$unix_path"`
42817    FIXPATH_BIN_W="$windows_path"
42818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42819    windows_path=`cmd //c echo $unix_path`
42820    FIXPATH_BIN_W="$windows_path"
42821  fi
42822
42823    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42824    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42825    cd $FIXPATH_DIR
42826    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42827    cd $CURDIR
42828
42829    if test ! -x $FIXPATH_BIN; then
42830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42831$as_echo "no" >&6; }
42832      cat $FIXPATH_DIR/fixpath1.log
42833      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42834    fi
42835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42836$as_echo "yes" >&6; }
42837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42838$as_echo_n "checking if fixpath.exe works... " >&6; }
42839    cd $FIXPATH_DIR
42840    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42841        > $FIXPATH_DIR/fixpath2.log 2>&1
42842    cd $CURDIR
42843    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42845$as_echo "no" >&6; }
42846      cat $FIXPATH_DIR/fixpath2.log
42847      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42848    fi
42849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42850$as_echo "yes" >&6; }
42851  fi
42852
42853
42854
42855
42856
42857
42858  ###############################################################################
42859  #
42860  # OS specific settings that we never will need to probe.
42861  #
42862  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42864$as_echo_n "checking what is not needed on Linux?... " >&6; }
42865    PULSE_NOT_NEEDED=yes
42866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42867$as_echo "pulse" >&6; }
42868  fi
42869
42870  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42872$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42873    ALSA_NOT_NEEDED=yes
42874    PULSE_NOT_NEEDED=yes
42875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42876$as_echo "alsa pulse" >&6; }
42877  fi
42878
42879  if test "x$OPENJDK_TARGET_OS" = xaix; then
42880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42881$as_echo_n "checking what is not needed on AIX?... " >&6; }
42882    ALSA_NOT_NEEDED=yes
42883    PULSE_NOT_NEEDED=yes
42884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42885$as_echo "alsa pulse" >&6; }
42886  fi
42887
42888
42889  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42891$as_echo_n "checking what is not needed on Windows?... " >&6; }
42892    CUPS_NOT_NEEDED=yes
42893    ALSA_NOT_NEEDED=yes
42894    PULSE_NOT_NEEDED=yes
42895    X11_NOT_NEEDED=yes
42896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42897$as_echo "alsa cups pulse x11" >&6; }
42898  fi
42899
42900  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42902$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42903    ALSA_NOT_NEEDED=yes
42904    PULSE_NOT_NEEDED=yes
42905    X11_NOT_NEEDED=yes
42906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42907$as_echo "alsa pulse x11" >&6; }
42908  fi
42909
42910  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42912$as_echo_n "checking what is not needed on bsd?... " >&6; }
42913    ALSA_NOT_NEEDED=yes
42914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42915$as_echo "alsa" >&6; }
42916  fi
42917
42918  if test "x$OPENJDK" = "xfalse"; then
42919    FREETYPE_NOT_NEEDED=yes
42920  fi
42921
42922  if test "x$SUPPORT_HEADFUL" = xno; then
42923    X11_NOT_NEEDED=yes
42924  fi
42925
42926
42927
42928  ###############################################################################
42929  #
42930  # Check for X Windows
42931  #
42932
42933  if test "x$X11_NOT_NEEDED" = xyes; then
42934    if test "x${with_x}" != x; then
42935      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42936$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42937    fi
42938    X_CFLAGS=
42939    X_LIBS=
42940  else
42941    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42942    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42943    # --x-libraries for the sysroot, if that seems to be correct.
42944    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42945      if test "x$SYSROOT" != "x"; then
42946        if test "x$x_includes" = xNONE; then
42947          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42948            x_includes="$SYSROOT/usr/X11R6/include"
42949          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42950            x_includes="$SYSROOT/usr/include"
42951          fi
42952        fi
42953        if test "x$x_libraries" = xNONE; then
42954          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42955            x_libraries="$SYSROOT/usr/X11R6/lib"
42956          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42957            x_libraries="$SYSROOT/usr/lib64"
42958          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42959            x_libraries="$SYSROOT/usr/lib"
42960          fi
42961        fi
42962      fi
42963    fi
42964
42965    # Now let autoconf do it's magic
42966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42967$as_echo_n "checking for X... " >&6; }
42968
42969
42970# Check whether --with-x was given.
42971if test "${with_x+set}" = set; then :
42972  withval=$with_x;
42973fi
42974
42975# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42976if test "x$with_x" = xno; then
42977  # The user explicitly disabled X.
42978  have_x=disabled
42979else
42980  case $x_includes,$x_libraries in #(
42981    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42982    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42983  $as_echo_n "(cached) " >&6
42984else
42985  # One or both of the vars are not set, and there is no cached value.
42986ac_x_includes=no ac_x_libraries=no
42987rm -f -r conftest.dir
42988if mkdir conftest.dir; then
42989  cd conftest.dir
42990  cat >Imakefile <<'_ACEOF'
42991incroot:
42992	@echo incroot='${INCROOT}'
42993usrlibdir:
42994	@echo usrlibdir='${USRLIBDIR}'
42995libdir:
42996	@echo libdir='${LIBDIR}'
42997_ACEOF
42998  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42999    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43000    for ac_var in incroot usrlibdir libdir; do
43001      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43002    done
43003    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43004    for ac_extension in a so sl dylib la dll; do
43005      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43006	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43007	ac_im_usrlibdir=$ac_im_libdir; break
43008      fi
43009    done
43010    # Screen out bogus values from the imake configuration.  They are
43011    # bogus both because they are the default anyway, and because
43012    # using them would break gcc on systems where it needs fixed includes.
43013    case $ac_im_incroot in
43014	/usr/include) ac_x_includes= ;;
43015	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43016    esac
43017    case $ac_im_usrlibdir in
43018	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43019	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43020    esac
43021  fi
43022  cd ..
43023  rm -f -r conftest.dir
43024fi
43025
43026# Standard set of common directories for X headers.
43027# Check X11 before X11Rn because it is often a symlink to the current release.
43028ac_x_header_dirs='
43029/usr/X11/include
43030/usr/X11R7/include
43031/usr/X11R6/include
43032/usr/X11R5/include
43033/usr/X11R4/include
43034
43035/usr/include/X11
43036/usr/include/X11R7
43037/usr/include/X11R6
43038/usr/include/X11R5
43039/usr/include/X11R4
43040
43041/usr/local/X11/include
43042/usr/local/X11R7/include
43043/usr/local/X11R6/include
43044/usr/local/X11R5/include
43045/usr/local/X11R4/include
43046
43047/usr/local/include/X11
43048/usr/local/include/X11R7
43049/usr/local/include/X11R6
43050/usr/local/include/X11R5
43051/usr/local/include/X11R4
43052
43053/usr/X386/include
43054/usr/x386/include
43055/usr/XFree86/include/X11
43056
43057/usr/include
43058/usr/local/include
43059/usr/unsupported/include
43060/usr/athena/include
43061/usr/local/x11r5/include
43062/usr/lpp/Xamples/include
43063
43064/usr/openwin/include
43065/usr/openwin/share/include'
43066
43067if test "$ac_x_includes" = no; then
43068  # Guess where to find include files, by looking for Xlib.h.
43069  # First, try using that file with no special directory specified.
43070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43071/* end confdefs.h.  */
43072#include <X11/Xlib.h>
43073_ACEOF
43074if ac_fn_cxx_try_cpp "$LINENO"; then :
43075  # We can compile using X headers with no special include directory.
43076ac_x_includes=
43077else
43078  for ac_dir in $ac_x_header_dirs; do
43079  if test -r "$ac_dir/X11/Xlib.h"; then
43080    ac_x_includes=$ac_dir
43081    break
43082  fi
43083done
43084fi
43085rm -f conftest.err conftest.i conftest.$ac_ext
43086fi # $ac_x_includes = no
43087
43088if test "$ac_x_libraries" = no; then
43089  # Check for the libraries.
43090  # See if we find them without any special options.
43091  # Don't add to $LIBS permanently.
43092  ac_save_LIBS=$LIBS
43093  LIBS="-lX11 $LIBS"
43094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43095/* end confdefs.h.  */
43096#include <X11/Xlib.h>
43097int
43098main ()
43099{
43100XrmInitialize ()
43101  ;
43102  return 0;
43103}
43104_ACEOF
43105if ac_fn_cxx_try_link "$LINENO"; then :
43106  LIBS=$ac_save_LIBS
43107# We can link X programs with no special library path.
43108ac_x_libraries=
43109else
43110  LIBS=$ac_save_LIBS
43111for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43112do
43113  # Don't even attempt the hair of trying to link an X program!
43114  for ac_extension in a so sl dylib la dll; do
43115    if test -r "$ac_dir/libX11.$ac_extension"; then
43116      ac_x_libraries=$ac_dir
43117      break 2
43118    fi
43119  done
43120done
43121fi
43122rm -f core conftest.err conftest.$ac_objext \
43123    conftest$ac_exeext conftest.$ac_ext
43124fi # $ac_x_libraries = no
43125
43126case $ac_x_includes,$ac_x_libraries in #(
43127  no,* | *,no | *\'*)
43128    # Didn't find X, or a directory has "'" in its name.
43129    ac_cv_have_x="have_x=no";; #(
43130  *)
43131    # Record where we found X for the cache.
43132    ac_cv_have_x="have_x=yes\
43133	ac_x_includes='$ac_x_includes'\
43134	ac_x_libraries='$ac_x_libraries'"
43135esac
43136fi
43137;; #(
43138    *) have_x=yes;;
43139  esac
43140  eval "$ac_cv_have_x"
43141fi # $with_x != no
43142
43143if test "$have_x" != yes; then
43144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43145$as_echo "$have_x" >&6; }
43146  no_x=yes
43147else
43148  # If each of the values was on the command line, it overrides each guess.
43149  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43150  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43151  # Update the cache value to reflect the command line values.
43152  ac_cv_have_x="have_x=yes\
43153	ac_x_includes='$x_includes'\
43154	ac_x_libraries='$x_libraries'"
43155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43156$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43157fi
43158
43159    if test "$no_x" = yes; then
43160  # Not all programs may use this symbol, but it does not hurt to define it.
43161
43162$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43163
43164  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43165else
43166  if test -n "$x_includes"; then
43167    X_CFLAGS="$X_CFLAGS -I$x_includes"
43168  fi
43169
43170  # It would also be nice to do this for all -L options, not just this one.
43171  if test -n "$x_libraries"; then
43172    X_LIBS="$X_LIBS -L$x_libraries"
43173    # For Solaris; some versions of Sun CC require a space after -R and
43174    # others require no space.  Words are not sufficient . . . .
43175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43176$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43177    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43178    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43179    ac_cxx_werror_flag=yes
43180    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43181/* end confdefs.h.  */
43182
43183int
43184main ()
43185{
43186
43187  ;
43188  return 0;
43189}
43190_ACEOF
43191if ac_fn_cxx_try_link "$LINENO"; then :
43192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43193$as_echo "no" >&6; }
43194       X_LIBS="$X_LIBS -R$x_libraries"
43195else
43196  LIBS="$ac_xsave_LIBS -R $x_libraries"
43197       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43198/* end confdefs.h.  */
43199
43200int
43201main ()
43202{
43203
43204  ;
43205  return 0;
43206}
43207_ACEOF
43208if ac_fn_cxx_try_link "$LINENO"; then :
43209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43210$as_echo "yes" >&6; }
43211	  X_LIBS="$X_LIBS -R $x_libraries"
43212else
43213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43214$as_echo "neither works" >&6; }
43215fi
43216rm -f core conftest.err conftest.$ac_objext \
43217    conftest$ac_exeext conftest.$ac_ext
43218fi
43219rm -f core conftest.err conftest.$ac_objext \
43220    conftest$ac_exeext conftest.$ac_ext
43221    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43222    LIBS=$ac_xsave_LIBS
43223  fi
43224
43225  # Check for system-dependent libraries X programs must link with.
43226  # Do this before checking for the system-independent R6 libraries
43227  # (-lICE), since we may need -lsocket or whatever for X linking.
43228
43229  if test "$ISC" = yes; then
43230    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43231  else
43232    # Martyn Johnson says this is needed for Ultrix, if the X
43233    # libraries were built with DECnet support.  And Karl Berry says
43234    # the Alpha needs dnet_stub (dnet does not exist).
43235    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43237/* end confdefs.h.  */
43238
43239/* Override any GCC internal prototype to avoid an error.
43240   Use char because int might match the return type of a GCC
43241   builtin and then its argument prototype would still apply.  */
43242#ifdef __cplusplus
43243extern "C"
43244#endif
43245char XOpenDisplay ();
43246int
43247main ()
43248{
43249return XOpenDisplay ();
43250  ;
43251  return 0;
43252}
43253_ACEOF
43254if ac_fn_cxx_try_link "$LINENO"; then :
43255
43256else
43257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43258$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43259if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43260  $as_echo_n "(cached) " >&6
43261else
43262  ac_check_lib_save_LIBS=$LIBS
43263LIBS="-ldnet  $LIBS"
43264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43265/* end confdefs.h.  */
43266
43267/* Override any GCC internal prototype to avoid an error.
43268   Use char because int might match the return type of a GCC
43269   builtin and then its argument prototype would still apply.  */
43270#ifdef __cplusplus
43271extern "C"
43272#endif
43273char dnet_ntoa ();
43274int
43275main ()
43276{
43277return dnet_ntoa ();
43278  ;
43279  return 0;
43280}
43281_ACEOF
43282if ac_fn_cxx_try_link "$LINENO"; then :
43283  ac_cv_lib_dnet_dnet_ntoa=yes
43284else
43285  ac_cv_lib_dnet_dnet_ntoa=no
43286fi
43287rm -f core conftest.err conftest.$ac_objext \
43288    conftest$ac_exeext conftest.$ac_ext
43289LIBS=$ac_check_lib_save_LIBS
43290fi
43291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43292$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43293if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43294  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43295fi
43296
43297    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43298      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43299$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43300if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43301  $as_echo_n "(cached) " >&6
43302else
43303  ac_check_lib_save_LIBS=$LIBS
43304LIBS="-ldnet_stub  $LIBS"
43305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43306/* end confdefs.h.  */
43307
43308/* Override any GCC internal prototype to avoid an error.
43309   Use char because int might match the return type of a GCC
43310   builtin and then its argument prototype would still apply.  */
43311#ifdef __cplusplus
43312extern "C"
43313#endif
43314char dnet_ntoa ();
43315int
43316main ()
43317{
43318return dnet_ntoa ();
43319  ;
43320  return 0;
43321}
43322_ACEOF
43323if ac_fn_cxx_try_link "$LINENO"; then :
43324  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43325else
43326  ac_cv_lib_dnet_stub_dnet_ntoa=no
43327fi
43328rm -f core conftest.err conftest.$ac_objext \
43329    conftest$ac_exeext conftest.$ac_ext
43330LIBS=$ac_check_lib_save_LIBS
43331fi
43332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43333$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43334if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43335  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43336fi
43337
43338    fi
43339fi
43340rm -f core conftest.err conftest.$ac_objext \
43341    conftest$ac_exeext conftest.$ac_ext
43342    LIBS="$ac_xsave_LIBS"
43343
43344    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43345    # to get the SysV transport functions.
43346    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43347    # needs -lnsl.
43348    # The nsl library prevents programs from opening the X display
43349    # on Irix 5.2, according to T.E. Dickey.
43350    # The functions gethostbyname, getservbyname, and inet_addr are
43351    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43352    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43353if test "x$ac_cv_func_gethostbyname" = xyes; then :
43354
43355fi
43356
43357    if test $ac_cv_func_gethostbyname = no; then
43358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43359$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43360if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43361  $as_echo_n "(cached) " >&6
43362else
43363  ac_check_lib_save_LIBS=$LIBS
43364LIBS="-lnsl  $LIBS"
43365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43366/* end confdefs.h.  */
43367
43368/* Override any GCC internal prototype to avoid an error.
43369   Use char because int might match the return type of a GCC
43370   builtin and then its argument prototype would still apply.  */
43371#ifdef __cplusplus
43372extern "C"
43373#endif
43374char gethostbyname ();
43375int
43376main ()
43377{
43378return gethostbyname ();
43379  ;
43380  return 0;
43381}
43382_ACEOF
43383if ac_fn_cxx_try_link "$LINENO"; then :
43384  ac_cv_lib_nsl_gethostbyname=yes
43385else
43386  ac_cv_lib_nsl_gethostbyname=no
43387fi
43388rm -f core conftest.err conftest.$ac_objext \
43389    conftest$ac_exeext conftest.$ac_ext
43390LIBS=$ac_check_lib_save_LIBS
43391fi
43392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43393$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43394if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43395  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43396fi
43397
43398      if test $ac_cv_lib_nsl_gethostbyname = no; then
43399	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43400$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43401if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43402  $as_echo_n "(cached) " >&6
43403else
43404  ac_check_lib_save_LIBS=$LIBS
43405LIBS="-lbsd  $LIBS"
43406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43407/* end confdefs.h.  */
43408
43409/* Override any GCC internal prototype to avoid an error.
43410   Use char because int might match the return type of a GCC
43411   builtin and then its argument prototype would still apply.  */
43412#ifdef __cplusplus
43413extern "C"
43414#endif
43415char gethostbyname ();
43416int
43417main ()
43418{
43419return gethostbyname ();
43420  ;
43421  return 0;
43422}
43423_ACEOF
43424if ac_fn_cxx_try_link "$LINENO"; then :
43425  ac_cv_lib_bsd_gethostbyname=yes
43426else
43427  ac_cv_lib_bsd_gethostbyname=no
43428fi
43429rm -f core conftest.err conftest.$ac_objext \
43430    conftest$ac_exeext conftest.$ac_ext
43431LIBS=$ac_check_lib_save_LIBS
43432fi
43433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43434$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43435if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43436  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43437fi
43438
43439      fi
43440    fi
43441
43442    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43443    # socket/setsockopt and other routines are undefined under SCO ODT
43444    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43445    # on later versions), says Simon Leinen: it contains gethostby*
43446    # variants that don't use the name server (or something).  -lsocket
43447    # must be given before -lnsl if both are needed.  We assume that
43448    # if connect needs -lnsl, so does gethostbyname.
43449    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43450if test "x$ac_cv_func_connect" = xyes; then :
43451
43452fi
43453
43454    if test $ac_cv_func_connect = no; then
43455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43456$as_echo_n "checking for connect in -lsocket... " >&6; }
43457if ${ac_cv_lib_socket_connect+:} false; then :
43458  $as_echo_n "(cached) " >&6
43459else
43460  ac_check_lib_save_LIBS=$LIBS
43461LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43463/* end confdefs.h.  */
43464
43465/* Override any GCC internal prototype to avoid an error.
43466   Use char because int might match the return type of a GCC
43467   builtin and then its argument prototype would still apply.  */
43468#ifdef __cplusplus
43469extern "C"
43470#endif
43471char connect ();
43472int
43473main ()
43474{
43475return connect ();
43476  ;
43477  return 0;
43478}
43479_ACEOF
43480if ac_fn_cxx_try_link "$LINENO"; then :
43481  ac_cv_lib_socket_connect=yes
43482else
43483  ac_cv_lib_socket_connect=no
43484fi
43485rm -f core conftest.err conftest.$ac_objext \
43486    conftest$ac_exeext conftest.$ac_ext
43487LIBS=$ac_check_lib_save_LIBS
43488fi
43489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43490$as_echo "$ac_cv_lib_socket_connect" >&6; }
43491if test "x$ac_cv_lib_socket_connect" = xyes; then :
43492  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43493fi
43494
43495    fi
43496
43497    # Guillermo Gomez says -lposix is necessary on A/UX.
43498    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43499if test "x$ac_cv_func_remove" = xyes; then :
43500
43501fi
43502
43503    if test $ac_cv_func_remove = no; then
43504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43505$as_echo_n "checking for remove in -lposix... " >&6; }
43506if ${ac_cv_lib_posix_remove+:} false; then :
43507  $as_echo_n "(cached) " >&6
43508else
43509  ac_check_lib_save_LIBS=$LIBS
43510LIBS="-lposix  $LIBS"
43511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43512/* end confdefs.h.  */
43513
43514/* Override any GCC internal prototype to avoid an error.
43515   Use char because int might match the return type of a GCC
43516   builtin and then its argument prototype would still apply.  */
43517#ifdef __cplusplus
43518extern "C"
43519#endif
43520char remove ();
43521int
43522main ()
43523{
43524return remove ();
43525  ;
43526  return 0;
43527}
43528_ACEOF
43529if ac_fn_cxx_try_link "$LINENO"; then :
43530  ac_cv_lib_posix_remove=yes
43531else
43532  ac_cv_lib_posix_remove=no
43533fi
43534rm -f core conftest.err conftest.$ac_objext \
43535    conftest$ac_exeext conftest.$ac_ext
43536LIBS=$ac_check_lib_save_LIBS
43537fi
43538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43539$as_echo "$ac_cv_lib_posix_remove" >&6; }
43540if test "x$ac_cv_lib_posix_remove" = xyes; then :
43541  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43542fi
43543
43544    fi
43545
43546    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43547    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43548if test "x$ac_cv_func_shmat" = xyes; then :
43549
43550fi
43551
43552    if test $ac_cv_func_shmat = no; then
43553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43554$as_echo_n "checking for shmat in -lipc... " >&6; }
43555if ${ac_cv_lib_ipc_shmat+:} false; then :
43556  $as_echo_n "(cached) " >&6
43557else
43558  ac_check_lib_save_LIBS=$LIBS
43559LIBS="-lipc  $LIBS"
43560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43561/* end confdefs.h.  */
43562
43563/* Override any GCC internal prototype to avoid an error.
43564   Use char because int might match the return type of a GCC
43565   builtin and then its argument prototype would still apply.  */
43566#ifdef __cplusplus
43567extern "C"
43568#endif
43569char shmat ();
43570int
43571main ()
43572{
43573return shmat ();
43574  ;
43575  return 0;
43576}
43577_ACEOF
43578if ac_fn_cxx_try_link "$LINENO"; then :
43579  ac_cv_lib_ipc_shmat=yes
43580else
43581  ac_cv_lib_ipc_shmat=no
43582fi
43583rm -f core conftest.err conftest.$ac_objext \
43584    conftest$ac_exeext conftest.$ac_ext
43585LIBS=$ac_check_lib_save_LIBS
43586fi
43587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43588$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43589if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43590  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43591fi
43592
43593    fi
43594  fi
43595
43596  # Check for libraries that X11R6 Xt/Xaw programs need.
43597  ac_save_LDFLAGS=$LDFLAGS
43598  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43599  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43600  # check for ICE first), but we must link in the order -lSM -lICE or
43601  # we get undefined symbols.  So assume we have SM if we have ICE.
43602  # These have to be linked with before -lX11, unlike the other
43603  # libraries we check for below, so use a different variable.
43604  # John Interrante, Karl Berry
43605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43606$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43607if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43608  $as_echo_n "(cached) " >&6
43609else
43610  ac_check_lib_save_LIBS=$LIBS
43611LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43613/* end confdefs.h.  */
43614
43615/* Override any GCC internal prototype to avoid an error.
43616   Use char because int might match the return type of a GCC
43617   builtin and then its argument prototype would still apply.  */
43618#ifdef __cplusplus
43619extern "C"
43620#endif
43621char IceConnectionNumber ();
43622int
43623main ()
43624{
43625return IceConnectionNumber ();
43626  ;
43627  return 0;
43628}
43629_ACEOF
43630if ac_fn_cxx_try_link "$LINENO"; then :
43631  ac_cv_lib_ICE_IceConnectionNumber=yes
43632else
43633  ac_cv_lib_ICE_IceConnectionNumber=no
43634fi
43635rm -f core conftest.err conftest.$ac_objext \
43636    conftest$ac_exeext conftest.$ac_ext
43637LIBS=$ac_check_lib_save_LIBS
43638fi
43639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43640$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43641if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43642  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43643fi
43644
43645  LDFLAGS=$ac_save_LDFLAGS
43646
43647fi
43648
43649
43650    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43651    # this doesn't make sense so we remove it.
43652    if test "x$COMPILE_TYPE" = xcross; then
43653      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43654    fi
43655
43656    if test "x$no_x" = xyes; then
43657
43658  # Print a helpful message on how to acquire the necessary build dependency.
43659  # x11 is the help tag: freetype, cups, pulse, alsa etc
43660  MISSING_DEPENDENCY=x11
43661
43662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43663    cygwin_help $MISSING_DEPENDENCY
43664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43665    msys_help $MISSING_DEPENDENCY
43666  else
43667    PKGHANDLER_COMMAND=
43668
43669    case $PKGHANDLER in
43670      apt-get)
43671        apt_help     $MISSING_DEPENDENCY ;;
43672      yum)
43673        yum_help     $MISSING_DEPENDENCY ;;
43674      port)
43675        port_help    $MISSING_DEPENDENCY ;;
43676      pkgutil)
43677        pkgutil_help $MISSING_DEPENDENCY ;;
43678      pkgadd)
43679        pkgadd_help  $MISSING_DEPENDENCY ;;
43680    esac
43681
43682    if test "x$PKGHANDLER_COMMAND" != x; then
43683      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43684    fi
43685  fi
43686
43687      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43688    fi
43689
43690    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43691      OPENWIN_HOME="/usr/openwin"
43692      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43693      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43694          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43695          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43696          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43697    fi
43698
43699    ac_ext=c
43700ac_cpp='$CPP $CPPFLAGS'
43701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43703ac_compiler_gnu=$ac_cv_c_compiler_gnu
43704
43705    OLD_CFLAGS="$CFLAGS"
43706    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43707
43708    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43709    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43710do :
43711  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43712ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43713          # include <X11/Xlib.h>
43714          # include <X11/Xutil.h>
43715
43716
43717"
43718if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43719  cat >>confdefs.h <<_ACEOF
43720#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43721_ACEOF
43722 X11_HEADERS_OK=yes
43723else
43724  X11_HEADERS_OK=no; break
43725fi
43726
43727done
43728
43729
43730    if test "x$X11_HEADERS_OK" = xno; then
43731
43732  # Print a helpful message on how to acquire the necessary build dependency.
43733  # x11 is the help tag: freetype, cups, pulse, alsa etc
43734  MISSING_DEPENDENCY=x11
43735
43736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43737    cygwin_help $MISSING_DEPENDENCY
43738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43739    msys_help $MISSING_DEPENDENCY
43740  else
43741    PKGHANDLER_COMMAND=
43742
43743    case $PKGHANDLER in
43744      apt-get)
43745        apt_help     $MISSING_DEPENDENCY ;;
43746      yum)
43747        yum_help     $MISSING_DEPENDENCY ;;
43748      port)
43749        port_help    $MISSING_DEPENDENCY ;;
43750      pkgutil)
43751        pkgutil_help $MISSING_DEPENDENCY ;;
43752      pkgadd)
43753        pkgadd_help  $MISSING_DEPENDENCY ;;
43754    esac
43755
43756    if test "x$PKGHANDLER_COMMAND" != x; then
43757      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43758    fi
43759  fi
43760
43761      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43762    fi
43763
43764    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43765    # defined in libawt_xawt.
43766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43767$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43768    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43769/* end confdefs.h.  */
43770#include <X11/extensions/Xrender.h>
43771int
43772main ()
43773{
43774XLinearGradient x;
43775  ;
43776  return 0;
43777}
43778_ACEOF
43779if ac_fn_c_try_compile "$LINENO"; then :
43780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43781$as_echo "yes" >&6; }
43782else
43783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43784$as_echo "no" >&6; }
43785         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43786fi
43787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43788
43789    CFLAGS="$OLD_CFLAGS"
43790    ac_ext=cpp
43791ac_cpp='$CXXCPP $CPPFLAGS'
43792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43795
43796  fi # X11_NOT_NEEDED
43797
43798
43799
43800
43801
43802
43803  ###############################################################################
43804  #
43805  # The common unix printing system cups is used to print from java.
43806  #
43807
43808# Check whether --with-cups was given.
43809if test "${with_cups+set}" = set; then :
43810  withval=$with_cups;
43811fi
43812
43813
43814# Check whether --with-cups-include was given.
43815if test "${with_cups_include+set}" = set; then :
43816  withval=$with_cups_include;
43817fi
43818
43819
43820  if test "x$CUPS_NOT_NEEDED" = xyes; then
43821    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43822      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43823$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43824    fi
43825    CUPS_CFLAGS=
43826  else
43827    CUPS_FOUND=no
43828
43829    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43830      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43831    fi
43832
43833    if test "x${with_cups}" != x; then
43834      CUPS_CFLAGS="-I${with_cups}/include"
43835      CUPS_FOUND=yes
43836    fi
43837    if test "x${with_cups_include}" != x; then
43838      CUPS_CFLAGS="-I${with_cups_include}"
43839      CUPS_FOUND=yes
43840    fi
43841    if test "x$CUPS_FOUND" = xno; then
43842
43843
43844  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43845    # Source the builddeps file again, to make sure it uses the latest variables!
43846    . $builddepsfile
43847    # Look for a target and build machine specific resource!
43848    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43849    if test "x$resource" = x; then
43850      # Ok, lets instead look for a target specific resource
43851      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43852    fi
43853    if test "x$resource" = x; then
43854      # Ok, lets instead look for a build specific resource
43855      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43856    fi
43857    if test "x$resource" = x; then
43858      # Ok, lets instead look for a generic resource
43859      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43860      resource=${builddep_cups}
43861    fi
43862    if test "x$resource" != x; then
43863      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43864$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43865      # If the resource in the builddeps.conf file is an existing directory,
43866      # for example /java/linux/cups
43867      if test -d ${resource}; then
43868        depdir=${resource}
43869      else
43870
43871  # cups is for example mymodule
43872  # $resource is for example libs/general/libmymod_1_2_3.zip
43873  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43874  # $with_builddeps_dir is for example /localhome/builddeps
43875  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43876  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43877  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43878  filename=`basename $resource`
43879  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43880  filebase=${filename%%.*}
43881  extension=${filename#*.}
43882  installdir=$with_builddeps_dir/$filebase
43883  if test ! -f $installdir/$filename.unpacked; then
43884    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43885$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43886    if test ! -d $installdir; then
43887      mkdir -p $installdir
43888    fi
43889    if test ! -d $installdir; then
43890      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43891    fi
43892    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43893    touch $tmpfile
43894    if test ! -f $tmpfile; then
43895      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43896    fi
43897
43898  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43899  # $tmpfile is the local file name for the downloaded file.
43900  VALID_TOOL=no
43901  if test "x$BDEPS_FTP" = xwget; then
43902    VALID_TOOL=yes
43903    wget -O $tmpfile $with_builddeps_server/$resource
43904  fi
43905  if test "x$BDEPS_FTP" = xlftp; then
43906    VALID_TOOL=yes
43907    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43908  fi
43909  if test "x$BDEPS_FTP" = xftp; then
43910    VALID_TOOL=yes
43911    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43912    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43913    FTPUSERPWD=${FTPSERVER%%@*}
43914    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43915      FTPUSER=${userpwd%%:*}
43916      FTPPWD=${userpwd#*@}
43917      FTPSERVER=${FTPSERVER#*@}
43918    else
43919      FTPUSER=ftp
43920      FTPPWD=ftp
43921    fi
43922    # the "pass" command does not work on some
43923    # ftp clients (read ftp.exe) but if it works,
43924    # passive mode is better!
43925    ( \
43926        echo "user $FTPUSER $FTPPWD"        ; \
43927        echo "pass"                         ; \
43928        echo "bin"                          ; \
43929        echo "get $FTPPATH $tmpfile"              ; \
43930    ) | ftp -in $FTPSERVER
43931  fi
43932  if test "x$VALID_TOOL" != xyes; then
43933    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43934  fi
43935
43936    mv $tmpfile $installdir/$filename
43937    if test ! -s $installdir/$filename; then
43938      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43939    fi
43940    case "$extension" in
43941      zip)  echo "Unzipping $installdir/$filename..."
43942        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43943        ;;
43944      tar.gz) echo "Untaring $installdir/$filename..."
43945        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43946        ;;
43947      tgz) echo "Untaring $installdir/$filename..."
43948        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43949        ;;
43950      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43951        ;;
43952    esac
43953  fi
43954  if test -f $installdir/$filename.unpacked; then
43955    depdir=$installdir
43956  fi
43957
43958      fi
43959      # Source the builddeps file again, because in the previous command, the depdir
43960      # was updated to point at the current build dependency install directory.
43961      . $builddepsfile
43962      # Now extract variables from the builddeps.conf files.
43963      theroot=${builddep_cups_ROOT}
43964      thecflags=${builddep_cups_CFLAGS}
43965      thelibs=${builddep_cups_LIBS}
43966      if test "x$depdir" = x; then
43967        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43968      fi
43969      CUPS=$depdir
43970      if test "x$theroot" != x; then
43971        CUPS="$theroot"
43972      fi
43973      if test "x$thecflags" != x; then
43974        CUPS_CFLAGS="$thecflags"
43975      fi
43976      if test "x$thelibs" != x; then
43977        CUPS_LIBS="$thelibs"
43978      fi
43979      CUPS_FOUND=yes
43980
43981    fi
43982
43983  fi
43984
43985    fi
43986    if test "x$CUPS_FOUND" = xno; then
43987      # Are the cups headers installed in the default /usr/include location?
43988      for ac_header in cups/cups.h cups/ppd.h
43989do :
43990  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43991ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43992if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43993  cat >>confdefs.h <<_ACEOF
43994#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43995_ACEOF
43996
43997            CUPS_FOUND=yes
43998            CUPS_CFLAGS=
43999            DEFAULT_CUPS=yes
44000
44001
44002fi
44003
44004done
44005
44006    fi
44007    if test "x$CUPS_FOUND" = xno; then
44008      # Getting nervous now? Lets poke around for standard Solaris third-party
44009      # package installation locations.
44010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44011$as_echo_n "checking for cups headers... " >&6; }
44012      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44013        # An SFW package seems to be installed!
44014        CUPS_FOUND=yes
44015        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44016      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44017        # A CSW package seems to be installed!
44018        CUPS_FOUND=yes
44019        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44020      fi
44021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44022$as_echo "$CUPS_FOUND" >&6; }
44023    fi
44024    if test "x$CUPS_FOUND" = xno; then
44025
44026  # Print a helpful message on how to acquire the necessary build dependency.
44027  # cups is the help tag: freetype, cups, pulse, alsa etc
44028  MISSING_DEPENDENCY=cups
44029
44030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44031    cygwin_help $MISSING_DEPENDENCY
44032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44033    msys_help $MISSING_DEPENDENCY
44034  else
44035    PKGHANDLER_COMMAND=
44036
44037    case $PKGHANDLER in
44038      apt-get)
44039        apt_help     $MISSING_DEPENDENCY ;;
44040      yum)
44041        yum_help     $MISSING_DEPENDENCY ;;
44042      port)
44043        port_help    $MISSING_DEPENDENCY ;;
44044      pkgutil)
44045        pkgutil_help $MISSING_DEPENDENCY ;;
44046      pkgadd)
44047        pkgadd_help  $MISSING_DEPENDENCY ;;
44048    esac
44049
44050    if test "x$PKGHANDLER_COMMAND" != x; then
44051      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44052    fi
44053  fi
44054
44055      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44056    fi
44057  fi
44058
44059
44060
44061
44062
44063
44064  ###############################################################################
44065  #
44066  # The ubiquitous freetype library is used to render fonts.
44067  #
44068
44069# Check whether --with-freetype was given.
44070if test "${with_freetype+set}" = set; then :
44071  withval=$with_freetype;
44072fi
44073
44074
44075# Check whether --with-freetype-include was given.
44076if test "${with_freetype_include+set}" = set; then :
44077  withval=$with_freetype_include;
44078fi
44079
44080
44081# Check whether --with-freetype-lib was given.
44082if test "${with_freetype_lib+set}" = set; then :
44083  withval=$with_freetype_lib;
44084fi
44085
44086
44087# Check whether --with-freetype-src was given.
44088if test "${with_freetype_src+set}" = set; then :
44089  withval=$with_freetype_src;
44090fi
44091
44092  # Check whether --enable-freetype-bundling was given.
44093if test "${enable_freetype_bundling+set}" = set; then :
44094  enableval=$enable_freetype_bundling;
44095fi
44096
44097
44098  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44099  FREETYPE_BASE_NAME=freetype
44100  FREETYPE_CFLAGS=
44101  FREETYPE_LIBS=
44102  FREETYPE_BUNDLE_LIB_PATH=
44103
44104  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44105    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44106      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44107$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44108    fi
44109    if test "x$enable_freetype_bundling" != x; then
44110      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44111$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44112    fi
44113  else
44114    # freetype is needed to build; go get it!
44115
44116    BUNDLE_FREETYPE="$enable_freetype_bundling"
44117
44118    if  test "x$with_freetype_src" != x; then
44119      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44120        # Try to build freetype if --with-freetype-src was given on Windows
44121
44122  FREETYPE_SRC_PATH="$with_freetype_src"
44123  BUILD_FREETYPE=yes
44124
44125  # Check if the freetype sources are acessible..
44126  if ! test -d $FREETYPE_SRC_PATH; then
44127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44128$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44129    BUILD_FREETYPE=no
44130  fi
44131  # ..and contain a vc2010 project file
44132  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44133  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44135$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44136    BUILD_FREETYPE=no
44137  fi
44138  # Now check if configure found a version of 'msbuild.exe'
44139  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44140    { $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
44141$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;}
44142    BUILD_FREETYPE=no
44143  fi
44144
44145  # Ready to go..
44146  if test "x$BUILD_FREETYPE" = xyes; then
44147
44148    # msbuild requires trailing slashes for output directories
44149    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44150    freetype_lib_path_unix="$freetype_lib_path"
44151    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44152
44153  unix_path="$vcxproj_path"
44154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44155    windows_path=`$CYGPATH -m "$unix_path"`
44156    vcxproj_path="$windows_path"
44157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44158    windows_path=`cmd //c echo $unix_path`
44159    vcxproj_path="$windows_path"
44160  fi
44161
44162
44163  unix_path="$freetype_lib_path"
44164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44165    windows_path=`$CYGPATH -m "$unix_path"`
44166    freetype_lib_path="$windows_path"
44167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44168    windows_path=`cmd //c echo $unix_path`
44169    freetype_lib_path="$windows_path"
44170  fi
44171
44172
44173  unix_path="$freetype_obj_path"
44174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44175    windows_path=`$CYGPATH -m "$unix_path"`
44176    freetype_obj_path="$windows_path"
44177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44178    windows_path=`cmd //c echo $unix_path`
44179    freetype_obj_path="$windows_path"
44180  fi
44181
44182    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44183      freetype_platform=x64
44184    else
44185      freetype_platform=win32
44186    fi
44187
44188    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44189    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44190    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44191    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44192    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44193$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44194
44195    # First we try to build the freetype.dll
44196    $ECHO -e "@echo off\n"\
44197	     "$MSBUILD $vcxproj_path "\
44198		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44199		       "/p:Configuration=\"Release Multithreaded\" "\
44200		       "/p:Platform=$freetype_platform "\
44201		       "/p:ConfigurationType=DynamicLibrary "\
44202		       "/p:TargetName=freetype "\
44203		       "/p:OutDir=\"$freetype_lib_path\" "\
44204		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44205    cmd /c freetype.bat
44206
44207    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44208      # If that succeeds we also build freetype.lib
44209      $ECHO -e "@echo off\n"\
44210	       "$MSBUILD $vcxproj_path "\
44211			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44212			 "/p:Configuration=\"Release Multithreaded\" "\
44213			 "/p:Platform=$freetype_platform "\
44214			 "/p:ConfigurationType=StaticLibrary "\
44215			 "/p:TargetName=freetype "\
44216			 "/p:OutDir=\"$freetype_lib_path\" "\
44217			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44218      cmd /c freetype.bat
44219
44220      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44221	# Once we build both, lib and dll, set freetype lib and include path appropriately
44222	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44223	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44224	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44225$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44226      else
44227	BUILD_FREETYPE=no
44228      fi
44229    else
44230      BUILD_FREETYPE=no
44231    fi
44232  fi
44233
44234        if test "x$BUILD_FREETYPE" = xyes; then
44235          # Okay, we built it. Check that it works.
44236
44237  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44238  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44239  METHOD="--with-freetype-src"
44240
44241  # Let's start with an optimistic view of the world :-)
44242  FOUND_FREETYPE=yes
44243
44244  # First look for the canonical freetype main include file ft2build.h.
44245  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44246    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44247    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44248    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44249      # Fail.
44250      FOUND_FREETYPE=no
44251    fi
44252  fi
44253
44254  if test "x$FOUND_FREETYPE" = xyes; then
44255    # Include file found, let's continue the sanity check.
44256    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44257$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44258
44259    # Reset to default value
44260    FREETYPE_BASE_NAME=freetype
44261    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44262    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44263      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44264          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44265        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44266        # for the .6 version explicitly.
44267        FREETYPE_BASE_NAME=freetype.6
44268        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44269        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44270$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44271      else
44272        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44273$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44274        FOUND_FREETYPE=no
44275      fi
44276    else
44277      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44278        # On Windows, we will need both .lib and .dll file.
44279        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44280          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44281$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44282          FOUND_FREETYPE=no
44283        fi
44284      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44285          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44286        # Found lib in isa dir, use that instead.
44287        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44288        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44289$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44290      fi
44291    fi
44292  fi
44293
44294  if test "x$FOUND_FREETYPE" = xyes; then
44295
44296  # Only process if variable expands to non-empty
44297
44298  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44300
44301  # Input might be given as Windows format, start by converting to
44302  # unix format.
44303  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44304  new_path=`$CYGPATH -u "$path"`
44305
44306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44309  # "foo.exe" is OK but "foo" is an error.
44310  #
44311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44312  # It is also a way to make sure we got the proper file name for the real test later on.
44313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44314  if test "x$test_shortpath" = x; then
44315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44316$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44317    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44318  fi
44319
44320  # Call helper function which possibly converts this using DOS-style short mode.
44321  # If so, the updated path is stored in $new_path.
44322
44323  input_path="$new_path"
44324  # Check if we need to convert this using DOS-style short mode. If the path
44325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44326  # take no chances and rewrite it.
44327  # Note: m4 eats our [], so we need to use [ and ] instead.
44328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44329  if test "x$has_forbidden_chars" != x; then
44330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44334      # Going to short mode and back again did indeed matter. Since short mode is
44335      # case insensitive, let's make it lowercase to improve readability.
44336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44337      # Now convert it back to Unix-style (cygpath)
44338      input_path=`$CYGPATH -u "$shortmode_path"`
44339      new_path="$input_path"
44340    fi
44341  fi
44342
44343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44344  if test "x$test_cygdrive_prefix" = x; then
44345    # As a simple fix, exclude /usr/bin since it's not a real path.
44346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44348      # a path prefixed by /cygdrive for fixpath to work.
44349      new_path="$CYGWIN_ROOT_PATH$input_path"
44350    fi
44351  fi
44352
44353
44354  if test "x$path" != "x$new_path"; then
44355    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44357$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44358  fi
44359
44360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44361
44362  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44363  has_colon=`$ECHO $path | $GREP ^.:`
44364  new_path="$path"
44365  if test "x$has_colon" = x; then
44366    # Not in mixed or Windows style, start by that.
44367    new_path=`cmd //c echo $path`
44368  fi
44369
44370
44371  input_path="$new_path"
44372  # Check if we need to convert this using DOS-style short mode. If the path
44373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44374  # take no chances and rewrite it.
44375  # Note: m4 eats our [], so we need to use [ and ] instead.
44376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44377  if test "x$has_forbidden_chars" != x; then
44378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44380  fi
44381
44382
44383  windows_path="$new_path"
44384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44385    unix_path=`$CYGPATH -u "$windows_path"`
44386    new_path="$unix_path"
44387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44389    new_path="$unix_path"
44390  fi
44391
44392  if test "x$path" != "x$new_path"; then
44393    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44396  fi
44397
44398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44400
44401    else
44402      # We're on a unix platform. Hooray! :)
44403      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44404      has_space=`$ECHO "$path" | $GREP " "`
44405      if test "x$has_space" != x; then
44406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44409      fi
44410
44411      # Use eval to expand a potential ~
44412      eval path="$path"
44413      if test ! -f "$path" && test ! -d "$path"; then
44414        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44415      fi
44416
44417      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44418    fi
44419  fi
44420
44421
44422  # Only process if variable expands to non-empty
44423
44424  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426
44427  # Input might be given as Windows format, start by converting to
44428  # unix format.
44429  path="$POTENTIAL_FREETYPE_LIB_PATH"
44430  new_path=`$CYGPATH -u "$path"`
44431
44432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44435  # "foo.exe" is OK but "foo" is an error.
44436  #
44437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44438  # It is also a way to make sure we got the proper file name for the real test later on.
44439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44440  if test "x$test_shortpath" = x; then
44441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44443    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44444  fi
44445
44446  # Call helper function which possibly converts this using DOS-style short mode.
44447  # If so, the updated path is stored in $new_path.
44448
44449  input_path="$new_path"
44450  # Check if we need to convert this using DOS-style short mode. If the path
44451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44452  # take no chances and rewrite it.
44453  # Note: m4 eats our [], so we need to use [ and ] instead.
44454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44455  if test "x$has_forbidden_chars" != x; then
44456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44460      # Going to short mode and back again did indeed matter. Since short mode is
44461      # case insensitive, let's make it lowercase to improve readability.
44462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44463      # Now convert it back to Unix-style (cygpath)
44464      input_path=`$CYGPATH -u "$shortmode_path"`
44465      new_path="$input_path"
44466    fi
44467  fi
44468
44469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44470  if test "x$test_cygdrive_prefix" = x; then
44471    # As a simple fix, exclude /usr/bin since it's not a real path.
44472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44474      # a path prefixed by /cygdrive for fixpath to work.
44475      new_path="$CYGWIN_ROOT_PATH$input_path"
44476    fi
44477  fi
44478
44479
44480  if test "x$path" != "x$new_path"; then
44481    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44484  fi
44485
44486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44487
44488  path="$POTENTIAL_FREETYPE_LIB_PATH"
44489  has_colon=`$ECHO $path | $GREP ^.:`
44490  new_path="$path"
44491  if test "x$has_colon" = x; then
44492    # Not in mixed or Windows style, start by that.
44493    new_path=`cmd //c echo $path`
44494  fi
44495
44496
44497  input_path="$new_path"
44498  # Check if we need to convert this using DOS-style short mode. If the path
44499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44500  # take no chances and rewrite it.
44501  # Note: m4 eats our [], so we need to use [ and ] instead.
44502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44503  if test "x$has_forbidden_chars" != x; then
44504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44506  fi
44507
44508
44509  windows_path="$new_path"
44510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44511    unix_path=`$CYGPATH -u "$windows_path"`
44512    new_path="$unix_path"
44513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44515    new_path="$unix_path"
44516  fi
44517
44518  if test "x$path" != "x$new_path"; then
44519    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44522  fi
44523
44524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44526
44527    else
44528      # We're on a unix platform. Hooray! :)
44529      path="$POTENTIAL_FREETYPE_LIB_PATH"
44530      has_space=`$ECHO "$path" | $GREP " "`
44531      if test "x$has_space" != x; then
44532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44535      fi
44536
44537      # Use eval to expand a potential ~
44538      eval path="$path"
44539      if test ! -f "$path" && test ! -d "$path"; then
44540        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44541      fi
44542
44543      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44544    fi
44545  fi
44546
44547
44548    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44550$as_echo_n "checking for freetype includes... " >&6; }
44551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44552$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44553    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44555$as_echo_n "checking for freetype libraries... " >&6; }
44556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44557$as_echo "$FREETYPE_LIB_PATH" >&6; }
44558  fi
44559
44560          if test "x$FOUND_FREETYPE" != xyes; then
44561            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44562          fi
44563        else
44564          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44565$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44566          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44567        fi
44568      else
44569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44570$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44571      fi
44572    fi
44573
44574    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44575      # User has specified settings
44576
44577      if test "x$BUNDLE_FREETYPE" = x; then
44578        # If not specified, default is to bundle freetype
44579        BUNDLE_FREETYPE=yes
44580      fi
44581
44582      if test "x$with_freetype" != x; then
44583        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44584        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44585      fi
44586
44587      # Allow --with-freetype-lib and --with-freetype-include to override
44588      if test "x$with_freetype_include" != x; then
44589        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44590      fi
44591      if test "x$with_freetype_lib" != x; then
44592        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44593      fi
44594
44595      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44596        # Okay, we got it. Check that it works.
44597
44598  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44599  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44600  METHOD="--with-freetype"
44601
44602  # Let's start with an optimistic view of the world :-)
44603  FOUND_FREETYPE=yes
44604
44605  # First look for the canonical freetype main include file ft2build.h.
44606  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44607    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44608    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44609    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44610      # Fail.
44611      FOUND_FREETYPE=no
44612    fi
44613  fi
44614
44615  if test "x$FOUND_FREETYPE" = xyes; then
44616    # Include file found, let's continue the sanity check.
44617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44618$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44619
44620    # Reset to default value
44621    FREETYPE_BASE_NAME=freetype
44622    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44623    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44624      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44625          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44626        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44627        # for the .6 version explicitly.
44628        FREETYPE_BASE_NAME=freetype.6
44629        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44630        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44631$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44632      else
44633        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44634$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44635        FOUND_FREETYPE=no
44636      fi
44637    else
44638      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44639        # On Windows, we will need both .lib and .dll file.
44640        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44641          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44643          FOUND_FREETYPE=no
44644        fi
44645      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44647        # Found lib in isa dir, use that instead.
44648        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44650$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44651      fi
44652    fi
44653  fi
44654
44655  if test "x$FOUND_FREETYPE" = xyes; then
44656
44657  # Only process if variable expands to non-empty
44658
44659  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661
44662  # Input might be given as Windows format, start by converting to
44663  # unix format.
44664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44665  new_path=`$CYGPATH -u "$path"`
44666
44667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44670  # "foo.exe" is OK but "foo" is an error.
44671  #
44672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44673  # It is also a way to make sure we got the proper file name for the real test later on.
44674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44675  if test "x$test_shortpath" = x; then
44676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44678    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44679  fi
44680
44681  # Call helper function which possibly converts this using DOS-style short mode.
44682  # If so, the updated path is stored in $new_path.
44683
44684  input_path="$new_path"
44685  # Check if we need to convert this using DOS-style short mode. If the path
44686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44687  # take no chances and rewrite it.
44688  # Note: m4 eats our [], so we need to use [ and ] instead.
44689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44690  if test "x$has_forbidden_chars" != x; then
44691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44695      # Going to short mode and back again did indeed matter. Since short mode is
44696      # case insensitive, let's make it lowercase to improve readability.
44697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44698      # Now convert it back to Unix-style (cygpath)
44699      input_path=`$CYGPATH -u "$shortmode_path"`
44700      new_path="$input_path"
44701    fi
44702  fi
44703
44704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44705  if test "x$test_cygdrive_prefix" = x; then
44706    # As a simple fix, exclude /usr/bin since it's not a real path.
44707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44709      # a path prefixed by /cygdrive for fixpath to work.
44710      new_path="$CYGWIN_ROOT_PATH$input_path"
44711    fi
44712  fi
44713
44714
44715  if test "x$path" != "x$new_path"; then
44716    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44719  fi
44720
44721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44722
44723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44724  has_colon=`$ECHO $path | $GREP ^.:`
44725  new_path="$path"
44726  if test "x$has_colon" = x; then
44727    # Not in mixed or Windows style, start by that.
44728    new_path=`cmd //c echo $path`
44729  fi
44730
44731
44732  input_path="$new_path"
44733  # Check if we need to convert this using DOS-style short mode. If the path
44734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44735  # take no chances and rewrite it.
44736  # Note: m4 eats our [], so we need to use [ and ] instead.
44737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44738  if test "x$has_forbidden_chars" != x; then
44739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44741  fi
44742
44743
44744  windows_path="$new_path"
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746    unix_path=`$CYGPATH -u "$windows_path"`
44747    new_path="$unix_path"
44748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44750    new_path="$unix_path"
44751  fi
44752
44753  if test "x$path" != "x$new_path"; then
44754    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44757  fi
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
44762    else
44763      # We're on a unix platform. Hooray! :)
44764      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44765      has_space=`$ECHO "$path" | $GREP " "`
44766      if test "x$has_space" != x; then
44767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44770      fi
44771
44772      # Use eval to expand a potential ~
44773      eval path="$path"
44774      if test ! -f "$path" && test ! -d "$path"; then
44775        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44776      fi
44777
44778      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44779    fi
44780  fi
44781
44782
44783  # Only process if variable expands to non-empty
44784
44785  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44787
44788  # Input might be given as Windows format, start by converting to
44789  # unix format.
44790  path="$POTENTIAL_FREETYPE_LIB_PATH"
44791  new_path=`$CYGPATH -u "$path"`
44792
44793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44796  # "foo.exe" is OK but "foo" is an error.
44797  #
44798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44799  # It is also a way to make sure we got the proper file name for the real test later on.
44800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44801  if test "x$test_shortpath" = x; then
44802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44804    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44805  fi
44806
44807  # Call helper function which possibly converts this using DOS-style short mode.
44808  # If so, the updated path is stored in $new_path.
44809
44810  input_path="$new_path"
44811  # Check if we need to convert this using DOS-style short mode. If the path
44812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44813  # take no chances and rewrite it.
44814  # Note: m4 eats our [], so we need to use [ and ] instead.
44815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44816  if test "x$has_forbidden_chars" != x; then
44817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44821      # Going to short mode and back again did indeed matter. Since short mode is
44822      # case insensitive, let's make it lowercase to improve readability.
44823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44824      # Now convert it back to Unix-style (cygpath)
44825      input_path=`$CYGPATH -u "$shortmode_path"`
44826      new_path="$input_path"
44827    fi
44828  fi
44829
44830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44831  if test "x$test_cygdrive_prefix" = x; then
44832    # As a simple fix, exclude /usr/bin since it's not a real path.
44833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44835      # a path prefixed by /cygdrive for fixpath to work.
44836      new_path="$CYGWIN_ROOT_PATH$input_path"
44837    fi
44838  fi
44839
44840
44841  if test "x$path" != "x$new_path"; then
44842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44845  fi
44846
44847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44848
44849  path="$POTENTIAL_FREETYPE_LIB_PATH"
44850  has_colon=`$ECHO $path | $GREP ^.:`
44851  new_path="$path"
44852  if test "x$has_colon" = x; then
44853    # Not in mixed or Windows style, start by that.
44854    new_path=`cmd //c echo $path`
44855  fi
44856
44857
44858  input_path="$new_path"
44859  # Check if we need to convert this using DOS-style short mode. If the path
44860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44861  # take no chances and rewrite it.
44862  # Note: m4 eats our [], so we need to use [ and ] instead.
44863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44864  if test "x$has_forbidden_chars" != x; then
44865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44867  fi
44868
44869
44870  windows_path="$new_path"
44871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872    unix_path=`$CYGPATH -u "$windows_path"`
44873    new_path="$unix_path"
44874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44876    new_path="$unix_path"
44877  fi
44878
44879  if test "x$path" != "x$new_path"; then
44880    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44883  fi
44884
44885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44887
44888    else
44889      # We're on a unix platform. Hooray! :)
44890      path="$POTENTIAL_FREETYPE_LIB_PATH"
44891      has_space=`$ECHO "$path" | $GREP " "`
44892      if test "x$has_space" != x; then
44893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44896      fi
44897
44898      # Use eval to expand a potential ~
44899      eval path="$path"
44900      if test ! -f "$path" && test ! -d "$path"; then
44901        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44902      fi
44903
44904      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44905    fi
44906  fi
44907
44908
44909    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44911$as_echo_n "checking for freetype includes... " >&6; }
44912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44913$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44914    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44916$as_echo_n "checking for freetype libraries... " >&6; }
44917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44918$as_echo "$FREETYPE_LIB_PATH" >&6; }
44919  fi
44920
44921        if test "x$FOUND_FREETYPE" != xyes; then
44922          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44923        fi
44924      else
44925        # User specified only one of lib or include. This is an error.
44926        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44927          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44928$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44929          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44930        else
44931          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44932$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44933          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44934        fi
44935      fi
44936    else
44937      # User did not specify settings, but we need freetype. Try to locate it.
44938
44939      if test "x$BUNDLE_FREETYPE" = x; then
44940        # If not specified, default is to bundle freetype only on windows
44941        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44942          BUNDLE_FREETYPE=yes
44943        else
44944          BUNDLE_FREETYPE=no
44945        fi
44946      fi
44947
44948      if test "x$FOUND_FREETYPE" != xyes; then
44949        # Check builddeps
44950
44951
44952  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44953    # Source the builddeps file again, to make sure it uses the latest variables!
44954    . $builddepsfile
44955    # Look for a target and build machine specific resource!
44956    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44957    if test "x$resource" = x; then
44958      # Ok, lets instead look for a target specific resource
44959      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44960    fi
44961    if test "x$resource" = x; then
44962      # Ok, lets instead look for a build specific resource
44963      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44964    fi
44965    if test "x$resource" = x; then
44966      # Ok, lets instead look for a generic resource
44967      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44968      resource=${builddep_freetype2}
44969    fi
44970    if test "x$resource" != x; then
44971      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44972$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44973      # If the resource in the builddeps.conf file is an existing directory,
44974      # for example /java/linux/cups
44975      if test -d ${resource}; then
44976        depdir=${resource}
44977      else
44978
44979  # freetype2 is for example mymodule
44980  # $resource is for example libs/general/libmymod_1_2_3.zip
44981  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44982  # $with_builddeps_dir is for example /localhome/builddeps
44983  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44984  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44985  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44986  filename=`basename $resource`
44987  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44988  filebase=${filename%%.*}
44989  extension=${filename#*.}
44990  installdir=$with_builddeps_dir/$filebase
44991  if test ! -f $installdir/$filename.unpacked; then
44992    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44993$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44994    if test ! -d $installdir; then
44995      mkdir -p $installdir
44996    fi
44997    if test ! -d $installdir; then
44998      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44999    fi
45000    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45001    touch $tmpfile
45002    if test ! -f $tmpfile; then
45003      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45004    fi
45005
45006  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45007  # $tmpfile is the local file name for the downloaded file.
45008  VALID_TOOL=no
45009  if test "x$BDEPS_FTP" = xwget; then
45010    VALID_TOOL=yes
45011    wget -O $tmpfile $with_builddeps_server/$resource
45012  fi
45013  if test "x$BDEPS_FTP" = xlftp; then
45014    VALID_TOOL=yes
45015    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45016  fi
45017  if test "x$BDEPS_FTP" = xftp; then
45018    VALID_TOOL=yes
45019    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45020    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45021    FTPUSERPWD=${FTPSERVER%%@*}
45022    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45023      FTPUSER=${userpwd%%:*}
45024      FTPPWD=${userpwd#*@}
45025      FTPSERVER=${FTPSERVER#*@}
45026    else
45027      FTPUSER=ftp
45028      FTPPWD=ftp
45029    fi
45030    # the "pass" command does not work on some
45031    # ftp clients (read ftp.exe) but if it works,
45032    # passive mode is better!
45033    ( \
45034        echo "user $FTPUSER $FTPPWD"        ; \
45035        echo "pass"                         ; \
45036        echo "bin"                          ; \
45037        echo "get $FTPPATH $tmpfile"              ; \
45038    ) | ftp -in $FTPSERVER
45039  fi
45040  if test "x$VALID_TOOL" != xyes; then
45041    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45042  fi
45043
45044    mv $tmpfile $installdir/$filename
45045    if test ! -s $installdir/$filename; then
45046      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45047    fi
45048    case "$extension" in
45049      zip)  echo "Unzipping $installdir/$filename..."
45050        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45051        ;;
45052      tar.gz) echo "Untaring $installdir/$filename..."
45053        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45054        ;;
45055      tgz) echo "Untaring $installdir/$filename..."
45056        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45057        ;;
45058      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45059        ;;
45060    esac
45061  fi
45062  if test -f $installdir/$filename.unpacked; then
45063    depdir=$installdir
45064  fi
45065
45066      fi
45067      # Source the builddeps file again, because in the previous command, the depdir
45068      # was updated to point at the current build dependency install directory.
45069      . $builddepsfile
45070      # Now extract variables from the builddeps.conf files.
45071      theroot=${builddep_freetype2_ROOT}
45072      thecflags=${builddep_freetype2_CFLAGS}
45073      thelibs=${builddep_freetype2_LIBS}
45074      if test "x$depdir" = x; then
45075        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45076      fi
45077      FREETYPE=$depdir
45078      if test "x$theroot" != x; then
45079        FREETYPE="$theroot"
45080      fi
45081      if test "x$thecflags" != x; then
45082        FREETYPE_CFLAGS="$thecflags"
45083      fi
45084      if test "x$thelibs" != x; then
45085        FREETYPE_LIBS="$thelibs"
45086      fi
45087      FOUND_FREETYPE=yes
45088      else FOUND_FREETYPE=no
45089
45090    fi
45091    else FOUND_FREETYPE=no
45092
45093  fi
45094
45095        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45096        if test "x$FOUND_FREETYPE" = xyes; then
45097          if test "x$BUNDLE_FREETYPE" = xyes; then
45098            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45099$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45100            FOUND_FREETYPE=no
45101          else
45102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45103$as_echo_n "checking for freetype... " >&6; }
45104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45105$as_echo "yes (using builddeps)" >&6; }
45106          fi
45107        fi
45108      fi
45109
45110      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45111      if test "x$SYSROOT" = x; then
45112        if test "x$FOUND_FREETYPE" != xyes; then
45113          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45114          if test "x$PKG_CONFIG" != x; then
45115
45116pkg_failed=no
45117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45118$as_echo_n "checking for FREETYPE... " >&6; }
45119
45120if test -n "$FREETYPE_CFLAGS"; then
45121    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45122 elif test -n "$PKG_CONFIG"; then
45123    if test -n "$PKG_CONFIG" && \
45124    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45125  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45126  ac_status=$?
45127  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45128  test $ac_status = 0; }; then
45129  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45130else
45131  pkg_failed=yes
45132fi
45133 else
45134    pkg_failed=untried
45135fi
45136if test -n "$FREETYPE_LIBS"; then
45137    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45138 elif test -n "$PKG_CONFIG"; then
45139    if test -n "$PKG_CONFIG" && \
45140    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45141  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45142  ac_status=$?
45143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45144  test $ac_status = 0; }; then
45145  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45146else
45147  pkg_failed=yes
45148fi
45149 else
45150    pkg_failed=untried
45151fi
45152
45153
45154
45155if test $pkg_failed = yes; then
45156
45157if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45158        _pkg_short_errors_supported=yes
45159else
45160        _pkg_short_errors_supported=no
45161fi
45162        if test $_pkg_short_errors_supported = yes; then
45163	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45164        else
45165	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45166        fi
45167	# Put the nasty error message in config.log where it belongs
45168	echo "$FREETYPE_PKG_ERRORS" >&5
45169
45170	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45171$as_echo "no" >&6; }
45172                FOUND_FREETYPE=no
45173elif test $pkg_failed = untried; then
45174	FOUND_FREETYPE=no
45175else
45176	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45177	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45179$as_echo "yes" >&6; }
45180	FOUND_FREETYPE=yes
45181fi
45182            if test "x$FOUND_FREETYPE" = xyes; then
45183              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45184              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45185              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45186              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45187                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45188              fi
45189              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45190              if test "x$BUNDLE_FREETYPE" = xyes; then
45191                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45192$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45193                FOUND_FREETYPE=no
45194              else
45195                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45196$as_echo_n "checking for freetype... " >&6; }
45197                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45198$as_echo "yes (using pkg-config)" >&6; }
45199              fi
45200            fi
45201          fi
45202        fi
45203      fi
45204
45205      if test "x$FOUND_FREETYPE" != xyes; then
45206        # Check in well-known locations
45207        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45208          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45209
45210  windows_path="$FREETYPE_BASE_DIR"
45211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45212    unix_path=`$CYGPATH -u "$windows_path"`
45213    FREETYPE_BASE_DIR="$unix_path"
45214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45216    FREETYPE_BASE_DIR="$unix_path"
45217  fi
45218
45219
45220  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45221  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45222  METHOD="well-known location"
45223
45224  # Let's start with an optimistic view of the world :-)
45225  FOUND_FREETYPE=yes
45226
45227  # First look for the canonical freetype main include file ft2build.h.
45228  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45229    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45230    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45231    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45232      # Fail.
45233      FOUND_FREETYPE=no
45234    fi
45235  fi
45236
45237  if test "x$FOUND_FREETYPE" = xyes; then
45238    # Include file found, let's continue the sanity check.
45239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45240$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45241
45242    # Reset to default value
45243    FREETYPE_BASE_NAME=freetype
45244    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45245    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45246      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45247          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45248        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45249        # for the .6 version explicitly.
45250        FREETYPE_BASE_NAME=freetype.6
45251        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45252        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45253$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45254      else
45255        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45256$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45257        FOUND_FREETYPE=no
45258      fi
45259    else
45260      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45261        # On Windows, we will need both .lib and .dll file.
45262        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45263          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45264$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45265          FOUND_FREETYPE=no
45266        fi
45267      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45269        # Found lib in isa dir, use that instead.
45270        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45271        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45272$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45273      fi
45274    fi
45275  fi
45276
45277  if test "x$FOUND_FREETYPE" = xyes; then
45278
45279  # Only process if variable expands to non-empty
45280
45281  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45283
45284  # Input might be given as Windows format, start by converting to
45285  # unix format.
45286  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45287  new_path=`$CYGPATH -u "$path"`
45288
45289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45292  # "foo.exe" is OK but "foo" is an error.
45293  #
45294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45295  # It is also a way to make sure we got the proper file name for the real test later on.
45296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45297  if test "x$test_shortpath" = x; then
45298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45300    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45301  fi
45302
45303  # Call helper function which possibly converts this using DOS-style short mode.
45304  # If so, the updated path is stored in $new_path.
45305
45306  input_path="$new_path"
45307  # Check if we need to convert this using DOS-style short mode. If the path
45308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45309  # take no chances and rewrite it.
45310  # Note: m4 eats our [], so we need to use [ and ] instead.
45311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45312  if test "x$has_forbidden_chars" != x; then
45313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45317      # Going to short mode and back again did indeed matter. Since short mode is
45318      # case insensitive, let's make it lowercase to improve readability.
45319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45320      # Now convert it back to Unix-style (cygpath)
45321      input_path=`$CYGPATH -u "$shortmode_path"`
45322      new_path="$input_path"
45323    fi
45324  fi
45325
45326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45327  if test "x$test_cygdrive_prefix" = x; then
45328    # As a simple fix, exclude /usr/bin since it's not a real path.
45329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45331      # a path prefixed by /cygdrive for fixpath to work.
45332      new_path="$CYGWIN_ROOT_PATH$input_path"
45333    fi
45334  fi
45335
45336
45337  if test "x$path" != "x$new_path"; then
45338    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45341  fi
45342
45343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344
45345  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45346  has_colon=`$ECHO $path | $GREP ^.:`
45347  new_path="$path"
45348  if test "x$has_colon" = x; then
45349    # Not in mixed or Windows style, start by that.
45350    new_path=`cmd //c echo $path`
45351  fi
45352
45353
45354  input_path="$new_path"
45355  # Check if we need to convert this using DOS-style short mode. If the path
45356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45357  # take no chances and rewrite it.
45358  # Note: m4 eats our [], so we need to use [ and ] instead.
45359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45360  if test "x$has_forbidden_chars" != x; then
45361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45363  fi
45364
45365
45366  windows_path="$new_path"
45367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368    unix_path=`$CYGPATH -u "$windows_path"`
45369    new_path="$unix_path"
45370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45372    new_path="$unix_path"
45373  fi
45374
45375  if test "x$path" != "x$new_path"; then
45376    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45379  fi
45380
45381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45383
45384    else
45385      # We're on a unix platform. Hooray! :)
45386      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45387      has_space=`$ECHO "$path" | $GREP " "`
45388      if test "x$has_space" != x; then
45389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45392      fi
45393
45394      # Use eval to expand a potential ~
45395      eval path="$path"
45396      if test ! -f "$path" && test ! -d "$path"; then
45397        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45398      fi
45399
45400      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45401    fi
45402  fi
45403
45404
45405  # Only process if variable expands to non-empty
45406
45407  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45409
45410  # Input might be given as Windows format, start by converting to
45411  # unix format.
45412  path="$POTENTIAL_FREETYPE_LIB_PATH"
45413  new_path=`$CYGPATH -u "$path"`
45414
45415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45418  # "foo.exe" is OK but "foo" is an error.
45419  #
45420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45421  # It is also a way to make sure we got the proper file name for the real test later on.
45422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45423  if test "x$test_shortpath" = x; then
45424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45426    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45427  fi
45428
45429  # Call helper function which possibly converts this using DOS-style short mode.
45430  # If so, the updated path is stored in $new_path.
45431
45432  input_path="$new_path"
45433  # Check if we need to convert this using DOS-style short mode. If the path
45434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45435  # take no chances and rewrite it.
45436  # Note: m4 eats our [], so we need to use [ and ] instead.
45437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45438  if test "x$has_forbidden_chars" != x; then
45439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45443      # Going to short mode and back again did indeed matter. Since short mode is
45444      # case insensitive, let's make it lowercase to improve readability.
45445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45446      # Now convert it back to Unix-style (cygpath)
45447      input_path=`$CYGPATH -u "$shortmode_path"`
45448      new_path="$input_path"
45449    fi
45450  fi
45451
45452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45453  if test "x$test_cygdrive_prefix" = x; then
45454    # As a simple fix, exclude /usr/bin since it's not a real path.
45455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45457      # a path prefixed by /cygdrive for fixpath to work.
45458      new_path="$CYGWIN_ROOT_PATH$input_path"
45459    fi
45460  fi
45461
45462
45463  if test "x$path" != "x$new_path"; then
45464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45467  fi
45468
45469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45470
45471  path="$POTENTIAL_FREETYPE_LIB_PATH"
45472  has_colon=`$ECHO $path | $GREP ^.:`
45473  new_path="$path"
45474  if test "x$has_colon" = x; then
45475    # Not in mixed or Windows style, start by that.
45476    new_path=`cmd //c echo $path`
45477  fi
45478
45479
45480  input_path="$new_path"
45481  # Check if we need to convert this using DOS-style short mode. If the path
45482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45483  # take no chances and rewrite it.
45484  # Note: m4 eats our [], so we need to use [ and ] instead.
45485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45486  if test "x$has_forbidden_chars" != x; then
45487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45489  fi
45490
45491
45492  windows_path="$new_path"
45493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45494    unix_path=`$CYGPATH -u "$windows_path"`
45495    new_path="$unix_path"
45496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45498    new_path="$unix_path"
45499  fi
45500
45501  if test "x$path" != "x$new_path"; then
45502    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45504$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45505  fi
45506
45507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45509
45510    else
45511      # We're on a unix platform. Hooray! :)
45512      path="$POTENTIAL_FREETYPE_LIB_PATH"
45513      has_space=`$ECHO "$path" | $GREP " "`
45514      if test "x$has_space" != x; then
45515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45518      fi
45519
45520      # Use eval to expand a potential ~
45521      eval path="$path"
45522      if test ! -f "$path" && test ! -d "$path"; then
45523        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45524      fi
45525
45526      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45527    fi
45528  fi
45529
45530
45531    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45533$as_echo_n "checking for freetype includes... " >&6; }
45534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45535$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45536    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45538$as_echo_n "checking for freetype libraries... " >&6; }
45539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45540$as_echo "$FREETYPE_LIB_PATH" >&6; }
45541  fi
45542
45543          if test "x$FOUND_FREETYPE" != xyes; then
45544            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45545
45546  windows_path="$FREETYPE_BASE_DIR"
45547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45548    unix_path=`$CYGPATH -u "$windows_path"`
45549    FREETYPE_BASE_DIR="$unix_path"
45550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45552    FREETYPE_BASE_DIR="$unix_path"
45553  fi
45554
45555
45556  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45557  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45558  METHOD="well-known location"
45559
45560  # Let's start with an optimistic view of the world :-)
45561  FOUND_FREETYPE=yes
45562
45563  # First look for the canonical freetype main include file ft2build.h.
45564  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45565    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45566    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45567    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45568      # Fail.
45569      FOUND_FREETYPE=no
45570    fi
45571  fi
45572
45573  if test "x$FOUND_FREETYPE" = xyes; then
45574    # Include file found, let's continue the sanity check.
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45576$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45577
45578    # Reset to default value
45579    FREETYPE_BASE_NAME=freetype
45580    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45581    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45582      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45583          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45584        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45585        # for the .6 version explicitly.
45586        FREETYPE_BASE_NAME=freetype.6
45587        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45588        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45589$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45590      else
45591        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45592$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45593        FOUND_FREETYPE=no
45594      fi
45595    else
45596      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45597        # On Windows, we will need both .lib and .dll file.
45598        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45599          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45601          FOUND_FREETYPE=no
45602        fi
45603      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45604          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45605        # Found lib in isa dir, use that instead.
45606        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45607        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45608$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45609      fi
45610    fi
45611  fi
45612
45613  if test "x$FOUND_FREETYPE" = xyes; then
45614
45615  # Only process if variable expands to non-empty
45616
45617  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45619
45620  # Input might be given as Windows format, start by converting to
45621  # unix format.
45622  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45623  new_path=`$CYGPATH -u "$path"`
45624
45625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45628  # "foo.exe" is OK but "foo" is an error.
45629  #
45630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45631  # It is also a way to make sure we got the proper file name for the real test later on.
45632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45633  if test "x$test_shortpath" = x; then
45634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45636    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45637  fi
45638
45639  # Call helper function which possibly converts this using DOS-style short mode.
45640  # If so, the updated path is stored in $new_path.
45641
45642  input_path="$new_path"
45643  # Check if we need to convert this using DOS-style short mode. If the path
45644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45645  # take no chances and rewrite it.
45646  # Note: m4 eats our [], so we need to use [ and ] instead.
45647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45648  if test "x$has_forbidden_chars" != x; then
45649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45653      # Going to short mode and back again did indeed matter. Since short mode is
45654      # case insensitive, let's make it lowercase to improve readability.
45655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45656      # Now convert it back to Unix-style (cygpath)
45657      input_path=`$CYGPATH -u "$shortmode_path"`
45658      new_path="$input_path"
45659    fi
45660  fi
45661
45662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45663  if test "x$test_cygdrive_prefix" = x; then
45664    # As a simple fix, exclude /usr/bin since it's not a real path.
45665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45667      # a path prefixed by /cygdrive for fixpath to work.
45668      new_path="$CYGWIN_ROOT_PATH$input_path"
45669    fi
45670  fi
45671
45672
45673  if test "x$path" != "x$new_path"; then
45674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45677  fi
45678
45679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45680
45681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45682  has_colon=`$ECHO $path | $GREP ^.:`
45683  new_path="$path"
45684  if test "x$has_colon" = x; then
45685    # Not in mixed or Windows style, start by that.
45686    new_path=`cmd //c echo $path`
45687  fi
45688
45689
45690  input_path="$new_path"
45691  # Check if we need to convert this using DOS-style short mode. If the path
45692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45693  # take no chances and rewrite it.
45694  # Note: m4 eats our [], so we need to use [ and ] instead.
45695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45696  if test "x$has_forbidden_chars" != x; then
45697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45699  fi
45700
45701
45702  windows_path="$new_path"
45703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45704    unix_path=`$CYGPATH -u "$windows_path"`
45705    new_path="$unix_path"
45706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45708    new_path="$unix_path"
45709  fi
45710
45711  if test "x$path" != "x$new_path"; then
45712    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45715  fi
45716
45717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45719
45720    else
45721      # We're on a unix platform. Hooray! :)
45722      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45723      has_space=`$ECHO "$path" | $GREP " "`
45724      if test "x$has_space" != x; then
45725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45728      fi
45729
45730      # Use eval to expand a potential ~
45731      eval path="$path"
45732      if test ! -f "$path" && test ! -d "$path"; then
45733        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45734      fi
45735
45736      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45737    fi
45738  fi
45739
45740
45741  # Only process if variable expands to non-empty
45742
45743  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45745
45746  # Input might be given as Windows format, start by converting to
45747  # unix format.
45748  path="$POTENTIAL_FREETYPE_LIB_PATH"
45749  new_path=`$CYGPATH -u "$path"`
45750
45751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45754  # "foo.exe" is OK but "foo" is an error.
45755  #
45756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45757  # It is also a way to make sure we got the proper file name for the real test later on.
45758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45759  if test "x$test_shortpath" = x; then
45760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45762    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45763  fi
45764
45765  # Call helper function which possibly converts this using DOS-style short mode.
45766  # If so, the updated path is stored in $new_path.
45767
45768  input_path="$new_path"
45769  # Check if we need to convert this using DOS-style short mode. If the path
45770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45771  # take no chances and rewrite it.
45772  # Note: m4 eats our [], so we need to use [ and ] instead.
45773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45774  if test "x$has_forbidden_chars" != x; then
45775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45779      # Going to short mode and back again did indeed matter. Since short mode is
45780      # case insensitive, let's make it lowercase to improve readability.
45781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45782      # Now convert it back to Unix-style (cygpath)
45783      input_path=`$CYGPATH -u "$shortmode_path"`
45784      new_path="$input_path"
45785    fi
45786  fi
45787
45788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45789  if test "x$test_cygdrive_prefix" = x; then
45790    # As a simple fix, exclude /usr/bin since it's not a real path.
45791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45793      # a path prefixed by /cygdrive for fixpath to work.
45794      new_path="$CYGWIN_ROOT_PATH$input_path"
45795    fi
45796  fi
45797
45798
45799  if test "x$path" != "x$new_path"; then
45800    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45803  fi
45804
45805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806
45807  path="$POTENTIAL_FREETYPE_LIB_PATH"
45808  has_colon=`$ECHO $path | $GREP ^.:`
45809  new_path="$path"
45810  if test "x$has_colon" = x; then
45811    # Not in mixed or Windows style, start by that.
45812    new_path=`cmd //c echo $path`
45813  fi
45814
45815
45816  input_path="$new_path"
45817  # Check if we need to convert this using DOS-style short mode. If the path
45818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45819  # take no chances and rewrite it.
45820  # Note: m4 eats our [], so we need to use [ and ] instead.
45821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45822  if test "x$has_forbidden_chars" != x; then
45823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45825  fi
45826
45827
45828  windows_path="$new_path"
45829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45830    unix_path=`$CYGPATH -u "$windows_path"`
45831    new_path="$unix_path"
45832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45834    new_path="$unix_path"
45835  fi
45836
45837  if test "x$path" != "x$new_path"; then
45838    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45840$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45841  fi
45842
45843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45845
45846    else
45847      # We're on a unix platform. Hooray! :)
45848      path="$POTENTIAL_FREETYPE_LIB_PATH"
45849      has_space=`$ECHO "$path" | $GREP " "`
45850      if test "x$has_space" != x; then
45851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45854      fi
45855
45856      # Use eval to expand a potential ~
45857      eval path="$path"
45858      if test ! -f "$path" && test ! -d "$path"; then
45859        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45860      fi
45861
45862      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45863    fi
45864  fi
45865
45866
45867    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45869$as_echo_n "checking for freetype includes... " >&6; }
45870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45871$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45872    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45874$as_echo_n "checking for freetype libraries... " >&6; }
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45876$as_echo "$FREETYPE_LIB_PATH" >&6; }
45877  fi
45878
45879          fi
45880        else
45881          FREETYPE_BASE_DIR="$SYSROOT/usr"
45882
45883  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45884  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45885  METHOD="well-known location"
45886
45887  # Let's start with an optimistic view of the world :-)
45888  FOUND_FREETYPE=yes
45889
45890  # First look for the canonical freetype main include file ft2build.h.
45891  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45892    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45893    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45894    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45895      # Fail.
45896      FOUND_FREETYPE=no
45897    fi
45898  fi
45899
45900  if test "x$FOUND_FREETYPE" = xyes; then
45901    # Include file found, let's continue the sanity check.
45902    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45903$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45904
45905    # Reset to default value
45906    FREETYPE_BASE_NAME=freetype
45907    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45908    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45909      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45910          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45911        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45912        # for the .6 version explicitly.
45913        FREETYPE_BASE_NAME=freetype.6
45914        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45915        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45916$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45917      else
45918        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45919$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45920        FOUND_FREETYPE=no
45921      fi
45922    else
45923      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45924        # On Windows, we will need both .lib and .dll file.
45925        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45926          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45927$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45928          FOUND_FREETYPE=no
45929        fi
45930      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45931          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45932        # Found lib in isa dir, use that instead.
45933        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45934        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45935$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45936      fi
45937    fi
45938  fi
45939
45940  if test "x$FOUND_FREETYPE" = xyes; then
45941
45942  # Only process if variable expands to non-empty
45943
45944  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45946
45947  # Input might be given as Windows format, start by converting to
45948  # unix format.
45949  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45950  new_path=`$CYGPATH -u "$path"`
45951
45952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45955  # "foo.exe" is OK but "foo" is an error.
45956  #
45957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45958  # It is also a way to make sure we got the proper file name for the real test later on.
45959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45960  if test "x$test_shortpath" = x; then
45961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45962$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45963    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45964  fi
45965
45966  # Call helper function which possibly converts this using DOS-style short mode.
45967  # If so, the updated path is stored in $new_path.
45968
45969  input_path="$new_path"
45970  # Check if we need to convert this using DOS-style short mode. If the path
45971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45972  # take no chances and rewrite it.
45973  # Note: m4 eats our [], so we need to use [ and ] instead.
45974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45975  if test "x$has_forbidden_chars" != x; then
45976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45980      # Going to short mode and back again did indeed matter. Since short mode is
45981      # case insensitive, let's make it lowercase to improve readability.
45982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45983      # Now convert it back to Unix-style (cygpath)
45984      input_path=`$CYGPATH -u "$shortmode_path"`
45985      new_path="$input_path"
45986    fi
45987  fi
45988
45989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45990  if test "x$test_cygdrive_prefix" = x; then
45991    # As a simple fix, exclude /usr/bin since it's not a real path.
45992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45994      # a path prefixed by /cygdrive for fixpath to work.
45995      new_path="$CYGWIN_ROOT_PATH$input_path"
45996    fi
45997  fi
45998
45999
46000  if test "x$path" != "x$new_path"; then
46001    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46003$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46004  fi
46005
46006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46007
46008  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46009  has_colon=`$ECHO $path | $GREP ^.:`
46010  new_path="$path"
46011  if test "x$has_colon" = x; then
46012    # Not in mixed or Windows style, start by that.
46013    new_path=`cmd //c echo $path`
46014  fi
46015
46016
46017  input_path="$new_path"
46018  # Check if we need to convert this using DOS-style short mode. If the path
46019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46020  # take no chances and rewrite it.
46021  # Note: m4 eats our [], so we need to use [ and ] instead.
46022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46023  if test "x$has_forbidden_chars" != x; then
46024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46026  fi
46027
46028
46029  windows_path="$new_path"
46030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46031    unix_path=`$CYGPATH -u "$windows_path"`
46032    new_path="$unix_path"
46033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46035    new_path="$unix_path"
46036  fi
46037
46038  if test "x$path" != "x$new_path"; then
46039    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46042  fi
46043
46044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46046
46047    else
46048      # We're on a unix platform. Hooray! :)
46049      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46050      has_space=`$ECHO "$path" | $GREP " "`
46051      if test "x$has_space" != x; then
46052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46055      fi
46056
46057      # Use eval to expand a potential ~
46058      eval path="$path"
46059      if test ! -f "$path" && test ! -d "$path"; then
46060        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46061      fi
46062
46063      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46064    fi
46065  fi
46066
46067
46068  # Only process if variable expands to non-empty
46069
46070  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46072
46073  # Input might be given as Windows format, start by converting to
46074  # unix format.
46075  path="$POTENTIAL_FREETYPE_LIB_PATH"
46076  new_path=`$CYGPATH -u "$path"`
46077
46078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46081  # "foo.exe" is OK but "foo" is an error.
46082  #
46083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46084  # It is also a way to make sure we got the proper file name for the real test later on.
46085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46086  if test "x$test_shortpath" = x; then
46087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46089    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46090  fi
46091
46092  # Call helper function which possibly converts this using DOS-style short mode.
46093  # If so, the updated path is stored in $new_path.
46094
46095  input_path="$new_path"
46096  # Check if we need to convert this using DOS-style short mode. If the path
46097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46098  # take no chances and rewrite it.
46099  # Note: m4 eats our [], so we need to use [ and ] instead.
46100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46101  if test "x$has_forbidden_chars" != x; then
46102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46106      # Going to short mode and back again did indeed matter. Since short mode is
46107      # case insensitive, let's make it lowercase to improve readability.
46108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46109      # Now convert it back to Unix-style (cygpath)
46110      input_path=`$CYGPATH -u "$shortmode_path"`
46111      new_path="$input_path"
46112    fi
46113  fi
46114
46115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46116  if test "x$test_cygdrive_prefix" = x; then
46117    # As a simple fix, exclude /usr/bin since it's not a real path.
46118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46120      # a path prefixed by /cygdrive for fixpath to work.
46121      new_path="$CYGWIN_ROOT_PATH$input_path"
46122    fi
46123  fi
46124
46125
46126  if test "x$path" != "x$new_path"; then
46127    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46130  fi
46131
46132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46133
46134  path="$POTENTIAL_FREETYPE_LIB_PATH"
46135  has_colon=`$ECHO $path | $GREP ^.:`
46136  new_path="$path"
46137  if test "x$has_colon" = x; then
46138    # Not in mixed or Windows style, start by that.
46139    new_path=`cmd //c echo $path`
46140  fi
46141
46142
46143  input_path="$new_path"
46144  # Check if we need to convert this using DOS-style short mode. If the path
46145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46146  # take no chances and rewrite it.
46147  # Note: m4 eats our [], so we need to use [ and ] instead.
46148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46149  if test "x$has_forbidden_chars" != x; then
46150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46152  fi
46153
46154
46155  windows_path="$new_path"
46156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46157    unix_path=`$CYGPATH -u "$windows_path"`
46158    new_path="$unix_path"
46159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46161    new_path="$unix_path"
46162  fi
46163
46164  if test "x$path" != "x$new_path"; then
46165    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46168  fi
46169
46170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46172
46173    else
46174      # We're on a unix platform. Hooray! :)
46175      path="$POTENTIAL_FREETYPE_LIB_PATH"
46176      has_space=`$ECHO "$path" | $GREP " "`
46177      if test "x$has_space" != x; then
46178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46181      fi
46182
46183      # Use eval to expand a potential ~
46184      eval path="$path"
46185      if test ! -f "$path" && test ! -d "$path"; then
46186        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46187      fi
46188
46189      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46190    fi
46191  fi
46192
46193
46194    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46196$as_echo_n "checking for freetype includes... " >&6; }
46197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46198$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46199    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46201$as_echo_n "checking for freetype libraries... " >&6; }
46202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46203$as_echo "$FREETYPE_LIB_PATH" >&6; }
46204  fi
46205
46206
46207          if test "x$FOUND_FREETYPE" != xyes; then
46208            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46209
46210  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46211  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46212  METHOD="well-known location"
46213
46214  # Let's start with an optimistic view of the world :-)
46215  FOUND_FREETYPE=yes
46216
46217  # First look for the canonical freetype main include file ft2build.h.
46218  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46219    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46220    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46221    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46222      # Fail.
46223      FOUND_FREETYPE=no
46224    fi
46225  fi
46226
46227  if test "x$FOUND_FREETYPE" = xyes; then
46228    # Include file found, let's continue the sanity check.
46229    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46230$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46231
46232    # Reset to default value
46233    FREETYPE_BASE_NAME=freetype
46234    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46235    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46236      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46237          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46238        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46239        # for the .6 version explicitly.
46240        FREETYPE_BASE_NAME=freetype.6
46241        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46242        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46243$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46244      else
46245        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46246$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46247        FOUND_FREETYPE=no
46248      fi
46249    else
46250      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46251        # On Windows, we will need both .lib and .dll file.
46252        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46253          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46254$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46255          FOUND_FREETYPE=no
46256        fi
46257      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46258          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46259        # Found lib in isa dir, use that instead.
46260        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46261        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46262$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46263      fi
46264    fi
46265  fi
46266
46267  if test "x$FOUND_FREETYPE" = xyes; then
46268
46269  # Only process if variable expands to non-empty
46270
46271  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46273
46274  # Input might be given as Windows format, start by converting to
46275  # unix format.
46276  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46277  new_path=`$CYGPATH -u "$path"`
46278
46279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46282  # "foo.exe" is OK but "foo" is an error.
46283  #
46284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46285  # It is also a way to make sure we got the proper file name for the real test later on.
46286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46287  if test "x$test_shortpath" = x; then
46288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46290    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46291  fi
46292
46293  # Call helper function which possibly converts this using DOS-style short mode.
46294  # If so, the updated path is stored in $new_path.
46295
46296  input_path="$new_path"
46297  # Check if we need to convert this using DOS-style short mode. If the path
46298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46299  # take no chances and rewrite it.
46300  # Note: m4 eats our [], so we need to use [ and ] instead.
46301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46302  if test "x$has_forbidden_chars" != x; then
46303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46307      # Going to short mode and back again did indeed matter. Since short mode is
46308      # case insensitive, let's make it lowercase to improve readability.
46309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46310      # Now convert it back to Unix-style (cygpath)
46311      input_path=`$CYGPATH -u "$shortmode_path"`
46312      new_path="$input_path"
46313    fi
46314  fi
46315
46316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46317  if test "x$test_cygdrive_prefix" = x; then
46318    # As a simple fix, exclude /usr/bin since it's not a real path.
46319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46321      # a path prefixed by /cygdrive for fixpath to work.
46322      new_path="$CYGWIN_ROOT_PATH$input_path"
46323    fi
46324  fi
46325
46326
46327  if test "x$path" != "x$new_path"; then
46328    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46331  fi
46332
46333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46334
46335  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46336  has_colon=`$ECHO $path | $GREP ^.:`
46337  new_path="$path"
46338  if test "x$has_colon" = x; then
46339    # Not in mixed or Windows style, start by that.
46340    new_path=`cmd //c echo $path`
46341  fi
46342
46343
46344  input_path="$new_path"
46345  # Check if we need to convert this using DOS-style short mode. If the path
46346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46347  # take no chances and rewrite it.
46348  # Note: m4 eats our [], so we need to use [ and ] instead.
46349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46350  if test "x$has_forbidden_chars" != x; then
46351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46353  fi
46354
46355
46356  windows_path="$new_path"
46357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46358    unix_path=`$CYGPATH -u "$windows_path"`
46359    new_path="$unix_path"
46360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46362    new_path="$unix_path"
46363  fi
46364
46365  if test "x$path" != "x$new_path"; then
46366    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46368$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46369  fi
46370
46371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46373
46374    else
46375      # We're on a unix platform. Hooray! :)
46376      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46377      has_space=`$ECHO "$path" | $GREP " "`
46378      if test "x$has_space" != x; then
46379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46380$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46382      fi
46383
46384      # Use eval to expand a potential ~
46385      eval path="$path"
46386      if test ! -f "$path" && test ! -d "$path"; then
46387        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46388      fi
46389
46390      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46391    fi
46392  fi
46393
46394
46395  # Only process if variable expands to non-empty
46396
46397  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46399
46400  # Input might be given as Windows format, start by converting to
46401  # unix format.
46402  path="$POTENTIAL_FREETYPE_LIB_PATH"
46403  new_path=`$CYGPATH -u "$path"`
46404
46405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46408  # "foo.exe" is OK but "foo" is an error.
46409  #
46410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46411  # It is also a way to make sure we got the proper file name for the real test later on.
46412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46413  if test "x$test_shortpath" = x; then
46414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46416    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46417  fi
46418
46419  # Call helper function which possibly converts this using DOS-style short mode.
46420  # If so, the updated path is stored in $new_path.
46421
46422  input_path="$new_path"
46423  # Check if we need to convert this using DOS-style short mode. If the path
46424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46425  # take no chances and rewrite it.
46426  # Note: m4 eats our [], so we need to use [ and ] instead.
46427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46428  if test "x$has_forbidden_chars" != x; then
46429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46433      # Going to short mode and back again did indeed matter. Since short mode is
46434      # case insensitive, let's make it lowercase to improve readability.
46435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46436      # Now convert it back to Unix-style (cygpath)
46437      input_path=`$CYGPATH -u "$shortmode_path"`
46438      new_path="$input_path"
46439    fi
46440  fi
46441
46442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46443  if test "x$test_cygdrive_prefix" = x; then
46444    # As a simple fix, exclude /usr/bin since it's not a real path.
46445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46447      # a path prefixed by /cygdrive for fixpath to work.
46448      new_path="$CYGWIN_ROOT_PATH$input_path"
46449    fi
46450  fi
46451
46452
46453  if test "x$path" != "x$new_path"; then
46454    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46456$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46457  fi
46458
46459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46460
46461  path="$POTENTIAL_FREETYPE_LIB_PATH"
46462  has_colon=`$ECHO $path | $GREP ^.:`
46463  new_path="$path"
46464  if test "x$has_colon" = x; then
46465    # Not in mixed or Windows style, start by that.
46466    new_path=`cmd //c echo $path`
46467  fi
46468
46469
46470  input_path="$new_path"
46471  # Check if we need to convert this using DOS-style short mode. If the path
46472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46473  # take no chances and rewrite it.
46474  # Note: m4 eats our [], so we need to use [ and ] instead.
46475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46476  if test "x$has_forbidden_chars" != x; then
46477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46479  fi
46480
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  if test "x$path" != "x$new_path"; then
46492    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46495  fi
46496
46497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46499
46500    else
46501      # We're on a unix platform. Hooray! :)
46502      path="$POTENTIAL_FREETYPE_LIB_PATH"
46503      has_space=`$ECHO "$path" | $GREP " "`
46504      if test "x$has_space" != x; then
46505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46508      fi
46509
46510      # Use eval to expand a potential ~
46511      eval path="$path"
46512      if test ! -f "$path" && test ! -d "$path"; then
46513        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46514      fi
46515
46516      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46517    fi
46518  fi
46519
46520
46521    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46523$as_echo_n "checking for freetype includes... " >&6; }
46524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46525$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46526    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46528$as_echo_n "checking for freetype libraries... " >&6; }
46529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46530$as_echo "$FREETYPE_LIB_PATH" >&6; }
46531  fi
46532
46533          fi
46534
46535          if test "x$FOUND_FREETYPE" != xyes; then
46536            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46537
46538  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46539  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46540  METHOD="well-known location"
46541
46542  # Let's start with an optimistic view of the world :-)
46543  FOUND_FREETYPE=yes
46544
46545  # First look for the canonical freetype main include file ft2build.h.
46546  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46547    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46548    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46549    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46550      # Fail.
46551      FOUND_FREETYPE=no
46552    fi
46553  fi
46554
46555  if test "x$FOUND_FREETYPE" = xyes; then
46556    # Include file found, let's continue the sanity check.
46557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46558$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46559
46560    # Reset to default value
46561    FREETYPE_BASE_NAME=freetype
46562    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46563    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46564      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46565          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46566        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46567        # for the .6 version explicitly.
46568        FREETYPE_BASE_NAME=freetype.6
46569        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46570        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46571$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46572      else
46573        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46575        FOUND_FREETYPE=no
46576      fi
46577    else
46578      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46579        # On Windows, we will need both .lib and .dll file.
46580        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46581          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46583          FOUND_FREETYPE=no
46584        fi
46585      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46586          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46587        # Found lib in isa dir, use that instead.
46588        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46590$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46591      fi
46592    fi
46593  fi
46594
46595  if test "x$FOUND_FREETYPE" = xyes; then
46596
46597  # Only process if variable expands to non-empty
46598
46599  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46601
46602  # Input might be given as Windows format, start by converting to
46603  # unix format.
46604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46605  new_path=`$CYGPATH -u "$path"`
46606
46607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46610  # "foo.exe" is OK but "foo" is an error.
46611  #
46612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46613  # It is also a way to make sure we got the proper file name for the real test later on.
46614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46615  if test "x$test_shortpath" = x; then
46616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46618    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46619  fi
46620
46621  # Call helper function which possibly converts this using DOS-style short mode.
46622  # If so, the updated path is stored in $new_path.
46623
46624  input_path="$new_path"
46625  # Check if we need to convert this using DOS-style short mode. If the path
46626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46627  # take no chances and rewrite it.
46628  # Note: m4 eats our [], so we need to use [ and ] instead.
46629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46630  if test "x$has_forbidden_chars" != x; then
46631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46635      # Going to short mode and back again did indeed matter. Since short mode is
46636      # case insensitive, let's make it lowercase to improve readability.
46637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46638      # Now convert it back to Unix-style (cygpath)
46639      input_path=`$CYGPATH -u "$shortmode_path"`
46640      new_path="$input_path"
46641    fi
46642  fi
46643
46644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46645  if test "x$test_cygdrive_prefix" = x; then
46646    # As a simple fix, exclude /usr/bin since it's not a real path.
46647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46649      # a path prefixed by /cygdrive for fixpath to work.
46650      new_path="$CYGWIN_ROOT_PATH$input_path"
46651    fi
46652  fi
46653
46654
46655  if test "x$path" != "x$new_path"; then
46656    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46659  fi
46660
46661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46662
46663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46664  has_colon=`$ECHO $path | $GREP ^.:`
46665  new_path="$path"
46666  if test "x$has_colon" = x; then
46667    # Not in mixed or Windows style, start by that.
46668    new_path=`cmd //c echo $path`
46669  fi
46670
46671
46672  input_path="$new_path"
46673  # Check if we need to convert this using DOS-style short mode. If the path
46674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46675  # take no chances and rewrite it.
46676  # Note: m4 eats our [], so we need to use [ and ] instead.
46677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46678  if test "x$has_forbidden_chars" != x; then
46679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46681  fi
46682
46683
46684  windows_path="$new_path"
46685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46686    unix_path=`$CYGPATH -u "$windows_path"`
46687    new_path="$unix_path"
46688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46690    new_path="$unix_path"
46691  fi
46692
46693  if test "x$path" != "x$new_path"; then
46694    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46697  fi
46698
46699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46701
46702    else
46703      # We're on a unix platform. Hooray! :)
46704      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46705      has_space=`$ECHO "$path" | $GREP " "`
46706      if test "x$has_space" != x; then
46707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46710      fi
46711
46712      # Use eval to expand a potential ~
46713      eval path="$path"
46714      if test ! -f "$path" && test ! -d "$path"; then
46715        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46716      fi
46717
46718      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46719    fi
46720  fi
46721
46722
46723  # Only process if variable expands to non-empty
46724
46725  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46727
46728  # Input might be given as Windows format, start by converting to
46729  # unix format.
46730  path="$POTENTIAL_FREETYPE_LIB_PATH"
46731  new_path=`$CYGPATH -u "$path"`
46732
46733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46736  # "foo.exe" is OK but "foo" is an error.
46737  #
46738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46739  # It is also a way to make sure we got the proper file name for the real test later on.
46740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46741  if test "x$test_shortpath" = x; then
46742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46745  fi
46746
46747  # Call helper function which possibly converts this using DOS-style short mode.
46748  # If so, the updated path is stored in $new_path.
46749
46750  input_path="$new_path"
46751  # Check if we need to convert this using DOS-style short mode. If the path
46752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46753  # take no chances and rewrite it.
46754  # Note: m4 eats our [], so we need to use [ and ] instead.
46755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46756  if test "x$has_forbidden_chars" != x; then
46757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46761      # Going to short mode and back again did indeed matter. Since short mode is
46762      # case insensitive, let's make it lowercase to improve readability.
46763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46764      # Now convert it back to Unix-style (cygpath)
46765      input_path=`$CYGPATH -u "$shortmode_path"`
46766      new_path="$input_path"
46767    fi
46768  fi
46769
46770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46771  if test "x$test_cygdrive_prefix" = x; then
46772    # As a simple fix, exclude /usr/bin since it's not a real path.
46773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46775      # a path prefixed by /cygdrive for fixpath to work.
46776      new_path="$CYGWIN_ROOT_PATH$input_path"
46777    fi
46778  fi
46779
46780
46781  if test "x$path" != "x$new_path"; then
46782    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46785  fi
46786
46787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46788
46789  path="$POTENTIAL_FREETYPE_LIB_PATH"
46790  has_colon=`$ECHO $path | $GREP ^.:`
46791  new_path="$path"
46792  if test "x$has_colon" = x; then
46793    # Not in mixed or Windows style, start by that.
46794    new_path=`cmd //c echo $path`
46795  fi
46796
46797
46798  input_path="$new_path"
46799  # Check if we need to convert this using DOS-style short mode. If the path
46800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46801  # take no chances and rewrite it.
46802  # Note: m4 eats our [], so we need to use [ and ] instead.
46803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46804  if test "x$has_forbidden_chars" != x; then
46805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46807  fi
46808
46809
46810  windows_path="$new_path"
46811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46812    unix_path=`$CYGPATH -u "$windows_path"`
46813    new_path="$unix_path"
46814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46816    new_path="$unix_path"
46817  fi
46818
46819  if test "x$path" != "x$new_path"; then
46820    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46823  fi
46824
46825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46827
46828    else
46829      # We're on a unix platform. Hooray! :)
46830      path="$POTENTIAL_FREETYPE_LIB_PATH"
46831      has_space=`$ECHO "$path" | $GREP " "`
46832      if test "x$has_space" != x; then
46833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46835        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46836      fi
46837
46838      # Use eval to expand a potential ~
46839      eval path="$path"
46840      if test ! -f "$path" && test ! -d "$path"; then
46841        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46842      fi
46843
46844      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46845    fi
46846  fi
46847
46848
46849    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46851$as_echo_n "checking for freetype includes... " >&6; }
46852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46853$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46854    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46856$as_echo_n "checking for freetype libraries... " >&6; }
46857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46858$as_echo "$FREETYPE_LIB_PATH" >&6; }
46859  fi
46860
46861          fi
46862
46863          if test "x$FOUND_FREETYPE" != xyes; then
46864            FREETYPE_BASE_DIR="$SYSROOT/usr"
46865            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46866
46867  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46868  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46869  METHOD="well-known location"
46870
46871  # Let's start with an optimistic view of the world :-)
46872  FOUND_FREETYPE=yes
46873
46874  # First look for the canonical freetype main include file ft2build.h.
46875  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46876    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46877    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46878    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46879      # Fail.
46880      FOUND_FREETYPE=no
46881    fi
46882  fi
46883
46884  if test "x$FOUND_FREETYPE" = xyes; then
46885    # Include file found, let's continue the sanity check.
46886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46887$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46888
46889    # Reset to default value
46890    FREETYPE_BASE_NAME=freetype
46891    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46892    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46893      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46894          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46895        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46896        # for the .6 version explicitly.
46897        FREETYPE_BASE_NAME=freetype.6
46898        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46899        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46900$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46901      else
46902        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46903$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46904        FOUND_FREETYPE=no
46905      fi
46906    else
46907      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46908        # On Windows, we will need both .lib and .dll file.
46909        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46910          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46912          FOUND_FREETYPE=no
46913        fi
46914      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46915          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46916        # Found lib in isa dir, use that instead.
46917        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46918        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46919$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46920      fi
46921    fi
46922  fi
46923
46924  if test "x$FOUND_FREETYPE" = xyes; then
46925
46926  # Only process if variable expands to non-empty
46927
46928  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46930
46931  # Input might be given as Windows format, start by converting to
46932  # unix format.
46933  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46934  new_path=`$CYGPATH -u "$path"`
46935
46936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46939  # "foo.exe" is OK but "foo" is an error.
46940  #
46941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46942  # It is also a way to make sure we got the proper file name for the real test later on.
46943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46944  if test "x$test_shortpath" = x; then
46945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46946$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46947    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46948  fi
46949
46950  # Call helper function which possibly converts this using DOS-style short mode.
46951  # If so, the updated path is stored in $new_path.
46952
46953  input_path="$new_path"
46954  # Check if we need to convert this using DOS-style short mode. If the path
46955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46956  # take no chances and rewrite it.
46957  # Note: m4 eats our [], so we need to use [ and ] instead.
46958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46959  if test "x$has_forbidden_chars" != x; then
46960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46964      # Going to short mode and back again did indeed matter. Since short mode is
46965      # case insensitive, let's make it lowercase to improve readability.
46966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46967      # Now convert it back to Unix-style (cygpath)
46968      input_path=`$CYGPATH -u "$shortmode_path"`
46969      new_path="$input_path"
46970    fi
46971  fi
46972
46973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46974  if test "x$test_cygdrive_prefix" = x; then
46975    # As a simple fix, exclude /usr/bin since it's not a real path.
46976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46978      # a path prefixed by /cygdrive for fixpath to work.
46979      new_path="$CYGWIN_ROOT_PATH$input_path"
46980    fi
46981  fi
46982
46983
46984  if test "x$path" != "x$new_path"; then
46985    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46987$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46988  fi
46989
46990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46991
46992  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46993  has_colon=`$ECHO $path | $GREP ^.:`
46994  new_path="$path"
46995  if test "x$has_colon" = x; then
46996    # Not in mixed or Windows style, start by that.
46997    new_path=`cmd //c echo $path`
46998  fi
46999
47000
47001  input_path="$new_path"
47002  # Check if we need to convert this using DOS-style short mode. If the path
47003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47004  # take no chances and rewrite it.
47005  # Note: m4 eats our [], so we need to use [ and ] instead.
47006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47007  if test "x$has_forbidden_chars" != x; then
47008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47010  fi
47011
47012
47013  windows_path="$new_path"
47014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47015    unix_path=`$CYGPATH -u "$windows_path"`
47016    new_path="$unix_path"
47017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47019    new_path="$unix_path"
47020  fi
47021
47022  if test "x$path" != "x$new_path"; then
47023    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47026  fi
47027
47028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47030
47031    else
47032      # We're on a unix platform. Hooray! :)
47033      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47034      has_space=`$ECHO "$path" | $GREP " "`
47035      if test "x$has_space" != x; then
47036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47039      fi
47040
47041      # Use eval to expand a potential ~
47042      eval path="$path"
47043      if test ! -f "$path" && test ! -d "$path"; then
47044        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47045      fi
47046
47047      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47048    fi
47049  fi
47050
47051
47052  # Only process if variable expands to non-empty
47053
47054  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47056
47057  # Input might be given as Windows format, start by converting to
47058  # unix format.
47059  path="$POTENTIAL_FREETYPE_LIB_PATH"
47060  new_path=`$CYGPATH -u "$path"`
47061
47062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47065  # "foo.exe" is OK but "foo" is an error.
47066  #
47067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47068  # It is also a way to make sure we got the proper file name for the real test later on.
47069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47070  if test "x$test_shortpath" = x; then
47071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47073    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47074  fi
47075
47076  # Call helper function which possibly converts this using DOS-style short mode.
47077  # If so, the updated path is stored in $new_path.
47078
47079  input_path="$new_path"
47080  # Check if we need to convert this using DOS-style short mode. If the path
47081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47082  # take no chances and rewrite it.
47083  # Note: m4 eats our [], so we need to use [ and ] instead.
47084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47085  if test "x$has_forbidden_chars" != x; then
47086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47090      # Going to short mode and back again did indeed matter. Since short mode is
47091      # case insensitive, let's make it lowercase to improve readability.
47092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47093      # Now convert it back to Unix-style (cygpath)
47094      input_path=`$CYGPATH -u "$shortmode_path"`
47095      new_path="$input_path"
47096    fi
47097  fi
47098
47099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47100  if test "x$test_cygdrive_prefix" = x; then
47101    # As a simple fix, exclude /usr/bin since it's not a real path.
47102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47104      # a path prefixed by /cygdrive for fixpath to work.
47105      new_path="$CYGWIN_ROOT_PATH$input_path"
47106    fi
47107  fi
47108
47109
47110  if test "x$path" != "x$new_path"; then
47111    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47114  fi
47115
47116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47117
47118  path="$POTENTIAL_FREETYPE_LIB_PATH"
47119  has_colon=`$ECHO $path | $GREP ^.:`
47120  new_path="$path"
47121  if test "x$has_colon" = x; then
47122    # Not in mixed or Windows style, start by that.
47123    new_path=`cmd //c echo $path`
47124  fi
47125
47126
47127  input_path="$new_path"
47128  # Check if we need to convert this using DOS-style short mode. If the path
47129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47130  # take no chances and rewrite it.
47131  # Note: m4 eats our [], so we need to use [ and ] instead.
47132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47133  if test "x$has_forbidden_chars" != x; then
47134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47136  fi
47137
47138
47139  windows_path="$new_path"
47140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47141    unix_path=`$CYGPATH -u "$windows_path"`
47142    new_path="$unix_path"
47143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47145    new_path="$unix_path"
47146  fi
47147
47148  if test "x$path" != "x$new_path"; then
47149    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47152  fi
47153
47154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47156
47157    else
47158      # We're on a unix platform. Hooray! :)
47159      path="$POTENTIAL_FREETYPE_LIB_PATH"
47160      has_space=`$ECHO "$path" | $GREP " "`
47161      if test "x$has_space" != x; then
47162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47163$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47165      fi
47166
47167      # Use eval to expand a potential ~
47168      eval path="$path"
47169      if test ! -f "$path" && test ! -d "$path"; then
47170        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47171      fi
47172
47173      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47174    fi
47175  fi
47176
47177
47178    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47180$as_echo_n "checking for freetype includes... " >&6; }
47181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47182$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47183    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47185$as_echo_n "checking for freetype libraries... " >&6; }
47186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47187$as_echo "$FREETYPE_LIB_PATH" >&6; }
47188  fi
47189
47190            else
47191
47192  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47193  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47194  METHOD="well-known location"
47195
47196  # Let's start with an optimistic view of the world :-)
47197  FOUND_FREETYPE=yes
47198
47199  # First look for the canonical freetype main include file ft2build.h.
47200  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47201    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47202    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47203    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47204      # Fail.
47205      FOUND_FREETYPE=no
47206    fi
47207  fi
47208
47209  if test "x$FOUND_FREETYPE" = xyes; then
47210    # Include file found, let's continue the sanity check.
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47212$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47213
47214    # Reset to default value
47215    FREETYPE_BASE_NAME=freetype
47216    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47217    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47218      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47219          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47220        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47221        # for the .6 version explicitly.
47222        FREETYPE_BASE_NAME=freetype.6
47223        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47224        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47225$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47226      else
47227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47229        FOUND_FREETYPE=no
47230      fi
47231    else
47232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47233        # On Windows, we will need both .lib and .dll file.
47234        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47237          FOUND_FREETYPE=no
47238        fi
47239      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47240          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47241        # Found lib in isa dir, use that instead.
47242        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47243        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47244$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47245      fi
47246    fi
47247  fi
47248
47249  if test "x$FOUND_FREETYPE" = xyes; then
47250
47251  # Only process if variable expands to non-empty
47252
47253  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47255
47256  # Input might be given as Windows format, start by converting to
47257  # unix format.
47258  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47259  new_path=`$CYGPATH -u "$path"`
47260
47261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47264  # "foo.exe" is OK but "foo" is an error.
47265  #
47266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47267  # It is also a way to make sure we got the proper file name for the real test later on.
47268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47269  if test "x$test_shortpath" = x; then
47270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47272    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47273  fi
47274
47275  # Call helper function which possibly converts this using DOS-style short mode.
47276  # If so, the updated path is stored in $new_path.
47277
47278  input_path="$new_path"
47279  # Check if we need to convert this using DOS-style short mode. If the path
47280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47281  # take no chances and rewrite it.
47282  # Note: m4 eats our [], so we need to use [ and ] instead.
47283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47284  if test "x$has_forbidden_chars" != x; then
47285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47289      # Going to short mode and back again did indeed matter. Since short mode is
47290      # case insensitive, let's make it lowercase to improve readability.
47291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47292      # Now convert it back to Unix-style (cygpath)
47293      input_path=`$CYGPATH -u "$shortmode_path"`
47294      new_path="$input_path"
47295    fi
47296  fi
47297
47298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47299  if test "x$test_cygdrive_prefix" = x; then
47300    # As a simple fix, exclude /usr/bin since it's not a real path.
47301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47303      # a path prefixed by /cygdrive for fixpath to work.
47304      new_path="$CYGWIN_ROOT_PATH$input_path"
47305    fi
47306  fi
47307
47308
47309  if test "x$path" != "x$new_path"; then
47310    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47313  fi
47314
47315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47316
47317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47318  has_colon=`$ECHO $path | $GREP ^.:`
47319  new_path="$path"
47320  if test "x$has_colon" = x; then
47321    # Not in mixed or Windows style, start by that.
47322    new_path=`cmd //c echo $path`
47323  fi
47324
47325
47326  input_path="$new_path"
47327  # Check if we need to convert this using DOS-style short mode. If the path
47328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47329  # take no chances and rewrite it.
47330  # Note: m4 eats our [], so we need to use [ and ] instead.
47331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47332  if test "x$has_forbidden_chars" != x; then
47333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47335  fi
47336
47337
47338  windows_path="$new_path"
47339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47340    unix_path=`$CYGPATH -u "$windows_path"`
47341    new_path="$unix_path"
47342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47344    new_path="$unix_path"
47345  fi
47346
47347  if test "x$path" != "x$new_path"; then
47348    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47351  fi
47352
47353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47355
47356    else
47357      # We're on a unix platform. Hooray! :)
47358      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47359      has_space=`$ECHO "$path" | $GREP " "`
47360      if test "x$has_space" != x; then
47361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47364      fi
47365
47366      # Use eval to expand a potential ~
47367      eval path="$path"
47368      if test ! -f "$path" && test ! -d "$path"; then
47369        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47370      fi
47371
47372      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47373    fi
47374  fi
47375
47376
47377  # Only process if variable expands to non-empty
47378
47379  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47381
47382  # Input might be given as Windows format, start by converting to
47383  # unix format.
47384  path="$POTENTIAL_FREETYPE_LIB_PATH"
47385  new_path=`$CYGPATH -u "$path"`
47386
47387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47390  # "foo.exe" is OK but "foo" is an error.
47391  #
47392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47393  # It is also a way to make sure we got the proper file name for the real test later on.
47394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47395  if test "x$test_shortpath" = x; then
47396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47398    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47399  fi
47400
47401  # Call helper function which possibly converts this using DOS-style short mode.
47402  # If so, the updated path is stored in $new_path.
47403
47404  input_path="$new_path"
47405  # Check if we need to convert this using DOS-style short mode. If the path
47406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47407  # take no chances and rewrite it.
47408  # Note: m4 eats our [], so we need to use [ and ] instead.
47409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47410  if test "x$has_forbidden_chars" != x; then
47411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47415      # Going to short mode and back again did indeed matter. Since short mode is
47416      # case insensitive, let's make it lowercase to improve readability.
47417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47418      # Now convert it back to Unix-style (cygpath)
47419      input_path=`$CYGPATH -u "$shortmode_path"`
47420      new_path="$input_path"
47421    fi
47422  fi
47423
47424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47425  if test "x$test_cygdrive_prefix" = x; then
47426    # As a simple fix, exclude /usr/bin since it's not a real path.
47427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47429      # a path prefixed by /cygdrive for fixpath to work.
47430      new_path="$CYGWIN_ROOT_PATH$input_path"
47431    fi
47432  fi
47433
47434
47435  if test "x$path" != "x$new_path"; then
47436    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47439  fi
47440
47441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47442
47443  path="$POTENTIAL_FREETYPE_LIB_PATH"
47444  has_colon=`$ECHO $path | $GREP ^.:`
47445  new_path="$path"
47446  if test "x$has_colon" = x; then
47447    # Not in mixed or Windows style, start by that.
47448    new_path=`cmd //c echo $path`
47449  fi
47450
47451
47452  input_path="$new_path"
47453  # Check if we need to convert this using DOS-style short mode. If the path
47454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47455  # take no chances and rewrite it.
47456  # Note: m4 eats our [], so we need to use [ and ] instead.
47457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47458  if test "x$has_forbidden_chars" != x; then
47459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47461  fi
47462
47463
47464  windows_path="$new_path"
47465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47466    unix_path=`$CYGPATH -u "$windows_path"`
47467    new_path="$unix_path"
47468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47470    new_path="$unix_path"
47471  fi
47472
47473  if test "x$path" != "x$new_path"; then
47474    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47477  fi
47478
47479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47481
47482    else
47483      # We're on a unix platform. Hooray! :)
47484      path="$POTENTIAL_FREETYPE_LIB_PATH"
47485      has_space=`$ECHO "$path" | $GREP " "`
47486      if test "x$has_space" != x; then
47487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47490      fi
47491
47492      # Use eval to expand a potential ~
47493      eval path="$path"
47494      if test ! -f "$path" && test ! -d "$path"; then
47495        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47496      fi
47497
47498      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47499    fi
47500  fi
47501
47502
47503    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47505$as_echo_n "checking for freetype includes... " >&6; }
47506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47507$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47508    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47510$as_echo_n "checking for freetype libraries... " >&6; }
47511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47512$as_echo "$FREETYPE_LIB_PATH" >&6; }
47513  fi
47514
47515              if test "x$FOUND_FREETYPE" != xyes; then
47516
47517  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47518  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47519  METHOD="well-known location"
47520
47521  # Let's start with an optimistic view of the world :-)
47522  FOUND_FREETYPE=yes
47523
47524  # First look for the canonical freetype main include file ft2build.h.
47525  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47526    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47527    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47528    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47529      # Fail.
47530      FOUND_FREETYPE=no
47531    fi
47532  fi
47533
47534  if test "x$FOUND_FREETYPE" = xyes; then
47535    # Include file found, let's continue the sanity check.
47536    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47537$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47538
47539    # Reset to default value
47540    FREETYPE_BASE_NAME=freetype
47541    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47542    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47543      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47544          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47545        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47546        # for the .6 version explicitly.
47547        FREETYPE_BASE_NAME=freetype.6
47548        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47549        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47550$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47551      else
47552        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47553$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47554        FOUND_FREETYPE=no
47555      fi
47556    else
47557      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47558        # On Windows, we will need both .lib and .dll file.
47559        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47560          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47561$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47562          FOUND_FREETYPE=no
47563        fi
47564      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47565          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47566        # Found lib in isa dir, use that instead.
47567        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47568        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47569$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47570      fi
47571    fi
47572  fi
47573
47574  if test "x$FOUND_FREETYPE" = xyes; then
47575
47576  # Only process if variable expands to non-empty
47577
47578  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47580
47581  # Input might be given as Windows format, start by converting to
47582  # unix format.
47583  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47584  new_path=`$CYGPATH -u "$path"`
47585
47586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47589  # "foo.exe" is OK but "foo" is an error.
47590  #
47591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47592  # It is also a way to make sure we got the proper file name for the real test later on.
47593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47594  if test "x$test_shortpath" = x; then
47595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47597    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47598  fi
47599
47600  # Call helper function which possibly converts this using DOS-style short mode.
47601  # If so, the updated path is stored in $new_path.
47602
47603  input_path="$new_path"
47604  # Check if we need to convert this using DOS-style short mode. If the path
47605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47606  # take no chances and rewrite it.
47607  # Note: m4 eats our [], so we need to use [ and ] instead.
47608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47609  if test "x$has_forbidden_chars" != x; then
47610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47614      # Going to short mode and back again did indeed matter. Since short mode is
47615      # case insensitive, let's make it lowercase to improve readability.
47616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47617      # Now convert it back to Unix-style (cygpath)
47618      input_path=`$CYGPATH -u "$shortmode_path"`
47619      new_path="$input_path"
47620    fi
47621  fi
47622
47623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47624  if test "x$test_cygdrive_prefix" = x; then
47625    # As a simple fix, exclude /usr/bin since it's not a real path.
47626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47628      # a path prefixed by /cygdrive for fixpath to work.
47629      new_path="$CYGWIN_ROOT_PATH$input_path"
47630    fi
47631  fi
47632
47633
47634  if test "x$path" != "x$new_path"; then
47635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47638  fi
47639
47640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47641
47642  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47643  has_colon=`$ECHO $path | $GREP ^.:`
47644  new_path="$path"
47645  if test "x$has_colon" = x; then
47646    # Not in mixed or Windows style, start by that.
47647    new_path=`cmd //c echo $path`
47648  fi
47649
47650
47651  input_path="$new_path"
47652  # Check if we need to convert this using DOS-style short mode. If the path
47653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47654  # take no chances and rewrite it.
47655  # Note: m4 eats our [], so we need to use [ and ] instead.
47656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47657  if test "x$has_forbidden_chars" != x; then
47658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47660  fi
47661
47662
47663  windows_path="$new_path"
47664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47665    unix_path=`$CYGPATH -u "$windows_path"`
47666    new_path="$unix_path"
47667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47669    new_path="$unix_path"
47670  fi
47671
47672  if test "x$path" != "x$new_path"; then
47673    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47676  fi
47677
47678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47680
47681    else
47682      # We're on a unix platform. Hooray! :)
47683      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47684      has_space=`$ECHO "$path" | $GREP " "`
47685      if test "x$has_space" != x; then
47686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47689      fi
47690
47691      # Use eval to expand a potential ~
47692      eval path="$path"
47693      if test ! -f "$path" && test ! -d "$path"; then
47694        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47695      fi
47696
47697      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47698    fi
47699  fi
47700
47701
47702  # Only process if variable expands to non-empty
47703
47704  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47706
47707  # Input might be given as Windows format, start by converting to
47708  # unix format.
47709  path="$POTENTIAL_FREETYPE_LIB_PATH"
47710  new_path=`$CYGPATH -u "$path"`
47711
47712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47715  # "foo.exe" is OK but "foo" is an error.
47716  #
47717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47718  # It is also a way to make sure we got the proper file name for the real test later on.
47719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47720  if test "x$test_shortpath" = x; then
47721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47723    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47724  fi
47725
47726  # Call helper function which possibly converts this using DOS-style short mode.
47727  # If so, the updated path is stored in $new_path.
47728
47729  input_path="$new_path"
47730  # Check if we need to convert this using DOS-style short mode. If the path
47731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47732  # take no chances and rewrite it.
47733  # Note: m4 eats our [], so we need to use [ and ] instead.
47734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47735  if test "x$has_forbidden_chars" != x; then
47736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47740      # Going to short mode and back again did indeed matter. Since short mode is
47741      # case insensitive, let's make it lowercase to improve readability.
47742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47743      # Now convert it back to Unix-style (cygpath)
47744      input_path=`$CYGPATH -u "$shortmode_path"`
47745      new_path="$input_path"
47746    fi
47747  fi
47748
47749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47750  if test "x$test_cygdrive_prefix" = x; then
47751    # As a simple fix, exclude /usr/bin since it's not a real path.
47752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47754      # a path prefixed by /cygdrive for fixpath to work.
47755      new_path="$CYGWIN_ROOT_PATH$input_path"
47756    fi
47757  fi
47758
47759
47760  if test "x$path" != "x$new_path"; then
47761    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47764  fi
47765
47766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47767
47768  path="$POTENTIAL_FREETYPE_LIB_PATH"
47769  has_colon=`$ECHO $path | $GREP ^.:`
47770  new_path="$path"
47771  if test "x$has_colon" = x; then
47772    # Not in mixed or Windows style, start by that.
47773    new_path=`cmd //c echo $path`
47774  fi
47775
47776
47777  input_path="$new_path"
47778  # Check if we need to convert this using DOS-style short mode. If the path
47779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47780  # take no chances and rewrite it.
47781  # Note: m4 eats our [], so we need to use [ and ] instead.
47782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47783  if test "x$has_forbidden_chars" != x; then
47784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47786  fi
47787
47788
47789  windows_path="$new_path"
47790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47791    unix_path=`$CYGPATH -u "$windows_path"`
47792    new_path="$unix_path"
47793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47795    new_path="$unix_path"
47796  fi
47797
47798  if test "x$path" != "x$new_path"; then
47799    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47802  fi
47803
47804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47806
47807    else
47808      # We're on a unix platform. Hooray! :)
47809      path="$POTENTIAL_FREETYPE_LIB_PATH"
47810      has_space=`$ECHO "$path" | $GREP " "`
47811      if test "x$has_space" != x; then
47812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47813$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47815      fi
47816
47817      # Use eval to expand a potential ~
47818      eval path="$path"
47819      if test ! -f "$path" && test ! -d "$path"; then
47820        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47821      fi
47822
47823      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47824    fi
47825  fi
47826
47827
47828    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47830$as_echo_n "checking for freetype includes... " >&6; }
47831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47832$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47833    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47835$as_echo_n "checking for freetype libraries... " >&6; }
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47837$as_echo "$FREETYPE_LIB_PATH" >&6; }
47838  fi
47839
47840              fi
47841            fi
47842          fi
47843        fi
47844      fi # end check in well-known locations
47845
47846      if test "x$FOUND_FREETYPE" != xyes; then
47847
47848  # Print a helpful message on how to acquire the necessary build dependency.
47849  # freetype is the help tag: freetype, cups, pulse, alsa etc
47850  MISSING_DEPENDENCY=freetype
47851
47852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47853    cygwin_help $MISSING_DEPENDENCY
47854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47855    msys_help $MISSING_DEPENDENCY
47856  else
47857    PKGHANDLER_COMMAND=
47858
47859    case $PKGHANDLER in
47860      apt-get)
47861        apt_help     $MISSING_DEPENDENCY ;;
47862      yum)
47863        yum_help     $MISSING_DEPENDENCY ;;
47864      port)
47865        port_help    $MISSING_DEPENDENCY ;;
47866      pkgutil)
47867        pkgutil_help $MISSING_DEPENDENCY ;;
47868      pkgadd)
47869        pkgadd_help  $MISSING_DEPENDENCY ;;
47870    esac
47871
47872    if test "x$PKGHANDLER_COMMAND" != x; then
47873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47874    fi
47875  fi
47876
47877        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47878      fi
47879    fi # end user specified settings
47880
47881    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47882    if test "x$FREETYPE_CFLAGS" = x; then
47883
47884  # Only process if variable expands to non-empty
47885
47886  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47888
47889  # Input might be given as Windows format, start by converting to
47890  # unix format.
47891  path="$FREETYPE_INCLUDE_PATH"
47892  new_path=`$CYGPATH -u "$path"`
47893
47894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47897  # "foo.exe" is OK but "foo" is an error.
47898  #
47899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47900  # It is also a way to make sure we got the proper file name for the real test later on.
47901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47902  if test "x$test_shortpath" = x; then
47903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47904$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47905    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47906  fi
47907
47908  # Call helper function which possibly converts this using DOS-style short mode.
47909  # If so, the updated path is stored in $new_path.
47910
47911  input_path="$new_path"
47912  # Check if we need to convert this using DOS-style short mode. If the path
47913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47914  # take no chances and rewrite it.
47915  # Note: m4 eats our [], so we need to use [ and ] instead.
47916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47917  if test "x$has_forbidden_chars" != x; then
47918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47922      # Going to short mode and back again did indeed matter. Since short mode is
47923      # case insensitive, let's make it lowercase to improve readability.
47924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47925      # Now convert it back to Unix-style (cygpath)
47926      input_path=`$CYGPATH -u "$shortmode_path"`
47927      new_path="$input_path"
47928    fi
47929  fi
47930
47931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47932  if test "x$test_cygdrive_prefix" = x; then
47933    # As a simple fix, exclude /usr/bin since it's not a real path.
47934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47936      # a path prefixed by /cygdrive for fixpath to work.
47937      new_path="$CYGWIN_ROOT_PATH$input_path"
47938    fi
47939  fi
47940
47941
47942  if test "x$path" != "x$new_path"; then
47943    FREETYPE_INCLUDE_PATH="$new_path"
47944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47945$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47946  fi
47947
47948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47949
47950  path="$FREETYPE_INCLUDE_PATH"
47951  has_colon=`$ECHO $path | $GREP ^.:`
47952  new_path="$path"
47953  if test "x$has_colon" = x; then
47954    # Not in mixed or Windows style, start by that.
47955    new_path=`cmd //c echo $path`
47956  fi
47957
47958
47959  input_path="$new_path"
47960  # Check if we need to convert this using DOS-style short mode. If the path
47961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47962  # take no chances and rewrite it.
47963  # Note: m4 eats our [], so we need to use [ and ] instead.
47964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47965  if test "x$has_forbidden_chars" != x; then
47966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47968  fi
47969
47970
47971  windows_path="$new_path"
47972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47973    unix_path=`$CYGPATH -u "$windows_path"`
47974    new_path="$unix_path"
47975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47977    new_path="$unix_path"
47978  fi
47979
47980  if test "x$path" != "x$new_path"; then
47981    FREETYPE_INCLUDE_PATH="$new_path"
47982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47983$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47984  fi
47985
47986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47988
47989    else
47990      # We're on a unix platform. Hooray! :)
47991      path="$FREETYPE_INCLUDE_PATH"
47992      has_space=`$ECHO "$path" | $GREP " "`
47993      if test "x$has_space" != x; then
47994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47995$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47997      fi
47998
47999      # Use eval to expand a potential ~
48000      eval path="$path"
48001      if test ! -f "$path" && test ! -d "$path"; then
48002        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48003      fi
48004
48005      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48006    fi
48007  fi
48008
48009      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48010        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48011      else
48012        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48013      fi
48014    fi
48015
48016    if test "x$FREETYPE_LIBS" = x; then
48017
48018  # Only process if variable expands to non-empty
48019
48020  if test "x$FREETYPE_LIB_PATH" != x; then
48021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48022
48023  # Input might be given as Windows format, start by converting to
48024  # unix format.
48025  path="$FREETYPE_LIB_PATH"
48026  new_path=`$CYGPATH -u "$path"`
48027
48028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48031  # "foo.exe" is OK but "foo" is an error.
48032  #
48033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48034  # It is also a way to make sure we got the proper file name for the real test later on.
48035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48036  if test "x$test_shortpath" = x; then
48037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48038$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48039    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48040  fi
48041
48042  # Call helper function which possibly converts this using DOS-style short mode.
48043  # If so, the updated path is stored in $new_path.
48044
48045  input_path="$new_path"
48046  # Check if we need to convert this using DOS-style short mode. If the path
48047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48048  # take no chances and rewrite it.
48049  # Note: m4 eats our [], so we need to use [ and ] instead.
48050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48051  if test "x$has_forbidden_chars" != x; then
48052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48056      # Going to short mode and back again did indeed matter. Since short mode is
48057      # case insensitive, let's make it lowercase to improve readability.
48058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48059      # Now convert it back to Unix-style (cygpath)
48060      input_path=`$CYGPATH -u "$shortmode_path"`
48061      new_path="$input_path"
48062    fi
48063  fi
48064
48065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48066  if test "x$test_cygdrive_prefix" = x; then
48067    # As a simple fix, exclude /usr/bin since it's not a real path.
48068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48070      # a path prefixed by /cygdrive for fixpath to work.
48071      new_path="$CYGWIN_ROOT_PATH$input_path"
48072    fi
48073  fi
48074
48075
48076  if test "x$path" != "x$new_path"; then
48077    FREETYPE_LIB_PATH="$new_path"
48078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48079$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48080  fi
48081
48082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48083
48084  path="$FREETYPE_LIB_PATH"
48085  has_colon=`$ECHO $path | $GREP ^.:`
48086  new_path="$path"
48087  if test "x$has_colon" = x; then
48088    # Not in mixed or Windows style, start by that.
48089    new_path=`cmd //c echo $path`
48090  fi
48091
48092
48093  input_path="$new_path"
48094  # Check if we need to convert this using DOS-style short mode. If the path
48095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48096  # take no chances and rewrite it.
48097  # Note: m4 eats our [], so we need to use [ and ] instead.
48098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48099  if test "x$has_forbidden_chars" != x; then
48100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48102  fi
48103
48104
48105  windows_path="$new_path"
48106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48107    unix_path=`$CYGPATH -u "$windows_path"`
48108    new_path="$unix_path"
48109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48111    new_path="$unix_path"
48112  fi
48113
48114  if test "x$path" != "x$new_path"; then
48115    FREETYPE_LIB_PATH="$new_path"
48116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48117$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48118  fi
48119
48120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48122
48123    else
48124      # We're on a unix platform. Hooray! :)
48125      path="$FREETYPE_LIB_PATH"
48126      has_space=`$ECHO "$path" | $GREP " "`
48127      if test "x$has_space" != x; then
48128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48129$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48131      fi
48132
48133      # Use eval to expand a potential ~
48134      eval path="$path"
48135      if test ! -f "$path" && test ! -d "$path"; then
48136        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48137      fi
48138
48139      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48140    fi
48141  fi
48142
48143      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48144        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48145      else
48146        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48147      fi
48148    fi
48149
48150    # Try to compile it
48151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48152$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48153    ac_ext=cpp
48154ac_cpp='$CXXCPP $CPPFLAGS'
48155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48158
48159    PREV_CXXCFLAGS="$CXXFLAGS"
48160    PREV_LIBS="$LIBS"
48161    PREV_CXX="$CXX"
48162    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48163    LIBS="$LIBS $FREETYPE_LIBS"
48164    CXX="$FIXPATH $CXX"
48165    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48166/* end confdefs.h.  */
48167
48168          #include<ft2build.h>
48169          #include FT_FREETYPE_H
48170          int main () {
48171            FT_Init_FreeType(NULL);
48172            return 0;
48173          }
48174
48175_ACEOF
48176if ac_fn_cxx_try_link "$LINENO"; then :
48177
48178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48179$as_echo "yes" >&6; }
48180
48181else
48182
48183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48184$as_echo "no" >&6; }
48185          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48186$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48187          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48188$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48189
48190
48191  # Print a helpful message on how to acquire the necessary build dependency.
48192  # freetype is the help tag: freetype, cups, pulse, alsa etc
48193  MISSING_DEPENDENCY=freetype
48194
48195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48196    cygwin_help $MISSING_DEPENDENCY
48197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48198    msys_help $MISSING_DEPENDENCY
48199  else
48200    PKGHANDLER_COMMAND=
48201
48202    case $PKGHANDLER in
48203      apt-get)
48204        apt_help     $MISSING_DEPENDENCY ;;
48205      yum)
48206        yum_help     $MISSING_DEPENDENCY ;;
48207      port)
48208        port_help    $MISSING_DEPENDENCY ;;
48209      pkgutil)
48210        pkgutil_help $MISSING_DEPENDENCY ;;
48211      pkgadd)
48212        pkgadd_help  $MISSING_DEPENDENCY ;;
48213    esac
48214
48215    if test "x$PKGHANDLER_COMMAND" != x; then
48216      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48217    fi
48218  fi
48219
48220
48221          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48222
48223
48224fi
48225rm -f core conftest.err conftest.$ac_objext \
48226    conftest$ac_exeext conftest.$ac_ext
48227    CXXCFLAGS="$PREV_CXXFLAGS"
48228    LIBS="$PREV_LIBS"
48229    CXX="$PREV_CXX"
48230    ac_ext=cpp
48231ac_cpp='$CXXCPP $CPPFLAGS'
48232ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48233ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48234ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48235
48236
48237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48238$as_echo_n "checking if we should bundle freetype... " >&6; }
48239    if test "x$BUNDLE_FREETYPE" = xyes; then
48240      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48241    fi
48242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48243$as_echo "$BUNDLE_FREETYPE" >&6; }
48244
48245  fi # end freetype needed
48246
48247
48248
48249
48250
48251
48252
48253  ###############################################################################
48254  #
48255  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48256  #
48257
48258# Check whether --with-alsa was given.
48259if test "${with_alsa+set}" = set; then :
48260  withval=$with_alsa;
48261fi
48262
48263
48264# Check whether --with-alsa-include was given.
48265if test "${with_alsa_include+set}" = set; then :
48266  withval=$with_alsa_include;
48267fi
48268
48269
48270# Check whether --with-alsa-lib was given.
48271if test "${with_alsa_lib+set}" = set; then :
48272  withval=$with_alsa_lib;
48273fi
48274
48275
48276  if test "x$ALSA_NOT_NEEDED" = xyes; then
48277    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48278      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48279$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48280    fi
48281    ALSA_CFLAGS=
48282    ALSA_LIBS=
48283  else
48284    ALSA_FOUND=no
48285
48286    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48287      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48288    fi
48289
48290    if test "x${with_alsa}" != x; then
48291      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48292      ALSA_CFLAGS="-I${with_alsa}/include"
48293      ALSA_FOUND=yes
48294    fi
48295    if test "x${with_alsa_include}" != x; then
48296      ALSA_CFLAGS="-I${with_alsa_include}"
48297      ALSA_FOUND=yes
48298    fi
48299    if test "x${with_alsa_lib}" != x; then
48300      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48301      ALSA_FOUND=yes
48302    fi
48303    if test "x$ALSA_FOUND" = xno; then
48304
48305
48306  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48307    # Source the builddeps file again, to make sure it uses the latest variables!
48308    . $builddepsfile
48309    # Look for a target and build machine specific resource!
48310    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48311    if test "x$resource" = x; then
48312      # Ok, lets instead look for a target specific resource
48313      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48314    fi
48315    if test "x$resource" = x; then
48316      # Ok, lets instead look for a build specific resource
48317      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48318    fi
48319    if test "x$resource" = x; then
48320      # Ok, lets instead look for a generic resource
48321      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48322      resource=${builddep_alsa}
48323    fi
48324    if test "x$resource" != x; then
48325      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48326$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48327      # If the resource in the builddeps.conf file is an existing directory,
48328      # for example /java/linux/cups
48329      if test -d ${resource}; then
48330        depdir=${resource}
48331      else
48332
48333  # alsa is for example mymodule
48334  # $resource is for example libs/general/libmymod_1_2_3.zip
48335  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48336  # $with_builddeps_dir is for example /localhome/builddeps
48337  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48338  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48339  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48340  filename=`basename $resource`
48341  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48342  filebase=${filename%%.*}
48343  extension=${filename#*.}
48344  installdir=$with_builddeps_dir/$filebase
48345  if test ! -f $installdir/$filename.unpacked; then
48346    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48347$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48348    if test ! -d $installdir; then
48349      mkdir -p $installdir
48350    fi
48351    if test ! -d $installdir; then
48352      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48353    fi
48354    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48355    touch $tmpfile
48356    if test ! -f $tmpfile; then
48357      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48358    fi
48359
48360  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48361  # $tmpfile is the local file name for the downloaded file.
48362  VALID_TOOL=no
48363  if test "x$BDEPS_FTP" = xwget; then
48364    VALID_TOOL=yes
48365    wget -O $tmpfile $with_builddeps_server/$resource
48366  fi
48367  if test "x$BDEPS_FTP" = xlftp; then
48368    VALID_TOOL=yes
48369    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48370  fi
48371  if test "x$BDEPS_FTP" = xftp; then
48372    VALID_TOOL=yes
48373    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48374    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48375    FTPUSERPWD=${FTPSERVER%%@*}
48376    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48377      FTPUSER=${userpwd%%:*}
48378      FTPPWD=${userpwd#*@}
48379      FTPSERVER=${FTPSERVER#*@}
48380    else
48381      FTPUSER=ftp
48382      FTPPWD=ftp
48383    fi
48384    # the "pass" command does not work on some
48385    # ftp clients (read ftp.exe) but if it works,
48386    # passive mode is better!
48387    ( \
48388        echo "user $FTPUSER $FTPPWD"        ; \
48389        echo "pass"                         ; \
48390        echo "bin"                          ; \
48391        echo "get $FTPPATH $tmpfile"              ; \
48392    ) | ftp -in $FTPSERVER
48393  fi
48394  if test "x$VALID_TOOL" != xyes; then
48395    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48396  fi
48397
48398    mv $tmpfile $installdir/$filename
48399    if test ! -s $installdir/$filename; then
48400      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48401    fi
48402    case "$extension" in
48403      zip)  echo "Unzipping $installdir/$filename..."
48404        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48405        ;;
48406      tar.gz) echo "Untaring $installdir/$filename..."
48407        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48408        ;;
48409      tgz) echo "Untaring $installdir/$filename..."
48410        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48411        ;;
48412      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48413        ;;
48414    esac
48415  fi
48416  if test -f $installdir/$filename.unpacked; then
48417    depdir=$installdir
48418  fi
48419
48420      fi
48421      # Source the builddeps file again, because in the previous command, the depdir
48422      # was updated to point at the current build dependency install directory.
48423      . $builddepsfile
48424      # Now extract variables from the builddeps.conf files.
48425      theroot=${builddep_alsa_ROOT}
48426      thecflags=${builddep_alsa_CFLAGS}
48427      thelibs=${builddep_alsa_LIBS}
48428      if test "x$depdir" = x; then
48429        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48430      fi
48431      ALSA=$depdir
48432      if test "x$theroot" != x; then
48433        ALSA="$theroot"
48434      fi
48435      if test "x$thecflags" != x; then
48436        ALSA_CFLAGS="$thecflags"
48437      fi
48438      if test "x$thelibs" != x; then
48439        ALSA_LIBS="$thelibs"
48440      fi
48441      ALSA_FOUND=yes
48442      else ALSA_FOUND=no
48443
48444    fi
48445    else ALSA_FOUND=no
48446
48447  fi
48448
48449    fi
48450    # Do not try pkg-config if we have a sysroot set.
48451    if test "x$SYSROOT" = x; then
48452      if test "x$ALSA_FOUND" = xno; then
48453
48454pkg_failed=no
48455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48456$as_echo_n "checking for ALSA... " >&6; }
48457
48458if test -n "$ALSA_CFLAGS"; then
48459    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48460 elif test -n "$PKG_CONFIG"; then
48461    if test -n "$PKG_CONFIG" && \
48462    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48463  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48464  ac_status=$?
48465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48466  test $ac_status = 0; }; then
48467  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48468else
48469  pkg_failed=yes
48470fi
48471 else
48472    pkg_failed=untried
48473fi
48474if test -n "$ALSA_LIBS"; then
48475    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48476 elif test -n "$PKG_CONFIG"; then
48477    if test -n "$PKG_CONFIG" && \
48478    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48479  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48480  ac_status=$?
48481  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48482  test $ac_status = 0; }; then
48483  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48484else
48485  pkg_failed=yes
48486fi
48487 else
48488    pkg_failed=untried
48489fi
48490
48491
48492
48493if test $pkg_failed = yes; then
48494
48495if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48496        _pkg_short_errors_supported=yes
48497else
48498        _pkg_short_errors_supported=no
48499fi
48500        if test $_pkg_short_errors_supported = yes; then
48501	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48502        else
48503	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48504        fi
48505	# Put the nasty error message in config.log where it belongs
48506	echo "$ALSA_PKG_ERRORS" >&5
48507
48508	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48509$as_echo "no" >&6; }
48510                ALSA_FOUND=no
48511elif test $pkg_failed = untried; then
48512	ALSA_FOUND=no
48513else
48514	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48515	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48517$as_echo "yes" >&6; }
48518	ALSA_FOUND=yes
48519fi
48520      fi
48521    fi
48522    if test "x$ALSA_FOUND" = xno; then
48523      for ac_header in alsa/asoundlib.h
48524do :
48525  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48526if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48527  cat >>confdefs.h <<_ACEOF
48528#define HAVE_ALSA_ASOUNDLIB_H 1
48529_ACEOF
48530
48531            ALSA_FOUND=yes
48532            ALSA_CFLAGS=-Iignoreme
48533            ALSA_LIBS=-lasound
48534            DEFAULT_ALSA=yes
48535
48536else
48537  ALSA_FOUND=no
48538fi
48539
48540done
48541
48542    fi
48543    if test "x$ALSA_FOUND" = xno; then
48544
48545  # Print a helpful message on how to acquire the necessary build dependency.
48546  # alsa is the help tag: freetype, cups, pulse, alsa etc
48547  MISSING_DEPENDENCY=alsa
48548
48549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48550    cygwin_help $MISSING_DEPENDENCY
48551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48552    msys_help $MISSING_DEPENDENCY
48553  else
48554    PKGHANDLER_COMMAND=
48555
48556    case $PKGHANDLER in
48557      apt-get)
48558        apt_help     $MISSING_DEPENDENCY ;;
48559      yum)
48560        yum_help     $MISSING_DEPENDENCY ;;
48561      port)
48562        port_help    $MISSING_DEPENDENCY ;;
48563      pkgutil)
48564        pkgutil_help $MISSING_DEPENDENCY ;;
48565      pkgadd)
48566        pkgadd_help  $MISSING_DEPENDENCY ;;
48567    esac
48568
48569    if test "x$PKGHANDLER_COMMAND" != x; then
48570      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48571    fi
48572  fi
48573
48574      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48575    fi
48576  fi
48577
48578
48579
48580
48581
48582
48583  ###############################################################################
48584  #
48585  # Check for the jpeg library
48586  #
48587
48588
48589# Check whether --with-libjpeg was given.
48590if test "${with_libjpeg+set}" = set; then :
48591  withval=$with_libjpeg;
48592fi
48593
48594
48595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48596$as_echo_n "checking for which libjpeg to use... " >&6; }
48597
48598  # default is bundled
48599  DEFAULT_LIBJPEG=bundled
48600
48601  #
48602  # if user didn't specify, use DEFAULT_LIBJPEG
48603  #
48604  if test "x${with_libjpeg}" = "x"; then
48605    with_libjpeg=${DEFAULT_LIBJPEG}
48606  fi
48607
48608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48609$as_echo "${with_libjpeg}" >&6; }
48610
48611  if test "x${with_libjpeg}" = "xbundled"; then
48612    USE_EXTERNAL_LIBJPEG=false
48613  elif test "x${with_libjpeg}" = "xsystem"; then
48614    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48615if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48616
48617else
48618   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48619fi
48620
48621
48622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48623$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48624if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48625  $as_echo_n "(cached) " >&6
48626else
48627  ac_check_lib_save_LIBS=$LIBS
48628LIBS="-ljpeg  $LIBS"
48629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48630/* end confdefs.h.  */
48631
48632/* Override any GCC internal prototype to avoid an error.
48633   Use char because int might match the return type of a GCC
48634   builtin and then its argument prototype would still apply.  */
48635#ifdef __cplusplus
48636extern "C"
48637#endif
48638char jpeg_CreateDecompress ();
48639int
48640main ()
48641{
48642return jpeg_CreateDecompress ();
48643  ;
48644  return 0;
48645}
48646_ACEOF
48647if ac_fn_cxx_try_link "$LINENO"; then :
48648  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48649else
48650  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48651fi
48652rm -f core conftest.err conftest.$ac_objext \
48653    conftest$ac_exeext conftest.$ac_ext
48654LIBS=$ac_check_lib_save_LIBS
48655fi
48656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48657$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48658if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48659  cat >>confdefs.h <<_ACEOF
48660#define HAVE_LIBJPEG 1
48661_ACEOF
48662
48663  LIBS="-ljpeg $LIBS"
48664
48665else
48666   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48667fi
48668
48669
48670    USE_EXTERNAL_LIBJPEG=true
48671  else
48672    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48673  fi
48674
48675
48676
48677  ###############################################################################
48678  #
48679  # Check for the gif library
48680  #
48681
48682
48683# Check whether --with-giflib was given.
48684if test "${with_giflib+set}" = set; then :
48685  withval=$with_giflib;
48686fi
48687
48688
48689
48690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48691$as_echo_n "checking for which giflib to use... " >&6; }
48692
48693  # default is bundled
48694  DEFAULT_GIFLIB=bundled
48695
48696  #
48697  # if user didn't specify, use DEFAULT_GIFLIB
48698  #
48699  if test "x${with_giflib}" = "x"; then
48700    with_giflib=${DEFAULT_GIFLIB}
48701  fi
48702
48703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48704$as_echo "${with_giflib}" >&6; }
48705
48706  if test "x${with_giflib}" = "xbundled"; then
48707    USE_EXTERNAL_LIBGIF=false
48708  elif test "x${with_giflib}" = "xsystem"; then
48709    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48710if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48711
48712else
48713   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48714fi
48715
48716
48717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48718$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48719if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48720  $as_echo_n "(cached) " >&6
48721else
48722  ac_check_lib_save_LIBS=$LIBS
48723LIBS="-lgif  $LIBS"
48724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48725/* end confdefs.h.  */
48726
48727/* Override any GCC internal prototype to avoid an error.
48728   Use char because int might match the return type of a GCC
48729   builtin and then its argument prototype would still apply.  */
48730#ifdef __cplusplus
48731extern "C"
48732#endif
48733char DGifGetCode ();
48734int
48735main ()
48736{
48737return DGifGetCode ();
48738  ;
48739  return 0;
48740}
48741_ACEOF
48742if ac_fn_cxx_try_link "$LINENO"; then :
48743  ac_cv_lib_gif_DGifGetCode=yes
48744else
48745  ac_cv_lib_gif_DGifGetCode=no
48746fi
48747rm -f core conftest.err conftest.$ac_objext \
48748    conftest$ac_exeext conftest.$ac_ext
48749LIBS=$ac_check_lib_save_LIBS
48750fi
48751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48752$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48753if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48754  cat >>confdefs.h <<_ACEOF
48755#define HAVE_LIBGIF 1
48756_ACEOF
48757
48758  LIBS="-lgif $LIBS"
48759
48760else
48761   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48762fi
48763
48764
48765    USE_EXTERNAL_LIBGIF=true
48766  else
48767    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48768  fi
48769
48770
48771  ###############################################################################
48772  #
48773  # Check for the lcms2 library
48774  #
48775
48776
48777# Check whether --with-lcms was given.
48778if test "${with_lcms+set}" = set; then :
48779  withval=$with_lcms;
48780fi
48781
48782
48783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48784$as_echo_n "checking for which lcms to use... " >&6; }
48785
48786  DEFAULT_LCMS=bundled
48787
48788  #
48789  # If user didn't specify, use DEFAULT_LCMS
48790  #
48791  if test "x${with_lcms}" = "x"; then
48792      with_lcms=${DEFAULT_LCMS}
48793  fi
48794
48795  if test "x${with_lcms}" = "xbundled"; then
48796    USE_EXTERNAL_LCMS=false
48797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48798$as_echo "bundled" >&6; }
48799  elif test "x${with_lcms}" = "xsystem"; then
48800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48801$as_echo "system" >&6; }
48802
48803pkg_failed=no
48804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48805$as_echo_n "checking for LCMS... " >&6; }
48806
48807if test -n "$LCMS_CFLAGS"; then
48808    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48809 elif test -n "$PKG_CONFIG"; then
48810    if test -n "$PKG_CONFIG" && \
48811    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48812  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48813  ac_status=$?
48814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48815  test $ac_status = 0; }; then
48816  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48817else
48818  pkg_failed=yes
48819fi
48820 else
48821    pkg_failed=untried
48822fi
48823if test -n "$LCMS_LIBS"; then
48824    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48825 elif test -n "$PKG_CONFIG"; then
48826    if test -n "$PKG_CONFIG" && \
48827    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48828  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48829  ac_status=$?
48830  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48831  test $ac_status = 0; }; then
48832  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48833else
48834  pkg_failed=yes
48835fi
48836 else
48837    pkg_failed=untried
48838fi
48839
48840
48841
48842if test $pkg_failed = yes; then
48843
48844if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48845        _pkg_short_errors_supported=yes
48846else
48847        _pkg_short_errors_supported=no
48848fi
48849        if test $_pkg_short_errors_supported = yes; then
48850	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48851        else
48852	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48853        fi
48854	# Put the nasty error message in config.log where it belongs
48855	echo "$LCMS_PKG_ERRORS" >&5
48856
48857	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48858$as_echo "no" >&6; }
48859                LCMS_FOUND=no
48860elif test $pkg_failed = untried; then
48861	LCMS_FOUND=no
48862else
48863	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48864	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48866$as_echo "yes" >&6; }
48867	LCMS_FOUND=yes
48868fi
48869    if test "x${LCMS_FOUND}" = "xyes"; then
48870      USE_EXTERNAL_LCMS=true
48871    else
48872      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48873    fi
48874  else
48875    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48876  fi
48877
48878
48879
48880  ###############################################################################
48881  #
48882  # Check for the png library
48883  #
48884
48885
48886# Check whether --with-libpng was given.
48887if test "${with_libpng+set}" = set; then :
48888  withval=$with_libpng;
48889fi
48890
48891
48892
48893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48894$as_echo_n "checking for which libpng to use... " >&6; }
48895
48896  # default is bundled
48897  DEFAULT_LIBPNG=bundled
48898
48899  #
48900  # if user didn't specify, use DEFAULT_LIBPNG
48901  #
48902  if test "x${with_libpng}" = "x"; then
48903      with_libpng=${DEFAULT_LIBPNG}
48904  fi
48905
48906  if test "x${with_libpng}" = "xbundled"; then
48907      USE_EXTERNAL_LIBPNG=false
48908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48909$as_echo "bundled" >&6; }
48910  elif test "x${with_libpng}" = "xsystem"; then
48911
48912pkg_failed=no
48913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48914$as_echo_n "checking for PNG... " >&6; }
48915
48916if test -n "$PNG_CFLAGS"; then
48917    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48918 elif test -n "$PKG_CONFIG"; then
48919    if test -n "$PKG_CONFIG" && \
48920    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48921  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48922  ac_status=$?
48923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48924  test $ac_status = 0; }; then
48925  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48926else
48927  pkg_failed=yes
48928fi
48929 else
48930    pkg_failed=untried
48931fi
48932if test -n "$PNG_LIBS"; then
48933    pkg_cv_PNG_LIBS="$PNG_LIBS"
48934 elif test -n "$PKG_CONFIG"; then
48935    if test -n "$PKG_CONFIG" && \
48936    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48937  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48938  ac_status=$?
48939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48940  test $ac_status = 0; }; then
48941  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48942else
48943  pkg_failed=yes
48944fi
48945 else
48946    pkg_failed=untried
48947fi
48948
48949
48950
48951if test $pkg_failed = yes; then
48952
48953if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48954        _pkg_short_errors_supported=yes
48955else
48956        _pkg_short_errors_supported=no
48957fi
48958        if test $_pkg_short_errors_supported = yes; then
48959	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48960        else
48961	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48962        fi
48963	# Put the nasty error message in config.log where it belongs
48964	echo "$PNG_PKG_ERRORS" >&5
48965
48966	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48967$as_echo "no" >&6; }
48968                 LIBPNG_FOUND=no
48969elif test $pkg_failed = untried; then
48970	 LIBPNG_FOUND=no
48971else
48972	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48973	PNG_LIBS=$pkg_cv_PNG_LIBS
48974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48975$as_echo "yes" >&6; }
48976	 LIBPNG_FOUND=yes
48977fi
48978      if test "x${LIBPNG_FOUND}" = "xyes"; then
48979          USE_EXTERNAL_LIBPNG=true
48980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48981$as_echo "system" >&6; }
48982      else
48983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48984$as_echo "system not found" >&6; }
48985          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48986      fi
48987  else
48988      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48989  fi
48990
48991
48992  ###############################################################################
48993  #
48994  # Check for the zlib library
48995  #
48996
48997
48998# Check whether --with-zlib was given.
48999if test "${with_zlib+set}" = set; then :
49000  withval=$with_zlib;
49001fi
49002
49003
49004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49005$as_echo_n "checking for compress in -lz... " >&6; }
49006if ${ac_cv_lib_z_compress+:} false; then :
49007  $as_echo_n "(cached) " >&6
49008else
49009  ac_check_lib_save_LIBS=$LIBS
49010LIBS="-lz  $LIBS"
49011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49012/* end confdefs.h.  */
49013
49014/* Override any GCC internal prototype to avoid an error.
49015   Use char because int might match the return type of a GCC
49016   builtin and then its argument prototype would still apply.  */
49017#ifdef __cplusplus
49018extern "C"
49019#endif
49020char compress ();
49021int
49022main ()
49023{
49024return compress ();
49025  ;
49026  return 0;
49027}
49028_ACEOF
49029if ac_fn_cxx_try_link "$LINENO"; then :
49030  ac_cv_lib_z_compress=yes
49031else
49032  ac_cv_lib_z_compress=no
49033fi
49034rm -f core conftest.err conftest.$ac_objext \
49035    conftest$ac_exeext conftest.$ac_ext
49036LIBS=$ac_check_lib_save_LIBS
49037fi
49038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49039$as_echo "$ac_cv_lib_z_compress" >&6; }
49040if test "x$ac_cv_lib_z_compress" = xyes; then :
49041   ZLIB_FOUND=yes
49042else
49043   ZLIB_FOUND=no
49044fi
49045
49046
49047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49048$as_echo_n "checking for which zlib to use... " >&6; }
49049
49050  DEFAULT_ZLIB=bundled
49051  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49052    #
49053    # On macosx default is system...on others default is
49054    #
49055    DEFAULT_ZLIB=system
49056  fi
49057
49058  if test "x${ZLIB_FOUND}" != "xyes"; then
49059    #
49060    # If we don't find any system...set default to bundled
49061    #
49062    DEFAULT_ZLIB=bundled
49063  fi
49064
49065  #
49066  # If user didn't specify, use DEFAULT_ZLIB
49067  #
49068  if test "x${with_zlib}" = "x"; then
49069    with_zlib=${DEFAULT_ZLIB}
49070  fi
49071
49072  if test "x${with_zlib}" = "xbundled"; then
49073    USE_EXTERNAL_LIBZ=false
49074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49075$as_echo "bundled" >&6; }
49076  elif test "x${with_zlib}" = "xsystem"; then
49077    if test "x${ZLIB_FOUND}" = "xyes"; then
49078      USE_EXTERNAL_LIBZ=true
49079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49080$as_echo "system" >&6; }
49081    else
49082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49083$as_echo "system not found" >&6; }
49084      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49085    fi
49086  else
49087    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49088  fi
49089
49090
49091
49092  ###############################################################################
49093  LIBZIP_CAN_USE_MMAP=true
49094
49095
49096
49097  ###############################################################################
49098  #
49099  # Check if altzone exists in time.h
49100  #
49101
49102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49103/* end confdefs.h.  */
49104#include <time.h>
49105int
49106main ()
49107{
49108return (int)altzone;
49109  ;
49110  return 0;
49111}
49112_ACEOF
49113if ac_fn_cxx_try_link "$LINENO"; then :
49114  has_altzone=yes
49115else
49116  has_altzone=no
49117fi
49118rm -f core conftest.err conftest.$ac_objext \
49119    conftest$ac_exeext conftest.$ac_ext
49120  if test "x$has_altzone" = xyes; then
49121
49122$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49123
49124  fi
49125
49126  ###############################################################################
49127  #
49128  # Check the maths library
49129  #
49130
49131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49132$as_echo_n "checking for cos in -lm... " >&6; }
49133if ${ac_cv_lib_m_cos+:} false; then :
49134  $as_echo_n "(cached) " >&6
49135else
49136  ac_check_lib_save_LIBS=$LIBS
49137LIBS="-lm  $LIBS"
49138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49139/* end confdefs.h.  */
49140
49141/* Override any GCC internal prototype to avoid an error.
49142   Use char because int might match the return type of a GCC
49143   builtin and then its argument prototype would still apply.  */
49144#ifdef __cplusplus
49145extern "C"
49146#endif
49147char cos ();
49148int
49149main ()
49150{
49151return cos ();
49152  ;
49153  return 0;
49154}
49155_ACEOF
49156if ac_fn_cxx_try_link "$LINENO"; then :
49157  ac_cv_lib_m_cos=yes
49158else
49159  ac_cv_lib_m_cos=no
49160fi
49161rm -f core conftest.err conftest.$ac_objext \
49162    conftest$ac_exeext conftest.$ac_ext
49163LIBS=$ac_check_lib_save_LIBS
49164fi
49165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49166$as_echo "$ac_cv_lib_m_cos" >&6; }
49167if test "x$ac_cv_lib_m_cos" = xyes; then :
49168  cat >>confdefs.h <<_ACEOF
49169#define HAVE_LIBM 1
49170_ACEOF
49171
49172  LIBS="-lm $LIBS"
49173
49174else
49175
49176        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49177$as_echo "$as_me: Maths library was not found" >&6;}
49178
49179
49180fi
49181
49182
49183
49184  ###############################################################################
49185  #
49186  # Check for libdl.so
49187
49188  save_LIBS="$LIBS"
49189  LIBS=""
49190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49191$as_echo_n "checking for dlopen in -ldl... " >&6; }
49192if ${ac_cv_lib_dl_dlopen+:} false; then :
49193  $as_echo_n "(cached) " >&6
49194else
49195  ac_check_lib_save_LIBS=$LIBS
49196LIBS="-ldl  $LIBS"
49197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49198/* end confdefs.h.  */
49199
49200/* Override any GCC internal prototype to avoid an error.
49201   Use char because int might match the return type of a GCC
49202   builtin and then its argument prototype would still apply.  */
49203#ifdef __cplusplus
49204extern "C"
49205#endif
49206char dlopen ();
49207int
49208main ()
49209{
49210return dlopen ();
49211  ;
49212  return 0;
49213}
49214_ACEOF
49215if ac_fn_cxx_try_link "$LINENO"; then :
49216  ac_cv_lib_dl_dlopen=yes
49217else
49218  ac_cv_lib_dl_dlopen=no
49219fi
49220rm -f core conftest.err conftest.$ac_objext \
49221    conftest$ac_exeext conftest.$ac_ext
49222LIBS=$ac_check_lib_save_LIBS
49223fi
49224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49225$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49226if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49227  cat >>confdefs.h <<_ACEOF
49228#define HAVE_LIBDL 1
49229_ACEOF
49230
49231  LIBS="-ldl $LIBS"
49232
49233fi
49234
49235  LIBDL="$LIBS"
49236
49237  LIBS="$save_LIBS"
49238
49239
49240  ###############################################################################
49241  #
49242  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49243  # dynamic build is configured on command line.
49244  #
49245
49246# Check whether --with-stdc++lib was given.
49247if test "${with_stdc__lib+set}" = set; then :
49248  withval=$with_stdc__lib;
49249        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49250                && test "x$with_stdc__lib" != xdefault; then
49251          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49252        fi
49253
49254else
49255  with_stdc__lib=default
49256
49257fi
49258
49259
49260  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49261    # Test if -lstdc++ works.
49262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49263$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49264    ac_ext=cpp
49265ac_cpp='$CXXCPP $CPPFLAGS'
49266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49269
49270    OLD_CXXFLAGS="$CXXFLAGS"
49271    CXXFLAGS="$CXXFLAGS -lstdc++"
49272    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49273/* end confdefs.h.  */
49274
49275int
49276main ()
49277{
49278return 0;
49279  ;
49280  return 0;
49281}
49282_ACEOF
49283if ac_fn_cxx_try_link "$LINENO"; then :
49284  has_dynamic_libstdcxx=yes
49285else
49286  has_dynamic_libstdcxx=no
49287fi
49288rm -f core conftest.err conftest.$ac_objext \
49289    conftest$ac_exeext conftest.$ac_ext
49290    CXXFLAGS="$OLD_CXXFLAGS"
49291    ac_ext=cpp
49292ac_cpp='$CXXCPP $CPPFLAGS'
49293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49296
49297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49298$as_echo "$has_dynamic_libstdcxx" >&6; }
49299
49300    # Test if stdc++ can be linked statically.
49301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49302$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49303    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49304    ac_ext=cpp
49305ac_cpp='$CXXCPP $CPPFLAGS'
49306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49309
49310    OLD_LIBS="$LIBS"
49311    OLD_CXX="$CXX"
49312    LIBS="$STATIC_STDCXX_FLAGS"
49313    CXX="$CC"
49314    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49315/* end confdefs.h.  */
49316
49317int
49318main ()
49319{
49320return 0;
49321  ;
49322  return 0;
49323}
49324_ACEOF
49325if ac_fn_cxx_try_link "$LINENO"; then :
49326  has_static_libstdcxx=yes
49327else
49328  has_static_libstdcxx=no
49329fi
49330rm -f core conftest.err conftest.$ac_objext \
49331    conftest$ac_exeext conftest.$ac_ext
49332    LIBS="$OLD_LIBS"
49333    CXX="$OLD_CXX"
49334    ac_ext=cpp
49335ac_cpp='$CXXCPP $CPPFLAGS'
49336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49339
49340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49341$as_echo "$has_static_libstdcxx" >&6; }
49342
49343    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49344      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49345    fi
49346
49347    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49348      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49349    fi
49350
49351    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49352      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49353    fi
49354
49355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49356$as_echo_n "checking how to link with libstdc++... " >&6; }
49357    # If dynamic was requested, it's available since it would fail above otherwise.
49358    # If dynamic wasn't requested, go with static unless it isn't available.
49359    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49360      LIBCXX="$LIBCXX -lstdc++"
49361      LDCXX="$CXX"
49362      STATIC_CXX_SETTING="STATIC_CXX=false"
49363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49364$as_echo "dynamic" >&6; }
49365    else
49366      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49367      LDCXX="$CC"
49368      STATIC_CXX_SETTING="STATIC_CXX=true"
49369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49370$as_echo "static" >&6; }
49371    fi
49372  fi
49373
49374
49375  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49376    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49377
49378pkg_failed=no
49379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49380$as_echo_n "checking for LIBFFI... " >&6; }
49381
49382if test -n "$LIBFFI_CFLAGS"; then
49383    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49384 elif test -n "$PKG_CONFIG"; then
49385    if test -n "$PKG_CONFIG" && \
49386    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49387  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49388  ac_status=$?
49389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49390  test $ac_status = 0; }; then
49391  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49392else
49393  pkg_failed=yes
49394fi
49395 else
49396    pkg_failed=untried
49397fi
49398if test -n "$LIBFFI_LIBS"; then
49399    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49400 elif test -n "$PKG_CONFIG"; then
49401    if test -n "$PKG_CONFIG" && \
49402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49403  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49404  ac_status=$?
49405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49406  test $ac_status = 0; }; then
49407  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49408else
49409  pkg_failed=yes
49410fi
49411 else
49412    pkg_failed=untried
49413fi
49414
49415
49416
49417if test $pkg_failed = yes; then
49418
49419if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49420        _pkg_short_errors_supported=yes
49421else
49422        _pkg_short_errors_supported=no
49423fi
49424        if test $_pkg_short_errors_supported = yes; then
49425	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49426        else
49427	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49428        fi
49429	# Put the nasty error message in config.log where it belongs
49430	echo "$LIBFFI_PKG_ERRORS" >&5
49431
49432	as_fn_error $? "Package requirements (libffi) were not met:
49433
49434$LIBFFI_PKG_ERRORS
49435
49436Consider adjusting the PKG_CONFIG_PATH environment variable if you
49437installed software in a non-standard prefix.
49438
49439Alternatively, you may set the environment variables LIBFFI_CFLAGS
49440and LIBFFI_LIBS to avoid the need to call pkg-config.
49441See the pkg-config man page for more details.
49442" "$LINENO" 5
49443elif test $pkg_failed = untried; then
49444	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49446as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49447is in your PATH or set the PKG_CONFIG environment variable to the full
49448path to pkg-config.
49449
49450Alternatively, you may set the environment variables LIBFFI_CFLAGS
49451and LIBFFI_LIBS to avoid the need to call pkg-config.
49452See the pkg-config man page for more details.
49453
49454To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49455See \`config.log' for more details" "$LINENO" 5; }
49456else
49457	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49458	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49460$as_echo "yes" >&6; }
49461	:
49462fi
49463
49464  fi
49465
49466  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49467    # Extract the first word of "llvm-config", so it can be a program name with args.
49468set dummy llvm-config; ac_word=$2
49469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49470$as_echo_n "checking for $ac_word... " >&6; }
49471if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49472  $as_echo_n "(cached) " >&6
49473else
49474  if test -n "$LLVM_CONFIG"; then
49475  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49476else
49477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49478for as_dir in $PATH
49479do
49480  IFS=$as_save_IFS
49481  test -z "$as_dir" && as_dir=.
49482    for ac_exec_ext in '' $ac_executable_extensions; do
49483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49484    ac_cv_prog_LLVM_CONFIG="llvm-config"
49485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49486    break 2
49487  fi
49488done
49489  done
49490IFS=$as_save_IFS
49491
49492fi
49493fi
49494LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49495if test -n "$LLVM_CONFIG"; then
49496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49497$as_echo "$LLVM_CONFIG" >&6; }
49498else
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49500$as_echo "no" >&6; }
49501fi
49502
49503
49504
49505    if test "x$LLVM_CONFIG" != xllvm-config; then
49506      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49507    fi
49508
49509    llvm_components="jit mcjit engine nativecodegen native"
49510    unset LLVM_CFLAGS
49511    for flag in $("$LLVM_CONFIG" --cxxflags); do
49512      if echo "${flag}" | grep -q '^-[ID]'; then
49513        if test "${flag}" != "-D_DEBUG" ; then
49514          if test "${LLVM_CFLAGS}" != "" ; then
49515            LLVM_CFLAGS="${LLVM_CFLAGS} "
49516          fi
49517          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49518        fi
49519      fi
49520    done
49521    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49522    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49523
49524    unset LLVM_LDFLAGS
49525    for flag in $("${LLVM_CONFIG}" --ldflags); do
49526      if echo "${flag}" | grep -q '^-L'; then
49527        if test "${LLVM_LDFLAGS}" != ""; then
49528          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49529        fi
49530        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49531      fi
49532    done
49533
49534    unset LLVM_LIBS
49535    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49536      if echo "${flag}" | grep -q '^-l'; then
49537        if test "${LLVM_LIBS}" != ""; then
49538          LLVM_LIBS="${LLVM_LIBS} "
49539        fi
49540        LLVM_LIBS="${LLVM_LIBS}${flag}"
49541      fi
49542    done
49543
49544
49545
49546
49547  fi
49548
49549  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49550  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49551    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49552  fi
49553
49554  # TODO better (platform agnostic) test
49555  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49556    LIBCXX="-lstdc++"
49557  fi
49558
49559
49560
49561
49562  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49563
49564
49565# Check whether --with-msvcr-dll was given.
49566if test "${with_msvcr_dll+set}" = set; then :
49567  withval=$with_msvcr_dll;
49568fi
49569
49570
49571  if test "x$with_msvcr_dll" != x; then
49572    # If given explicitely by user, do not probe. If not present, fail directly.
49573
49574  DLL_NAME="$MSVCR_NAME"
49575  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49576  METHOD="--with-msvcr-dll"
49577  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49579$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49580
49581    # Need to check if the found msvcr is correct architecture
49582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49583$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49584    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49586      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49587      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49588      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49589        CORRECT_MSVCR_ARCH="PE32 executable"
49590      else
49591        CORRECT_MSVCR_ARCH="PE32+ executable"
49592      fi
49593    else
49594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49595        CORRECT_MSVCR_ARCH=386
49596      else
49597        CORRECT_MSVCR_ARCH=x86-64
49598      fi
49599    fi
49600    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49602$as_echo "ok" >&6; }
49603      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49604
49605  # Only process if variable expands to non-empty
49606
49607  if test "x$MSVC_DLL" != x; then
49608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49609
49610  # Input might be given as Windows format, start by converting to
49611  # unix format.
49612  path="$MSVC_DLL"
49613  new_path=`$CYGPATH -u "$path"`
49614
49615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49618  # "foo.exe" is OK but "foo" is an error.
49619  #
49620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49621  # It is also a way to make sure we got the proper file name for the real test later on.
49622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49623  if test "x$test_shortpath" = x; then
49624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49625$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49626    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49627  fi
49628
49629  # Call helper function which possibly converts this using DOS-style short mode.
49630  # If so, the updated path is stored in $new_path.
49631
49632  input_path="$new_path"
49633  # Check if we need to convert this using DOS-style short mode. If the path
49634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49635  # take no chances and rewrite it.
49636  # Note: m4 eats our [], so we need to use [ and ] instead.
49637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49638  if test "x$has_forbidden_chars" != x; then
49639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49643      # Going to short mode and back again did indeed matter. Since short mode is
49644      # case insensitive, let's make it lowercase to improve readability.
49645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49646      # Now convert it back to Unix-style (cygpath)
49647      input_path=`$CYGPATH -u "$shortmode_path"`
49648      new_path="$input_path"
49649    fi
49650  fi
49651
49652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49653  if test "x$test_cygdrive_prefix" = x; then
49654    # As a simple fix, exclude /usr/bin since it's not a real path.
49655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49657      # a path prefixed by /cygdrive for fixpath to work.
49658      new_path="$CYGWIN_ROOT_PATH$input_path"
49659    fi
49660  fi
49661
49662
49663  if test "x$path" != "x$new_path"; then
49664    MSVC_DLL="$new_path"
49665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49666$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49667  fi
49668
49669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49670
49671  path="$MSVC_DLL"
49672  has_colon=`$ECHO $path | $GREP ^.:`
49673  new_path="$path"
49674  if test "x$has_colon" = x; then
49675    # Not in mixed or Windows style, start by that.
49676    new_path=`cmd //c echo $path`
49677  fi
49678
49679
49680  input_path="$new_path"
49681  # Check if we need to convert this using DOS-style short mode. If the path
49682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49683  # take no chances and rewrite it.
49684  # Note: m4 eats our [], so we need to use [ and ] instead.
49685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49686  if test "x$has_forbidden_chars" != x; then
49687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49689  fi
49690
49691
49692  windows_path="$new_path"
49693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49694    unix_path=`$CYGPATH -u "$windows_path"`
49695    new_path="$unix_path"
49696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49698    new_path="$unix_path"
49699  fi
49700
49701  if test "x$path" != "x$new_path"; then
49702    MSVC_DLL="$new_path"
49703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49704$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49705  fi
49706
49707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49709
49710    else
49711      # We're on a unix platform. Hooray! :)
49712      path="$MSVC_DLL"
49713      has_space=`$ECHO "$path" | $GREP " "`
49714      if test "x$has_space" != x; then
49715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49716$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49718      fi
49719
49720      # Use eval to expand a potential ~
49721      eval path="$path"
49722      if test ! -f "$path" && test ! -d "$path"; then
49723        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49724      fi
49725
49726      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49727    fi
49728  fi
49729
49730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49731$as_echo_n "checking for $DLL_NAME... " >&6; }
49732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49733$as_echo "$MSVC_DLL" >&6; }
49734    else
49735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49736$as_echo "incorrect, ignoring" >&6; }
49737      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49738$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49739    fi
49740  fi
49741
49742    if test "x$MSVC_DLL" = x; then
49743      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49744    fi
49745    MSVCR_DLL="$MSVC_DLL"
49746  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49747
49748  DLL_NAME="$MSVCR_NAME"
49749  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49750  METHOD="devkit"
49751  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49752    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49753$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49754
49755    # Need to check if the found msvcr is correct architecture
49756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49757$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49758    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49760      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49761      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49763        CORRECT_MSVCR_ARCH="PE32 executable"
49764      else
49765        CORRECT_MSVCR_ARCH="PE32+ executable"
49766      fi
49767    else
49768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49769        CORRECT_MSVCR_ARCH=386
49770      else
49771        CORRECT_MSVCR_ARCH=x86-64
49772      fi
49773    fi
49774    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49776$as_echo "ok" >&6; }
49777      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49778
49779  # Only process if variable expands to non-empty
49780
49781  if test "x$MSVC_DLL" != x; then
49782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49783
49784  # Input might be given as Windows format, start by converting to
49785  # unix format.
49786  path="$MSVC_DLL"
49787  new_path=`$CYGPATH -u "$path"`
49788
49789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49792  # "foo.exe" is OK but "foo" is an error.
49793  #
49794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49795  # It is also a way to make sure we got the proper file name for the real test later on.
49796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49797  if test "x$test_shortpath" = x; then
49798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49799$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49800    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49801  fi
49802
49803  # Call helper function which possibly converts this using DOS-style short mode.
49804  # If so, the updated path is stored in $new_path.
49805
49806  input_path="$new_path"
49807  # Check if we need to convert this using DOS-style short mode. If the path
49808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49809  # take no chances and rewrite it.
49810  # Note: m4 eats our [], so we need to use [ and ] instead.
49811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49812  if test "x$has_forbidden_chars" != x; then
49813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49817      # Going to short mode and back again did indeed matter. Since short mode is
49818      # case insensitive, let's make it lowercase to improve readability.
49819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49820      # Now convert it back to Unix-style (cygpath)
49821      input_path=`$CYGPATH -u "$shortmode_path"`
49822      new_path="$input_path"
49823    fi
49824  fi
49825
49826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49827  if test "x$test_cygdrive_prefix" = x; then
49828    # As a simple fix, exclude /usr/bin since it's not a real path.
49829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49831      # a path prefixed by /cygdrive for fixpath to work.
49832      new_path="$CYGWIN_ROOT_PATH$input_path"
49833    fi
49834  fi
49835
49836
49837  if test "x$path" != "x$new_path"; then
49838    MSVC_DLL="$new_path"
49839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49840$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49841  fi
49842
49843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49844
49845  path="$MSVC_DLL"
49846  has_colon=`$ECHO $path | $GREP ^.:`
49847  new_path="$path"
49848  if test "x$has_colon" = x; then
49849    # Not in mixed or Windows style, start by that.
49850    new_path=`cmd //c echo $path`
49851  fi
49852
49853
49854  input_path="$new_path"
49855  # Check if we need to convert this using DOS-style short mode. If the path
49856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49857  # take no chances and rewrite it.
49858  # Note: m4 eats our [], so we need to use [ and ] instead.
49859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49860  if test "x$has_forbidden_chars" != x; then
49861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49863  fi
49864
49865
49866  windows_path="$new_path"
49867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49868    unix_path=`$CYGPATH -u "$windows_path"`
49869    new_path="$unix_path"
49870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49872    new_path="$unix_path"
49873  fi
49874
49875  if test "x$path" != "x$new_path"; then
49876    MSVC_DLL="$new_path"
49877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49878$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49879  fi
49880
49881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49883
49884    else
49885      # We're on a unix platform. Hooray! :)
49886      path="$MSVC_DLL"
49887      has_space=`$ECHO "$path" | $GREP " "`
49888      if test "x$has_space" != x; then
49889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49890$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49892      fi
49893
49894      # Use eval to expand a potential ~
49895      eval path="$path"
49896      if test ! -f "$path" && test ! -d "$path"; then
49897        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49898      fi
49899
49900      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49901    fi
49902  fi
49903
49904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49905$as_echo_n "checking for $DLL_NAME... " >&6; }
49906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49907$as_echo "$MSVC_DLL" >&6; }
49908    else
49909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49910$as_echo "incorrect, ignoring" >&6; }
49911      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49912$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49913    fi
49914  fi
49915
49916    if test "x$MSVC_DLL" = x; then
49917      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49918    fi
49919    MSVCR_DLL="$MSVC_DLL"
49920  else
49921
49922  DLL_NAME="${MSVCR_NAME}"
49923  MSVC_DLL=
49924
49925  if test "x$MSVC_DLL" = x; then
49926    # Probe: Using well-known location from Visual Studio 10.0
49927    if test "x$VCINSTALLDIR" != x; then
49928      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49929
49930  windows_path="$CYGWIN_VC_INSTALL_DIR"
49931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49932    unix_path=`$CYGPATH -u "$windows_path"`
49933    CYGWIN_VC_INSTALL_DIR="$unix_path"
49934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49936    CYGWIN_VC_INSTALL_DIR="$unix_path"
49937  fi
49938
49939      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49940        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49941      else
49942        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49943      fi
49944      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49945
49946  DLL_NAME="$DLL_NAME"
49947  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49948  METHOD="well-known location in VCINSTALLDIR"
49949  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49951$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49952
49953    # Need to check if the found msvcr is correct architecture
49954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49955$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49956    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49959      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49961        CORRECT_MSVCR_ARCH="PE32 executable"
49962      else
49963        CORRECT_MSVCR_ARCH="PE32+ executable"
49964      fi
49965    else
49966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49967        CORRECT_MSVCR_ARCH=386
49968      else
49969        CORRECT_MSVCR_ARCH=x86-64
49970      fi
49971    fi
49972    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49974$as_echo "ok" >&6; }
49975      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49976
49977  # Only process if variable expands to non-empty
49978
49979  if test "x$MSVC_DLL" != x; then
49980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981
49982  # Input might be given as Windows format, start by converting to
49983  # unix format.
49984  path="$MSVC_DLL"
49985  new_path=`$CYGPATH -u "$path"`
49986
49987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49990  # "foo.exe" is OK but "foo" is an error.
49991  #
49992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49993  # It is also a way to make sure we got the proper file name for the real test later on.
49994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49995  if test "x$test_shortpath" = x; then
49996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49998    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49999  fi
50000
50001  # Call helper function which possibly converts this using DOS-style short mode.
50002  # If so, the updated path is stored in $new_path.
50003
50004  input_path="$new_path"
50005  # Check if we need to convert this using DOS-style short mode. If the path
50006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50007  # take no chances and rewrite it.
50008  # Note: m4 eats our [], so we need to use [ and ] instead.
50009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50010  if test "x$has_forbidden_chars" != x; then
50011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50015      # Going to short mode and back again did indeed matter. Since short mode is
50016      # case insensitive, let's make it lowercase to improve readability.
50017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50018      # Now convert it back to Unix-style (cygpath)
50019      input_path=`$CYGPATH -u "$shortmode_path"`
50020      new_path="$input_path"
50021    fi
50022  fi
50023
50024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50025  if test "x$test_cygdrive_prefix" = x; then
50026    # As a simple fix, exclude /usr/bin since it's not a real path.
50027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50029      # a path prefixed by /cygdrive for fixpath to work.
50030      new_path="$CYGWIN_ROOT_PATH$input_path"
50031    fi
50032  fi
50033
50034
50035  if test "x$path" != "x$new_path"; then
50036    MSVC_DLL="$new_path"
50037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50038$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50039  fi
50040
50041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50042
50043  path="$MSVC_DLL"
50044  has_colon=`$ECHO $path | $GREP ^.:`
50045  new_path="$path"
50046  if test "x$has_colon" = x; then
50047    # Not in mixed or Windows style, start by that.
50048    new_path=`cmd //c echo $path`
50049  fi
50050
50051
50052  input_path="$new_path"
50053  # Check if we need to convert this using DOS-style short mode. If the path
50054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50055  # take no chances and rewrite it.
50056  # Note: m4 eats our [], so we need to use [ and ] instead.
50057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50058  if test "x$has_forbidden_chars" != x; then
50059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50061  fi
50062
50063
50064  windows_path="$new_path"
50065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50066    unix_path=`$CYGPATH -u "$windows_path"`
50067    new_path="$unix_path"
50068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50070    new_path="$unix_path"
50071  fi
50072
50073  if test "x$path" != "x$new_path"; then
50074    MSVC_DLL="$new_path"
50075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50076$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50077  fi
50078
50079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50081
50082    else
50083      # We're on a unix platform. Hooray! :)
50084      path="$MSVC_DLL"
50085      has_space=`$ECHO "$path" | $GREP " "`
50086      if test "x$has_space" != x; then
50087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50088$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50090      fi
50091
50092      # Use eval to expand a potential ~
50093      eval path="$path"
50094      if test ! -f "$path" && test ! -d "$path"; then
50095        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50096      fi
50097
50098      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50099    fi
50100  fi
50101
50102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50103$as_echo_n "checking for $DLL_NAME... " >&6; }
50104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50105$as_echo "$MSVC_DLL" >&6; }
50106    else
50107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50108$as_echo "incorrect, ignoring" >&6; }
50109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50111    fi
50112  fi
50113
50114    fi
50115  fi
50116
50117  if test "x$MSVC_DLL" = x; then
50118    # Probe: Check in the Boot JDK directory.
50119    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50120
50121  DLL_NAME="$DLL_NAME"
50122  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50123  METHOD="well-known location in Boot JDK"
50124  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50125    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50126$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50127
50128    # Need to check if the found msvcr is correct architecture
50129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50130$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50131    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50133      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50134      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50135      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50136        CORRECT_MSVCR_ARCH="PE32 executable"
50137      else
50138        CORRECT_MSVCR_ARCH="PE32+ executable"
50139      fi
50140    else
50141      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50142        CORRECT_MSVCR_ARCH=386
50143      else
50144        CORRECT_MSVCR_ARCH=x86-64
50145      fi
50146    fi
50147    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50149$as_echo "ok" >&6; }
50150      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50151
50152  # Only process if variable expands to non-empty
50153
50154  if test "x$MSVC_DLL" != x; then
50155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50156
50157  # Input might be given as Windows format, start by converting to
50158  # unix format.
50159  path="$MSVC_DLL"
50160  new_path=`$CYGPATH -u "$path"`
50161
50162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50165  # "foo.exe" is OK but "foo" is an error.
50166  #
50167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50168  # It is also a way to make sure we got the proper file name for the real test later on.
50169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50170  if test "x$test_shortpath" = x; then
50171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50172$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50173    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50174  fi
50175
50176  # Call helper function which possibly converts this using DOS-style short mode.
50177  # If so, the updated path is stored in $new_path.
50178
50179  input_path="$new_path"
50180  # Check if we need to convert this using DOS-style short mode. If the path
50181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50182  # take no chances and rewrite it.
50183  # Note: m4 eats our [], so we need to use [ and ] instead.
50184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50185  if test "x$has_forbidden_chars" != x; then
50186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50190      # Going to short mode and back again did indeed matter. Since short mode is
50191      # case insensitive, let's make it lowercase to improve readability.
50192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50193      # Now convert it back to Unix-style (cygpath)
50194      input_path=`$CYGPATH -u "$shortmode_path"`
50195      new_path="$input_path"
50196    fi
50197  fi
50198
50199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50200  if test "x$test_cygdrive_prefix" = x; then
50201    # As a simple fix, exclude /usr/bin since it's not a real path.
50202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50204      # a path prefixed by /cygdrive for fixpath to work.
50205      new_path="$CYGWIN_ROOT_PATH$input_path"
50206    fi
50207  fi
50208
50209
50210  if test "x$path" != "x$new_path"; then
50211    MSVC_DLL="$new_path"
50212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50213$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50214  fi
50215
50216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50217
50218  path="$MSVC_DLL"
50219  has_colon=`$ECHO $path | $GREP ^.:`
50220  new_path="$path"
50221  if test "x$has_colon" = x; then
50222    # Not in mixed or Windows style, start by that.
50223    new_path=`cmd //c echo $path`
50224  fi
50225
50226
50227  input_path="$new_path"
50228  # Check if we need to convert this using DOS-style short mode. If the path
50229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50230  # take no chances and rewrite it.
50231  # Note: m4 eats our [], so we need to use [ and ] instead.
50232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50233  if test "x$has_forbidden_chars" != x; then
50234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50236  fi
50237
50238
50239  windows_path="$new_path"
50240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50241    unix_path=`$CYGPATH -u "$windows_path"`
50242    new_path="$unix_path"
50243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50245    new_path="$unix_path"
50246  fi
50247
50248  if test "x$path" != "x$new_path"; then
50249    MSVC_DLL="$new_path"
50250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50251$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50252  fi
50253
50254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50256
50257    else
50258      # We're on a unix platform. Hooray! :)
50259      path="$MSVC_DLL"
50260      has_space=`$ECHO "$path" | $GREP " "`
50261      if test "x$has_space" != x; then
50262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50263$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50265      fi
50266
50267      # Use eval to expand a potential ~
50268      eval path="$path"
50269      if test ! -f "$path" && test ! -d "$path"; then
50270        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50271      fi
50272
50273      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50274    fi
50275  fi
50276
50277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50278$as_echo_n "checking for $DLL_NAME... " >&6; }
50279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50280$as_echo "$MSVC_DLL" >&6; }
50281    else
50282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50283$as_echo "incorrect, ignoring" >&6; }
50284      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50285$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50286    fi
50287  fi
50288
50289  fi
50290
50291  if test "x$MSVC_DLL" = x; then
50292    # Probe: Look in the Windows system32 directory
50293    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50294
50295  windows_path="$CYGWIN_SYSTEMROOT"
50296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50297    unix_path=`$CYGPATH -u "$windows_path"`
50298    CYGWIN_SYSTEMROOT="$unix_path"
50299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50301    CYGWIN_SYSTEMROOT="$unix_path"
50302  fi
50303
50304    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50305
50306  DLL_NAME="$DLL_NAME"
50307  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50308  METHOD="well-known location in SYSTEMROOT"
50309  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50310    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50311$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50312
50313    # Need to check if the found msvcr is correct architecture
50314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50315$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50316    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50318      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50319      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50320      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50321        CORRECT_MSVCR_ARCH="PE32 executable"
50322      else
50323        CORRECT_MSVCR_ARCH="PE32+ executable"
50324      fi
50325    else
50326      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50327        CORRECT_MSVCR_ARCH=386
50328      else
50329        CORRECT_MSVCR_ARCH=x86-64
50330      fi
50331    fi
50332    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50334$as_echo "ok" >&6; }
50335      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50336
50337  # Only process if variable expands to non-empty
50338
50339  if test "x$MSVC_DLL" != x; then
50340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50341
50342  # Input might be given as Windows format, start by converting to
50343  # unix format.
50344  path="$MSVC_DLL"
50345  new_path=`$CYGPATH -u "$path"`
50346
50347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50350  # "foo.exe" is OK but "foo" is an error.
50351  #
50352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50353  # It is also a way to make sure we got the proper file name for the real test later on.
50354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50355  if test "x$test_shortpath" = x; then
50356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50357$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50358    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50359  fi
50360
50361  # Call helper function which possibly converts this using DOS-style short mode.
50362  # If so, the updated path is stored in $new_path.
50363
50364  input_path="$new_path"
50365  # Check if we need to convert this using DOS-style short mode. If the path
50366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50367  # take no chances and rewrite it.
50368  # Note: m4 eats our [], so we need to use [ and ] instead.
50369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50370  if test "x$has_forbidden_chars" != x; then
50371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50375      # Going to short mode and back again did indeed matter. Since short mode is
50376      # case insensitive, let's make it lowercase to improve readability.
50377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50378      # Now convert it back to Unix-style (cygpath)
50379      input_path=`$CYGPATH -u "$shortmode_path"`
50380      new_path="$input_path"
50381    fi
50382  fi
50383
50384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50385  if test "x$test_cygdrive_prefix" = x; then
50386    # As a simple fix, exclude /usr/bin since it's not a real path.
50387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50389      # a path prefixed by /cygdrive for fixpath to work.
50390      new_path="$CYGWIN_ROOT_PATH$input_path"
50391    fi
50392  fi
50393
50394
50395  if test "x$path" != "x$new_path"; then
50396    MSVC_DLL="$new_path"
50397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50398$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50399  fi
50400
50401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50402
50403  path="$MSVC_DLL"
50404  has_colon=`$ECHO $path | $GREP ^.:`
50405  new_path="$path"
50406  if test "x$has_colon" = x; then
50407    # Not in mixed or Windows style, start by that.
50408    new_path=`cmd //c echo $path`
50409  fi
50410
50411
50412  input_path="$new_path"
50413  # Check if we need to convert this using DOS-style short mode. If the path
50414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50415  # take no chances and rewrite it.
50416  # Note: m4 eats our [], so we need to use [ and ] instead.
50417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50418  if test "x$has_forbidden_chars" != x; then
50419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50421  fi
50422
50423
50424  windows_path="$new_path"
50425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50426    unix_path=`$CYGPATH -u "$windows_path"`
50427    new_path="$unix_path"
50428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50430    new_path="$unix_path"
50431  fi
50432
50433  if test "x$path" != "x$new_path"; then
50434    MSVC_DLL="$new_path"
50435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50436$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50437  fi
50438
50439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50441
50442    else
50443      # We're on a unix platform. Hooray! :)
50444      path="$MSVC_DLL"
50445      has_space=`$ECHO "$path" | $GREP " "`
50446      if test "x$has_space" != x; then
50447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50448$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50450      fi
50451
50452      # Use eval to expand a potential ~
50453      eval path="$path"
50454      if test ! -f "$path" && test ! -d "$path"; then
50455        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50456      fi
50457
50458      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50459    fi
50460  fi
50461
50462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50463$as_echo_n "checking for $DLL_NAME... " >&6; }
50464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50465$as_echo "$MSVC_DLL" >&6; }
50466    else
50467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50468$as_echo "incorrect, ignoring" >&6; }
50469      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50470$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50471    fi
50472  fi
50473
50474  fi
50475
50476  if test "x$MSVC_DLL" = x; then
50477    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50478    if test "x$VS100COMNTOOLS" != x; then
50479      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50480
50481  windows_path="$CYGWIN_VS_TOOLS_DIR"
50482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50483    unix_path=`$CYGPATH -u "$windows_path"`
50484    CYGWIN_VS_TOOLS_DIR="$unix_path"
50485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50487    CYGWIN_VS_TOOLS_DIR="$unix_path"
50488  fi
50489
50490      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50491        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50492	    | $GREP -i /x64/ | $HEAD --lines 1`
50493      else
50494        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50495	    | $GREP -i /x86/ | $HEAD --lines 1`
50496      fi
50497
50498  DLL_NAME="$DLL_NAME"
50499  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50500  METHOD="search of VS100COMNTOOLS"
50501  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50502    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50503$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50504
50505    # Need to check if the found msvcr is correct architecture
50506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50507$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50508    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50510      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50511      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50512      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50513        CORRECT_MSVCR_ARCH="PE32 executable"
50514      else
50515        CORRECT_MSVCR_ARCH="PE32+ executable"
50516      fi
50517    else
50518      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50519        CORRECT_MSVCR_ARCH=386
50520      else
50521        CORRECT_MSVCR_ARCH=x86-64
50522      fi
50523    fi
50524    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50526$as_echo "ok" >&6; }
50527      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50528
50529  # Only process if variable expands to non-empty
50530
50531  if test "x$MSVC_DLL" != x; then
50532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50533
50534  # Input might be given as Windows format, start by converting to
50535  # unix format.
50536  path="$MSVC_DLL"
50537  new_path=`$CYGPATH -u "$path"`
50538
50539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50542  # "foo.exe" is OK but "foo" is an error.
50543  #
50544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50545  # It is also a way to make sure we got the proper file name for the real test later on.
50546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50547  if test "x$test_shortpath" = x; then
50548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50549$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50550    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50551  fi
50552
50553  # Call helper function which possibly converts this using DOS-style short mode.
50554  # If so, the updated path is stored in $new_path.
50555
50556  input_path="$new_path"
50557  # Check if we need to convert this using DOS-style short mode. If the path
50558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50559  # take no chances and rewrite it.
50560  # Note: m4 eats our [], so we need to use [ and ] instead.
50561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50562  if test "x$has_forbidden_chars" != x; then
50563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50567      # Going to short mode and back again did indeed matter. Since short mode is
50568      # case insensitive, let's make it lowercase to improve readability.
50569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50570      # Now convert it back to Unix-style (cygpath)
50571      input_path=`$CYGPATH -u "$shortmode_path"`
50572      new_path="$input_path"
50573    fi
50574  fi
50575
50576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50577  if test "x$test_cygdrive_prefix" = x; then
50578    # As a simple fix, exclude /usr/bin since it's not a real path.
50579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50581      # a path prefixed by /cygdrive for fixpath to work.
50582      new_path="$CYGWIN_ROOT_PATH$input_path"
50583    fi
50584  fi
50585
50586
50587  if test "x$path" != "x$new_path"; then
50588    MSVC_DLL="$new_path"
50589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50590$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50591  fi
50592
50593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50594
50595  path="$MSVC_DLL"
50596  has_colon=`$ECHO $path | $GREP ^.:`
50597  new_path="$path"
50598  if test "x$has_colon" = x; then
50599    # Not in mixed or Windows style, start by that.
50600    new_path=`cmd //c echo $path`
50601  fi
50602
50603
50604  input_path="$new_path"
50605  # Check if we need to convert this using DOS-style short mode. If the path
50606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50607  # take no chances and rewrite it.
50608  # Note: m4 eats our [], so we need to use [ and ] instead.
50609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50610  if test "x$has_forbidden_chars" != x; then
50611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50613  fi
50614
50615
50616  windows_path="$new_path"
50617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50618    unix_path=`$CYGPATH -u "$windows_path"`
50619    new_path="$unix_path"
50620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50622    new_path="$unix_path"
50623  fi
50624
50625  if test "x$path" != "x$new_path"; then
50626    MSVC_DLL="$new_path"
50627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50628$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50629  fi
50630
50631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50633
50634    else
50635      # We're on a unix platform. Hooray! :)
50636      path="$MSVC_DLL"
50637      has_space=`$ECHO "$path" | $GREP " "`
50638      if test "x$has_space" != x; then
50639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50640$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50642      fi
50643
50644      # Use eval to expand a potential ~
50645      eval path="$path"
50646      if test ! -f "$path" && test ! -d "$path"; then
50647        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50648      fi
50649
50650      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50651    fi
50652  fi
50653
50654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50655$as_echo_n "checking for $DLL_NAME... " >&6; }
50656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50657$as_echo "$MSVC_DLL" >&6; }
50658    else
50659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50660$as_echo "incorrect, ignoring" >&6; }
50661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50662$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50663    fi
50664  fi
50665
50666    fi
50667  fi
50668
50669  if test "x$MSVC_DLL" = x; then
50670    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50671    # (This was the original behaviour; kept since it might turn something up)
50672    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50673      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50674        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50675	    | $GREP x64 | $HEAD --lines 1`
50676      else
50677        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50678	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50679        if test "x$POSSIBLE_MSVC_DLL" = x; then
50680          # We're grasping at straws now...
50681          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50682	      | $HEAD --lines 1`
50683        fi
50684      fi
50685
50686
50687  DLL_NAME="$DLL_NAME"
50688  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50689  METHOD="search of VCINSTALLDIR"
50690  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50692$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50693
50694    # Need to check if the found msvcr is correct architecture
50695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50696$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50697    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50699      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50700      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50701      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50702        CORRECT_MSVCR_ARCH="PE32 executable"
50703      else
50704        CORRECT_MSVCR_ARCH="PE32+ executable"
50705      fi
50706    else
50707      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50708        CORRECT_MSVCR_ARCH=386
50709      else
50710        CORRECT_MSVCR_ARCH=x86-64
50711      fi
50712    fi
50713    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50715$as_echo "ok" >&6; }
50716      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50717
50718  # Only process if variable expands to non-empty
50719
50720  if test "x$MSVC_DLL" != x; then
50721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50722
50723  # Input might be given as Windows format, start by converting to
50724  # unix format.
50725  path="$MSVC_DLL"
50726  new_path=`$CYGPATH -u "$path"`
50727
50728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50731  # "foo.exe" is OK but "foo" is an error.
50732  #
50733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50734  # It is also a way to make sure we got the proper file name for the real test later on.
50735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50736  if test "x$test_shortpath" = x; then
50737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50738$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50739    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50740  fi
50741
50742  # Call helper function which possibly converts this using DOS-style short mode.
50743  # If so, the updated path is stored in $new_path.
50744
50745  input_path="$new_path"
50746  # Check if we need to convert this using DOS-style short mode. If the path
50747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50748  # take no chances and rewrite it.
50749  # Note: m4 eats our [], so we need to use [ and ] instead.
50750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50751  if test "x$has_forbidden_chars" != x; then
50752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50756      # Going to short mode and back again did indeed matter. Since short mode is
50757      # case insensitive, let's make it lowercase to improve readability.
50758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50759      # Now convert it back to Unix-style (cygpath)
50760      input_path=`$CYGPATH -u "$shortmode_path"`
50761      new_path="$input_path"
50762    fi
50763  fi
50764
50765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50766  if test "x$test_cygdrive_prefix" = x; then
50767    # As a simple fix, exclude /usr/bin since it's not a real path.
50768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50770      # a path prefixed by /cygdrive for fixpath to work.
50771      new_path="$CYGWIN_ROOT_PATH$input_path"
50772    fi
50773  fi
50774
50775
50776  if test "x$path" != "x$new_path"; then
50777    MSVC_DLL="$new_path"
50778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50779$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50780  fi
50781
50782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50783
50784  path="$MSVC_DLL"
50785  has_colon=`$ECHO $path | $GREP ^.:`
50786  new_path="$path"
50787  if test "x$has_colon" = x; then
50788    # Not in mixed or Windows style, start by that.
50789    new_path=`cmd //c echo $path`
50790  fi
50791
50792
50793  input_path="$new_path"
50794  # Check if we need to convert this using DOS-style short mode. If the path
50795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50796  # take no chances and rewrite it.
50797  # Note: m4 eats our [], so we need to use [ and ] instead.
50798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50799  if test "x$has_forbidden_chars" != x; then
50800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50802  fi
50803
50804
50805  windows_path="$new_path"
50806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50807    unix_path=`$CYGPATH -u "$windows_path"`
50808    new_path="$unix_path"
50809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50811    new_path="$unix_path"
50812  fi
50813
50814  if test "x$path" != "x$new_path"; then
50815    MSVC_DLL="$new_path"
50816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50818  fi
50819
50820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50822
50823    else
50824      # We're on a unix platform. Hooray! :)
50825      path="$MSVC_DLL"
50826      has_space=`$ECHO "$path" | $GREP " "`
50827      if test "x$has_space" != x; then
50828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50831      fi
50832
50833      # Use eval to expand a potential ~
50834      eval path="$path"
50835      if test ! -f "$path" && test ! -d "$path"; then
50836        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50837      fi
50838
50839      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50840    fi
50841  fi
50842
50843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50844$as_echo_n "checking for $DLL_NAME... " >&6; }
50845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50846$as_echo "$MSVC_DLL" >&6; }
50847    else
50848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50849$as_echo "incorrect, ignoring" >&6; }
50850      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50851$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50852    fi
50853  fi
50854
50855    fi
50856  fi
50857
50858  if test "x$MSVC_DLL" = x; then
50859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50860$as_echo_n "checking for $DLL_NAME... " >&6; }
50861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50862$as_echo "no" >&6; }
50863    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50864  fi
50865
50866    MSVCR_DLL="$MSVC_DLL"
50867  fi
50868
50869
50870
50871# Check whether --with-msvcp-dll was given.
50872if test "${with_msvcp_dll+set}" = set; then :
50873  withval=$with_msvcp_dll;
50874fi
50875
50876
50877  if test "x$MSVCP_NAME" != "x"; then
50878    if test "x$with_msvcp_dll" != x; then
50879      # If given explicitely by user, do not probe. If not present, fail directly.
50880
50881  DLL_NAME="$MSVCP_NAME"
50882  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50883  METHOD="--with-msvcp-dll"
50884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50887
50888    # Need to check if the found msvcr is correct architecture
50889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50896        CORRECT_MSVCR_ARCH="PE32 executable"
50897      else
50898        CORRECT_MSVCR_ARCH="PE32+ executable"
50899      fi
50900    else
50901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50902        CORRECT_MSVCR_ARCH=386
50903      else
50904        CORRECT_MSVCR_ARCH=x86-64
50905      fi
50906    fi
50907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50909$as_echo "ok" >&6; }
50910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50911
50912  # Only process if variable expands to non-empty
50913
50914  if test "x$MSVC_DLL" != x; then
50915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50916
50917  # Input might be given as Windows format, start by converting to
50918  # unix format.
50919  path="$MSVC_DLL"
50920  new_path=`$CYGPATH -u "$path"`
50921
50922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50925  # "foo.exe" is OK but "foo" is an error.
50926  #
50927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50928  # It is also a way to make sure we got the proper file name for the real test later on.
50929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50930  if test "x$test_shortpath" = x; then
50931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50934  fi
50935
50936  # Call helper function which possibly converts this using DOS-style short mode.
50937  # If so, the updated path is stored in $new_path.
50938
50939  input_path="$new_path"
50940  # Check if we need to convert this using DOS-style short mode. If the path
50941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50942  # take no chances and rewrite it.
50943  # Note: m4 eats our [], so we need to use [ and ] instead.
50944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50945  if test "x$has_forbidden_chars" != x; then
50946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50950      # Going to short mode and back again did indeed matter. Since short mode is
50951      # case insensitive, let's make it lowercase to improve readability.
50952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50953      # Now convert it back to Unix-style (cygpath)
50954      input_path=`$CYGPATH -u "$shortmode_path"`
50955      new_path="$input_path"
50956    fi
50957  fi
50958
50959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50960  if test "x$test_cygdrive_prefix" = x; then
50961    # As a simple fix, exclude /usr/bin since it's not a real path.
50962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50964      # a path prefixed by /cygdrive for fixpath to work.
50965      new_path="$CYGWIN_ROOT_PATH$input_path"
50966    fi
50967  fi
50968
50969
50970  if test "x$path" != "x$new_path"; then
50971    MSVC_DLL="$new_path"
50972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50974  fi
50975
50976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50977
50978  path="$MSVC_DLL"
50979  has_colon=`$ECHO $path | $GREP ^.:`
50980  new_path="$path"
50981  if test "x$has_colon" = x; then
50982    # Not in mixed or Windows style, start by that.
50983    new_path=`cmd //c echo $path`
50984  fi
50985
50986
50987  input_path="$new_path"
50988  # Check if we need to convert this using DOS-style short mode. If the path
50989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50990  # take no chances and rewrite it.
50991  # Note: m4 eats our [], so we need to use [ and ] instead.
50992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50993  if test "x$has_forbidden_chars" != x; then
50994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50996  fi
50997
50998
50999  windows_path="$new_path"
51000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51001    unix_path=`$CYGPATH -u "$windows_path"`
51002    new_path="$unix_path"
51003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51005    new_path="$unix_path"
51006  fi
51007
51008  if test "x$path" != "x$new_path"; then
51009    MSVC_DLL="$new_path"
51010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51012  fi
51013
51014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51016
51017    else
51018      # We're on a unix platform. Hooray! :)
51019      path="$MSVC_DLL"
51020      has_space=`$ECHO "$path" | $GREP " "`
51021      if test "x$has_space" != x; then
51022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51025      fi
51026
51027      # Use eval to expand a potential ~
51028      eval path="$path"
51029      if test ! -f "$path" && test ! -d "$path"; then
51030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51031      fi
51032
51033      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51034    fi
51035  fi
51036
51037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51038$as_echo_n "checking for $DLL_NAME... " >&6; }
51039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51040$as_echo "$MSVC_DLL" >&6; }
51041    else
51042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51043$as_echo "incorrect, ignoring" >&6; }
51044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51046    fi
51047  fi
51048
51049      if test "x$MSVC_DLL" = x; then
51050        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51051      fi
51052      MSVCP_DLL="$MSVC_DLL"
51053    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51054
51055  DLL_NAME="$MSVCP_NAME"
51056  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51057  METHOD="devkit"
51058  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51060$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51061
51062    # Need to check if the found msvcr is correct architecture
51063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51064$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51065    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51067      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51068      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51069      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51070        CORRECT_MSVCR_ARCH="PE32 executable"
51071      else
51072        CORRECT_MSVCR_ARCH="PE32+ executable"
51073      fi
51074    else
51075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51076        CORRECT_MSVCR_ARCH=386
51077      else
51078        CORRECT_MSVCR_ARCH=x86-64
51079      fi
51080    fi
51081    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51083$as_echo "ok" >&6; }
51084      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51085
51086  # Only process if variable expands to non-empty
51087
51088  if test "x$MSVC_DLL" != x; then
51089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51090
51091  # Input might be given as Windows format, start by converting to
51092  # unix format.
51093  path="$MSVC_DLL"
51094  new_path=`$CYGPATH -u "$path"`
51095
51096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51099  # "foo.exe" is OK but "foo" is an error.
51100  #
51101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51102  # It is also a way to make sure we got the proper file name for the real test later on.
51103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51104  if test "x$test_shortpath" = x; then
51105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51107    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51108  fi
51109
51110  # Call helper function which possibly converts this using DOS-style short mode.
51111  # If so, the updated path is stored in $new_path.
51112
51113  input_path="$new_path"
51114  # Check if we need to convert this using DOS-style short mode. If the path
51115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51116  # take no chances and rewrite it.
51117  # Note: m4 eats our [], so we need to use [ and ] instead.
51118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51119  if test "x$has_forbidden_chars" != x; then
51120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51124      # Going to short mode and back again did indeed matter. Since short mode is
51125      # case insensitive, let's make it lowercase to improve readability.
51126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51127      # Now convert it back to Unix-style (cygpath)
51128      input_path=`$CYGPATH -u "$shortmode_path"`
51129      new_path="$input_path"
51130    fi
51131  fi
51132
51133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51134  if test "x$test_cygdrive_prefix" = x; then
51135    # As a simple fix, exclude /usr/bin since it's not a real path.
51136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51138      # a path prefixed by /cygdrive for fixpath to work.
51139      new_path="$CYGWIN_ROOT_PATH$input_path"
51140    fi
51141  fi
51142
51143
51144  if test "x$path" != "x$new_path"; then
51145    MSVC_DLL="$new_path"
51146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51147$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51148  fi
51149
51150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51151
51152  path="$MSVC_DLL"
51153  has_colon=`$ECHO $path | $GREP ^.:`
51154  new_path="$path"
51155  if test "x$has_colon" = x; then
51156    # Not in mixed or Windows style, start by that.
51157    new_path=`cmd //c echo $path`
51158  fi
51159
51160
51161  input_path="$new_path"
51162  # Check if we need to convert this using DOS-style short mode. If the path
51163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51164  # take no chances and rewrite it.
51165  # Note: m4 eats our [], so we need to use [ and ] instead.
51166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51167  if test "x$has_forbidden_chars" != x; then
51168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51170  fi
51171
51172
51173  windows_path="$new_path"
51174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51175    unix_path=`$CYGPATH -u "$windows_path"`
51176    new_path="$unix_path"
51177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51179    new_path="$unix_path"
51180  fi
51181
51182  if test "x$path" != "x$new_path"; then
51183    MSVC_DLL="$new_path"
51184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51185$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51186  fi
51187
51188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51190
51191    else
51192      # We're on a unix platform. Hooray! :)
51193      path="$MSVC_DLL"
51194      has_space=`$ECHO "$path" | $GREP " "`
51195      if test "x$has_space" != x; then
51196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51197$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51199      fi
51200
51201      # Use eval to expand a potential ~
51202      eval path="$path"
51203      if test ! -f "$path" && test ! -d "$path"; then
51204        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51205      fi
51206
51207      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51208    fi
51209  fi
51210
51211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51212$as_echo_n "checking for $DLL_NAME... " >&6; }
51213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51214$as_echo "$MSVC_DLL" >&6; }
51215    else
51216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51217$as_echo "incorrect, ignoring" >&6; }
51218      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51219$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51220    fi
51221  fi
51222
51223      if test "x$MSVC_DLL" = x; then
51224        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51225      fi
51226      MSVCP_DLL="$MSVC_DLL"
51227    else
51228
51229  DLL_NAME="${MSVCP_NAME}"
51230  MSVC_DLL=
51231
51232  if test "x$MSVC_DLL" = x; then
51233    # Probe: Using well-known location from Visual Studio 10.0
51234    if test "x$VCINSTALLDIR" != x; then
51235      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51236
51237  windows_path="$CYGWIN_VC_INSTALL_DIR"
51238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51239    unix_path=`$CYGPATH -u "$windows_path"`
51240    CYGWIN_VC_INSTALL_DIR="$unix_path"
51241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51243    CYGWIN_VC_INSTALL_DIR="$unix_path"
51244  fi
51245
51246      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51247        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51248      else
51249        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51250      fi
51251      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51252
51253  DLL_NAME="$DLL_NAME"
51254  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51255  METHOD="well-known location in VCINSTALLDIR"
51256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51259
51260    # Need to check if the found msvcr is correct architecture
51261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51268        CORRECT_MSVCR_ARCH="PE32 executable"
51269      else
51270        CORRECT_MSVCR_ARCH="PE32+ executable"
51271      fi
51272    else
51273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51274        CORRECT_MSVCR_ARCH=386
51275      else
51276        CORRECT_MSVCR_ARCH=x86-64
51277      fi
51278    fi
51279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51281$as_echo "ok" >&6; }
51282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51283
51284  # Only process if variable expands to non-empty
51285
51286  if test "x$MSVC_DLL" != x; then
51287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51288
51289  # Input might be given as Windows format, start by converting to
51290  # unix format.
51291  path="$MSVC_DLL"
51292  new_path=`$CYGPATH -u "$path"`
51293
51294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51297  # "foo.exe" is OK but "foo" is an error.
51298  #
51299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51300  # It is also a way to make sure we got the proper file name for the real test later on.
51301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51302  if test "x$test_shortpath" = x; then
51303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51306  fi
51307
51308  # Call helper function which possibly converts this using DOS-style short mode.
51309  # If so, the updated path is stored in $new_path.
51310
51311  input_path="$new_path"
51312  # Check if we need to convert this using DOS-style short mode. If the path
51313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51314  # take no chances and rewrite it.
51315  # Note: m4 eats our [], so we need to use [ and ] instead.
51316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51317  if test "x$has_forbidden_chars" != x; then
51318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51322      # Going to short mode and back again did indeed matter. Since short mode is
51323      # case insensitive, let's make it lowercase to improve readability.
51324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51325      # Now convert it back to Unix-style (cygpath)
51326      input_path=`$CYGPATH -u "$shortmode_path"`
51327      new_path="$input_path"
51328    fi
51329  fi
51330
51331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51332  if test "x$test_cygdrive_prefix" = x; then
51333    # As a simple fix, exclude /usr/bin since it's not a real path.
51334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51336      # a path prefixed by /cygdrive for fixpath to work.
51337      new_path="$CYGWIN_ROOT_PATH$input_path"
51338    fi
51339  fi
51340
51341
51342  if test "x$path" != "x$new_path"; then
51343    MSVC_DLL="$new_path"
51344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51346  fi
51347
51348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51349
51350  path="$MSVC_DLL"
51351  has_colon=`$ECHO $path | $GREP ^.:`
51352  new_path="$path"
51353  if test "x$has_colon" = x; then
51354    # Not in mixed or Windows style, start by that.
51355    new_path=`cmd //c echo $path`
51356  fi
51357
51358
51359  input_path="$new_path"
51360  # Check if we need to convert this using DOS-style short mode. If the path
51361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51362  # take no chances and rewrite it.
51363  # Note: m4 eats our [], so we need to use [ and ] instead.
51364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51365  if test "x$has_forbidden_chars" != x; then
51366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51368  fi
51369
51370
51371  windows_path="$new_path"
51372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51373    unix_path=`$CYGPATH -u "$windows_path"`
51374    new_path="$unix_path"
51375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51377    new_path="$unix_path"
51378  fi
51379
51380  if test "x$path" != "x$new_path"; then
51381    MSVC_DLL="$new_path"
51382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51384  fi
51385
51386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51388
51389    else
51390      # We're on a unix platform. Hooray! :)
51391      path="$MSVC_DLL"
51392      has_space=`$ECHO "$path" | $GREP " "`
51393      if test "x$has_space" != x; then
51394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51397      fi
51398
51399      # Use eval to expand a potential ~
51400      eval path="$path"
51401      if test ! -f "$path" && test ! -d "$path"; then
51402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51403      fi
51404
51405      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51406    fi
51407  fi
51408
51409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51410$as_echo_n "checking for $DLL_NAME... " >&6; }
51411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51412$as_echo "$MSVC_DLL" >&6; }
51413    else
51414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51415$as_echo "incorrect, ignoring" >&6; }
51416      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51417$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51418    fi
51419  fi
51420
51421    fi
51422  fi
51423
51424  if test "x$MSVC_DLL" = x; then
51425    # Probe: Check in the Boot JDK directory.
51426    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51427
51428  DLL_NAME="$DLL_NAME"
51429  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51430  METHOD="well-known location in Boot JDK"
51431  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51433$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51434
51435    # Need to check if the found msvcr is correct architecture
51436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51437$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51438    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51440      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51441      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51442      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51443        CORRECT_MSVCR_ARCH="PE32 executable"
51444      else
51445        CORRECT_MSVCR_ARCH="PE32+ executable"
51446      fi
51447    else
51448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51449        CORRECT_MSVCR_ARCH=386
51450      else
51451        CORRECT_MSVCR_ARCH=x86-64
51452      fi
51453    fi
51454    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51456$as_echo "ok" >&6; }
51457      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51458
51459  # Only process if variable expands to non-empty
51460
51461  if test "x$MSVC_DLL" != x; then
51462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51463
51464  # Input might be given as Windows format, start by converting to
51465  # unix format.
51466  path="$MSVC_DLL"
51467  new_path=`$CYGPATH -u "$path"`
51468
51469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51472  # "foo.exe" is OK but "foo" is an error.
51473  #
51474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51475  # It is also a way to make sure we got the proper file name for the real test later on.
51476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51477  if test "x$test_shortpath" = x; then
51478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51479$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51480    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51481  fi
51482
51483  # Call helper function which possibly converts this using DOS-style short mode.
51484  # If so, the updated path is stored in $new_path.
51485
51486  input_path="$new_path"
51487  # Check if we need to convert this using DOS-style short mode. If the path
51488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51489  # take no chances and rewrite it.
51490  # Note: m4 eats our [], so we need to use [ and ] instead.
51491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51492  if test "x$has_forbidden_chars" != x; then
51493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51497      # Going to short mode and back again did indeed matter. Since short mode is
51498      # case insensitive, let's make it lowercase to improve readability.
51499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51500      # Now convert it back to Unix-style (cygpath)
51501      input_path=`$CYGPATH -u "$shortmode_path"`
51502      new_path="$input_path"
51503    fi
51504  fi
51505
51506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51507  if test "x$test_cygdrive_prefix" = x; then
51508    # As a simple fix, exclude /usr/bin since it's not a real path.
51509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51511      # a path prefixed by /cygdrive for fixpath to work.
51512      new_path="$CYGWIN_ROOT_PATH$input_path"
51513    fi
51514  fi
51515
51516
51517  if test "x$path" != "x$new_path"; then
51518    MSVC_DLL="$new_path"
51519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51520$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51521  fi
51522
51523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51524
51525  path="$MSVC_DLL"
51526  has_colon=`$ECHO $path | $GREP ^.:`
51527  new_path="$path"
51528  if test "x$has_colon" = x; then
51529    # Not in mixed or Windows style, start by that.
51530    new_path=`cmd //c echo $path`
51531  fi
51532
51533
51534  input_path="$new_path"
51535  # Check if we need to convert this using DOS-style short mode. If the path
51536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51537  # take no chances and rewrite it.
51538  # Note: m4 eats our [], so we need to use [ and ] instead.
51539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51540  if test "x$has_forbidden_chars" != x; then
51541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51543  fi
51544
51545
51546  windows_path="$new_path"
51547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51548    unix_path=`$CYGPATH -u "$windows_path"`
51549    new_path="$unix_path"
51550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51552    new_path="$unix_path"
51553  fi
51554
51555  if test "x$path" != "x$new_path"; then
51556    MSVC_DLL="$new_path"
51557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51558$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51559  fi
51560
51561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51563
51564    else
51565      # We're on a unix platform. Hooray! :)
51566      path="$MSVC_DLL"
51567      has_space=`$ECHO "$path" | $GREP " "`
51568      if test "x$has_space" != x; then
51569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51570$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51572      fi
51573
51574      # Use eval to expand a potential ~
51575      eval path="$path"
51576      if test ! -f "$path" && test ! -d "$path"; then
51577        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51578      fi
51579
51580      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51581    fi
51582  fi
51583
51584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51585$as_echo_n "checking for $DLL_NAME... " >&6; }
51586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51587$as_echo "$MSVC_DLL" >&6; }
51588    else
51589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51590$as_echo "incorrect, ignoring" >&6; }
51591      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51592$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51593    fi
51594  fi
51595
51596  fi
51597
51598  if test "x$MSVC_DLL" = x; then
51599    # Probe: Look in the Windows system32 directory
51600    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51601
51602  windows_path="$CYGWIN_SYSTEMROOT"
51603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51604    unix_path=`$CYGPATH -u "$windows_path"`
51605    CYGWIN_SYSTEMROOT="$unix_path"
51606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51608    CYGWIN_SYSTEMROOT="$unix_path"
51609  fi
51610
51611    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51612
51613  DLL_NAME="$DLL_NAME"
51614  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51615  METHOD="well-known location in SYSTEMROOT"
51616  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51618$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51619
51620    # Need to check if the found msvcr is correct architecture
51621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51622$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51623    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51625      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51626      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51627      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51628        CORRECT_MSVCR_ARCH="PE32 executable"
51629      else
51630        CORRECT_MSVCR_ARCH="PE32+ executable"
51631      fi
51632    else
51633      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51634        CORRECT_MSVCR_ARCH=386
51635      else
51636        CORRECT_MSVCR_ARCH=x86-64
51637      fi
51638    fi
51639    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51641$as_echo "ok" >&6; }
51642      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51643
51644  # Only process if variable expands to non-empty
51645
51646  if test "x$MSVC_DLL" != x; then
51647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51648
51649  # Input might be given as Windows format, start by converting to
51650  # unix format.
51651  path="$MSVC_DLL"
51652  new_path=`$CYGPATH -u "$path"`
51653
51654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51657  # "foo.exe" is OK but "foo" is an error.
51658  #
51659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51660  # It is also a way to make sure we got the proper file name for the real test later on.
51661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51662  if test "x$test_shortpath" = x; then
51663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51664$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51665    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51666  fi
51667
51668  # Call helper function which possibly converts this using DOS-style short mode.
51669  # If so, the updated path is stored in $new_path.
51670
51671  input_path="$new_path"
51672  # Check if we need to convert this using DOS-style short mode. If the path
51673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51674  # take no chances and rewrite it.
51675  # Note: m4 eats our [], so we need to use [ and ] instead.
51676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51677  if test "x$has_forbidden_chars" != x; then
51678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51682      # Going to short mode and back again did indeed matter. Since short mode is
51683      # case insensitive, let's make it lowercase to improve readability.
51684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51685      # Now convert it back to Unix-style (cygpath)
51686      input_path=`$CYGPATH -u "$shortmode_path"`
51687      new_path="$input_path"
51688    fi
51689  fi
51690
51691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51692  if test "x$test_cygdrive_prefix" = x; then
51693    # As a simple fix, exclude /usr/bin since it's not a real path.
51694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51696      # a path prefixed by /cygdrive for fixpath to work.
51697      new_path="$CYGWIN_ROOT_PATH$input_path"
51698    fi
51699  fi
51700
51701
51702  if test "x$path" != "x$new_path"; then
51703    MSVC_DLL="$new_path"
51704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51705$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51706  fi
51707
51708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51709
51710  path="$MSVC_DLL"
51711  has_colon=`$ECHO $path | $GREP ^.:`
51712  new_path="$path"
51713  if test "x$has_colon" = x; then
51714    # Not in mixed or Windows style, start by that.
51715    new_path=`cmd //c echo $path`
51716  fi
51717
51718
51719  input_path="$new_path"
51720  # Check if we need to convert this using DOS-style short mode. If the path
51721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51722  # take no chances and rewrite it.
51723  # Note: m4 eats our [], so we need to use [ and ] instead.
51724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51725  if test "x$has_forbidden_chars" != x; then
51726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51728  fi
51729
51730
51731  windows_path="$new_path"
51732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51733    unix_path=`$CYGPATH -u "$windows_path"`
51734    new_path="$unix_path"
51735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51737    new_path="$unix_path"
51738  fi
51739
51740  if test "x$path" != "x$new_path"; then
51741    MSVC_DLL="$new_path"
51742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51743$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51744  fi
51745
51746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51748
51749    else
51750      # We're on a unix platform. Hooray! :)
51751      path="$MSVC_DLL"
51752      has_space=`$ECHO "$path" | $GREP " "`
51753      if test "x$has_space" != x; then
51754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51755$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51757      fi
51758
51759      # Use eval to expand a potential ~
51760      eval path="$path"
51761      if test ! -f "$path" && test ! -d "$path"; then
51762        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51763      fi
51764
51765      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51766    fi
51767  fi
51768
51769      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51770$as_echo_n "checking for $DLL_NAME... " >&6; }
51771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51772$as_echo "$MSVC_DLL" >&6; }
51773    else
51774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51775$as_echo "incorrect, ignoring" >&6; }
51776      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51777$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51778    fi
51779  fi
51780
51781  fi
51782
51783  if test "x$MSVC_DLL" = x; then
51784    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51785    if test "x$VS100COMNTOOLS" != x; then
51786      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51787
51788  windows_path="$CYGWIN_VS_TOOLS_DIR"
51789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51790    unix_path=`$CYGPATH -u "$windows_path"`
51791    CYGWIN_VS_TOOLS_DIR="$unix_path"
51792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51794    CYGWIN_VS_TOOLS_DIR="$unix_path"
51795  fi
51796
51797      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51798        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51799	    | $GREP -i /x64/ | $HEAD --lines 1`
51800      else
51801        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51802	    | $GREP -i /x86/ | $HEAD --lines 1`
51803      fi
51804
51805  DLL_NAME="$DLL_NAME"
51806  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51807  METHOD="search of VS100COMNTOOLS"
51808  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51809    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51810$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51811
51812    # Need to check if the found msvcr is correct architecture
51813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51814$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51815    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51817      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51818      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51819      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51820        CORRECT_MSVCR_ARCH="PE32 executable"
51821      else
51822        CORRECT_MSVCR_ARCH="PE32+ executable"
51823      fi
51824    else
51825      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51826        CORRECT_MSVCR_ARCH=386
51827      else
51828        CORRECT_MSVCR_ARCH=x86-64
51829      fi
51830    fi
51831    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51833$as_echo "ok" >&6; }
51834      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51835
51836  # Only process if variable expands to non-empty
51837
51838  if test "x$MSVC_DLL" != x; then
51839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51840
51841  # Input might be given as Windows format, start by converting to
51842  # unix format.
51843  path="$MSVC_DLL"
51844  new_path=`$CYGPATH -u "$path"`
51845
51846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51849  # "foo.exe" is OK but "foo" is an error.
51850  #
51851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51852  # It is also a way to make sure we got the proper file name for the real test later on.
51853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51854  if test "x$test_shortpath" = x; then
51855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51856$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51857    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51858  fi
51859
51860  # Call helper function which possibly converts this using DOS-style short mode.
51861  # If so, the updated path is stored in $new_path.
51862
51863  input_path="$new_path"
51864  # Check if we need to convert this using DOS-style short mode. If the path
51865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51866  # take no chances and rewrite it.
51867  # Note: m4 eats our [], so we need to use [ and ] instead.
51868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51869  if test "x$has_forbidden_chars" != x; then
51870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51874      # Going to short mode and back again did indeed matter. Since short mode is
51875      # case insensitive, let's make it lowercase to improve readability.
51876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51877      # Now convert it back to Unix-style (cygpath)
51878      input_path=`$CYGPATH -u "$shortmode_path"`
51879      new_path="$input_path"
51880    fi
51881  fi
51882
51883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51884  if test "x$test_cygdrive_prefix" = x; then
51885    # As a simple fix, exclude /usr/bin since it's not a real path.
51886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51888      # a path prefixed by /cygdrive for fixpath to work.
51889      new_path="$CYGWIN_ROOT_PATH$input_path"
51890    fi
51891  fi
51892
51893
51894  if test "x$path" != "x$new_path"; then
51895    MSVC_DLL="$new_path"
51896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51897$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51898  fi
51899
51900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51901
51902  path="$MSVC_DLL"
51903  has_colon=`$ECHO $path | $GREP ^.:`
51904  new_path="$path"
51905  if test "x$has_colon" = x; then
51906    # Not in mixed or Windows style, start by that.
51907    new_path=`cmd //c echo $path`
51908  fi
51909
51910
51911  input_path="$new_path"
51912  # Check if we need to convert this using DOS-style short mode. If the path
51913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51914  # take no chances and rewrite it.
51915  # Note: m4 eats our [], so we need to use [ and ] instead.
51916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51917  if test "x$has_forbidden_chars" != x; then
51918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51920  fi
51921
51922
51923  windows_path="$new_path"
51924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51925    unix_path=`$CYGPATH -u "$windows_path"`
51926    new_path="$unix_path"
51927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51929    new_path="$unix_path"
51930  fi
51931
51932  if test "x$path" != "x$new_path"; then
51933    MSVC_DLL="$new_path"
51934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51935$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51936  fi
51937
51938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51940
51941    else
51942      # We're on a unix platform. Hooray! :)
51943      path="$MSVC_DLL"
51944      has_space=`$ECHO "$path" | $GREP " "`
51945      if test "x$has_space" != x; then
51946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51947$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51949      fi
51950
51951      # Use eval to expand a potential ~
51952      eval path="$path"
51953      if test ! -f "$path" && test ! -d "$path"; then
51954        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51955      fi
51956
51957      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51958    fi
51959  fi
51960
51961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51962$as_echo_n "checking for $DLL_NAME... " >&6; }
51963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51964$as_echo "$MSVC_DLL" >&6; }
51965    else
51966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51967$as_echo "incorrect, ignoring" >&6; }
51968      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51969$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51970    fi
51971  fi
51972
51973    fi
51974  fi
51975
51976  if test "x$MSVC_DLL" = x; then
51977    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51978    # (This was the original behaviour; kept since it might turn something up)
51979    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51980      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51981        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51982	    | $GREP x64 | $HEAD --lines 1`
51983      else
51984        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51985	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51986        if test "x$POSSIBLE_MSVC_DLL" = x; then
51987          # We're grasping at straws now...
51988          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51989	      | $HEAD --lines 1`
51990        fi
51991      fi
51992
51993
51994  DLL_NAME="$DLL_NAME"
51995  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51996  METHOD="search of VCINSTALLDIR"
51997  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51998    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51999$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52000
52001    # Need to check if the found msvcr is correct architecture
52002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52003$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52004    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52006      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52007      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52008      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52009        CORRECT_MSVCR_ARCH="PE32 executable"
52010      else
52011        CORRECT_MSVCR_ARCH="PE32+ executable"
52012      fi
52013    else
52014      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52015        CORRECT_MSVCR_ARCH=386
52016      else
52017        CORRECT_MSVCR_ARCH=x86-64
52018      fi
52019    fi
52020    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52022$as_echo "ok" >&6; }
52023      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52024
52025  # Only process if variable expands to non-empty
52026
52027  if test "x$MSVC_DLL" != x; then
52028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52029
52030  # Input might be given as Windows format, start by converting to
52031  # unix format.
52032  path="$MSVC_DLL"
52033  new_path=`$CYGPATH -u "$path"`
52034
52035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52038  # "foo.exe" is OK but "foo" is an error.
52039  #
52040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52041  # It is also a way to make sure we got the proper file name for the real test later on.
52042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52043  if test "x$test_shortpath" = x; then
52044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52045$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52046    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52047  fi
52048
52049  # Call helper function which possibly converts this using DOS-style short mode.
52050  # If so, the updated path is stored in $new_path.
52051
52052  input_path="$new_path"
52053  # Check if we need to convert this using DOS-style short mode. If the path
52054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52055  # take no chances and rewrite it.
52056  # Note: m4 eats our [], so we need to use [ and ] instead.
52057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52058  if test "x$has_forbidden_chars" != x; then
52059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52063      # Going to short mode and back again did indeed matter. Since short mode is
52064      # case insensitive, let's make it lowercase to improve readability.
52065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52066      # Now convert it back to Unix-style (cygpath)
52067      input_path=`$CYGPATH -u "$shortmode_path"`
52068      new_path="$input_path"
52069    fi
52070  fi
52071
52072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52073  if test "x$test_cygdrive_prefix" = x; then
52074    # As a simple fix, exclude /usr/bin since it's not a real path.
52075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52077      # a path prefixed by /cygdrive for fixpath to work.
52078      new_path="$CYGWIN_ROOT_PATH$input_path"
52079    fi
52080  fi
52081
52082
52083  if test "x$path" != "x$new_path"; then
52084    MSVC_DLL="$new_path"
52085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52086$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52087  fi
52088
52089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52090
52091  path="$MSVC_DLL"
52092  has_colon=`$ECHO $path | $GREP ^.:`
52093  new_path="$path"
52094  if test "x$has_colon" = x; then
52095    # Not in mixed or Windows style, start by that.
52096    new_path=`cmd //c echo $path`
52097  fi
52098
52099
52100  input_path="$new_path"
52101  # Check if we need to convert this using DOS-style short mode. If the path
52102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52103  # take no chances and rewrite it.
52104  # Note: m4 eats our [], so we need to use [ and ] instead.
52105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52106  if test "x$has_forbidden_chars" != x; then
52107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52109  fi
52110
52111
52112  windows_path="$new_path"
52113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52114    unix_path=`$CYGPATH -u "$windows_path"`
52115    new_path="$unix_path"
52116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52118    new_path="$unix_path"
52119  fi
52120
52121  if test "x$path" != "x$new_path"; then
52122    MSVC_DLL="$new_path"
52123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52124$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52125  fi
52126
52127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52129
52130    else
52131      # We're on a unix platform. Hooray! :)
52132      path="$MSVC_DLL"
52133      has_space=`$ECHO "$path" | $GREP " "`
52134      if test "x$has_space" != x; then
52135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52136$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52138      fi
52139
52140      # Use eval to expand a potential ~
52141      eval path="$path"
52142      if test ! -f "$path" && test ! -d "$path"; then
52143        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52144      fi
52145
52146      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52147    fi
52148  fi
52149
52150      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52151$as_echo_n "checking for $DLL_NAME... " >&6; }
52152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52153$as_echo "$MSVC_DLL" >&6; }
52154    else
52155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52156$as_echo "incorrect, ignoring" >&6; }
52157      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52158$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52159    fi
52160  fi
52161
52162    fi
52163  fi
52164
52165  if test "x$MSVC_DLL" = x; then
52166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52167$as_echo_n "checking for $DLL_NAME... " >&6; }
52168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52169$as_echo "no" >&6; }
52170    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52171  fi
52172
52173      MSVCP_DLL="$MSVC_DLL"
52174    fi
52175
52176  fi
52177
52178
52179
52180# Check whether --with-dxsdk was given.
52181if test "${with_dxsdk+set}" = set; then :
52182  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52183$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52184fi
52185
52186
52187
52188
52189# Check whether --with-dxsdk-lib was given.
52190if test "${with_dxsdk_lib+set}" = set; then :
52191  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52192$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52193fi
52194
52195
52196
52197
52198# Check whether --with-dxsdk-include was given.
52199if test "${with_dxsdk_include+set}" = set; then :
52200  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52201$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52202fi
52203
52204
52205  fi
52206
52207
52208###############################################################################
52209#
52210# We need to do some final tweaking, when everything else is done.
52211#
52212###############################################################################
52213
52214
52215  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52216
52217
52218  # The name of the Service Agent jar.
52219  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52220  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52221    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52222  fi
52223
52224
52225
52226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52227$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52228
52229    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52230      ENABLE_INTREE_EC=yes
52231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52232$as_echo "yes" >&6; }
52233    else
52234      ENABLE_INTREE_EC=no
52235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52236$as_echo "no" >&6; }
52237    fi
52238
52239
52240
52241
52242###############################################################################
52243#
52244# Configure parts of the build that only affect the build performance,
52245# not the result.
52246#
52247###############################################################################
52248
52249
52250  # How many cores do we have on this build system?
52251
52252# Check whether --with-num-cores was given.
52253if test "${with_num_cores+set}" = set; then :
52254  withval=$with_num_cores;
52255fi
52256
52257  if test "x$with_num_cores" = x; then
52258    # The number of cores were not specified, try to probe them.
52259
52260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52261$as_echo_n "checking for number of cores... " >&6; }
52262  NUM_CORES=1
52263  FOUND_CORES=no
52264
52265  if test -f /proc/cpuinfo; then
52266    # Looks like a Linux (or cygwin) system
52267    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52268    FOUND_CORES=yes
52269  elif test -x /usr/sbin/psrinfo; then
52270    # Looks like a Solaris system
52271    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52272    FOUND_CORES=yes
52273  elif test -x /usr/sbin/system_profiler; then
52274    # Looks like a MacOSX system
52275    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52276    FOUND_CORES=yes
52277  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52278    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52279    FOUND_CORES=yes
52280  elif test -n "$NUMBER_OF_PROCESSORS"; then
52281    # On windows, look in the env
52282    NUM_CORES=$NUMBER_OF_PROCESSORS
52283    FOUND_CORES=yes
52284  fi
52285
52286  if test "x$FOUND_CORES" = xyes; then
52287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52288$as_echo "$NUM_CORES" >&6; }
52289  else
52290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52291$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52293$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52294  fi
52295
52296  else
52297    NUM_CORES=$with_num_cores
52298  fi
52299
52300
52301
52302  # How much memory do we have on this build system?
52303
52304# Check whether --with-memory-size was given.
52305if test "${with_memory_size+set}" = set; then :
52306  withval=$with_memory_size;
52307fi
52308
52309  if test "x$with_memory_size" = x; then
52310    # The memory size was not specified, try to probe it.
52311
52312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52313$as_echo_n "checking for memory size... " >&6; }
52314  # Default to 1024 MB
52315  MEMORY_SIZE=1024
52316  FOUND_MEM=no
52317
52318  if test -f /proc/meminfo; then
52319    # Looks like a Linux (or cygwin) system
52320    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52321    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52322    FOUND_MEM=yes
52323  elif test -x /usr/sbin/prtconf; then
52324    # Looks like a Solaris or AIX system
52325    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52326    FOUND_MEM=yes
52327  elif test -x /usr/sbin/system_profiler; then
52328    # Looks like a MacOSX system
52329    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52330    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52331    FOUND_MEM=yes
52332  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52333    # Windows, but without cygwin
52334    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52335    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52336    FOUND_MEM=yes
52337  fi
52338
52339  if test "x$FOUND_MEM" = xyes; then
52340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52341$as_echo "$MEMORY_SIZE MB" >&6; }
52342  else
52343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52344$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52345    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52346$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52347  fi
52348
52349  else
52350    MEMORY_SIZE=$with_memory_size
52351  fi
52352
52353
52354
52355  # Provide a decent default number of parallel jobs for make depending on
52356  # number of cores, amount of memory and machine architecture.
52357
52358# Check whether --with-jobs was given.
52359if test "${with_jobs+set}" = set; then :
52360  withval=$with_jobs;
52361fi
52362
52363  if test "x$with_jobs" = x; then
52364    # Number of jobs was not specified, calculate.
52365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52366$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52367    # Approximate memory in GB.
52368    memory_gb=`expr $MEMORY_SIZE / 1024`
52369    # Pick the lowest of memory in gb and number of cores.
52370    if test "$memory_gb" -lt "$NUM_CORES"; then
52371      JOBS="$memory_gb"
52372    else
52373      JOBS="$NUM_CORES"
52374      # On bigger machines, leave some room for other processes to run
52375      if test "$JOBS" -gt "4"; then
52376        JOBS=`expr $JOBS '*' 90 / 100`
52377      fi
52378    fi
52379    # Cap number of jobs to 16
52380    if test "$JOBS" -gt "16"; then
52381      JOBS=16
52382    fi
52383    if test "$JOBS" -eq "0"; then
52384      JOBS=1
52385    fi
52386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52387$as_echo "$JOBS" >&6; }
52388  else
52389    JOBS=$with_jobs
52390  fi
52391
52392
52393
52394# Setup arguments for the boot jdk (after cores and memory have been setup)
52395
52396  ##############################################################################
52397  #
52398  # Specify jvm options for anything that is run with the Boot JDK.
52399  # Not all JVM:s accept the same arguments on the command line.
52400  #
52401
52402# Check whether --with-boot-jdk-jvmargs was given.
52403if test "${with_boot_jdk_jvmargs+set}" = set; then :
52404  withval=$with_boot_jdk_jvmargs;
52405fi
52406
52407
52408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52409$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52410
52411  # Disable special log output when a debug build is used as Boot JDK...
52412
52413  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52414  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52415  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52416  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52417  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52418  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52419    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52420    JVM_ARG_OK=true
52421  else
52422    $ECHO "Arg failed:" >&5
52423    $ECHO "$OUTPUT" >&5
52424    JVM_ARG_OK=false
52425  fi
52426
52427
52428  # Apply user provided options.
52429
52430  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52431  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52432  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52433  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52434  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52435  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52436    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52437    JVM_ARG_OK=true
52438  else
52439    $ECHO "Arg failed:" >&5
52440    $ECHO "$OUTPUT" >&5
52441    JVM_ARG_OK=false
52442  fi
52443
52444
52445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52446$as_echo "$boot_jdk_jvmargs" >&6; }
52447
52448  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52449  JAVA_FLAGS=$boot_jdk_jvmargs
52450
52451
52452
52453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52454$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52455
52456  # Starting amount of heap memory.
52457
52458  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52459  $ECHO "Command: $JAVA -Xms64M -version" >&5
52460  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52461  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52462  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52463  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52464    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52465    JVM_ARG_OK=true
52466  else
52467    $ECHO "Arg failed:" >&5
52468    $ECHO "$OUTPUT" >&5
52469    JVM_ARG_OK=false
52470  fi
52471
52472
52473  # Maximum amount of heap memory.
52474  # Maximum stack size.
52475  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52476  if test "x$BUILD_NUM_BITS" = x32; then
52477    if test "$JVM_MAX_HEAP" -gt "1100"; then
52478      JVM_MAX_HEAP=1100
52479    elif test "$JVM_MAX_HEAP" -lt "512"; then
52480      JVM_MAX_HEAP=512
52481    fi
52482    STACK_SIZE=768
52483  else
52484    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52485    # pointers are used. Apparently, we need to increase the heap and stack
52486    # space for the jvm. More specifically, when running javac to build huge
52487    # jdk batch
52488    if test "$JVM_MAX_HEAP" -gt "1600"; then
52489      JVM_MAX_HEAP=1600
52490    elif test "$JVM_MAX_HEAP" -lt "512"; then
52491      JVM_MAX_HEAP=512
52492    fi
52493    STACK_SIZE=1536
52494  fi
52495
52496  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52497  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52498  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52499  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52500  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52501  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52502    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52503    JVM_ARG_OK=true
52504  else
52505    $ECHO "Arg failed:" >&5
52506    $ECHO "$OUTPUT" >&5
52507    JVM_ARG_OK=false
52508  fi
52509
52510
52511  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52512  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52513  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52514  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52515  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52516  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52517    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52518    JVM_ARG_OK=true
52519  else
52520    $ECHO "Arg failed:" >&5
52521    $ECHO "$OUTPUT" >&5
52522    JVM_ARG_OK=false
52523  fi
52524
52525
52526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52527$as_echo "$boot_jdk_jvmargs_big" >&6; }
52528
52529  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52530
52531
52532
52533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52534$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52535
52536  # Use serial gc for small short lived tools if possible
52537
52538  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52539  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52540  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52541  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52542  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52543  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52544    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52545    JVM_ARG_OK=true
52546  else
52547    $ECHO "Arg failed:" >&5
52548    $ECHO "$OUTPUT" >&5
52549    JVM_ARG_OK=false
52550  fi
52551
52552
52553  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52554  $ECHO "Command: $JAVA -Xms32M -version" >&5
52555  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52556  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52557  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52558  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52559    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52560    JVM_ARG_OK=true
52561  else
52562    $ECHO "Arg failed:" >&5
52563    $ECHO "$OUTPUT" >&5
52564    JVM_ARG_OK=false
52565  fi
52566
52567
52568  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52569  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52570  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52571  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52572  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52573  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52574    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52575    JVM_ARG_OK=true
52576  else
52577    $ECHO "Arg failed:" >&5
52578    $ECHO "$OUTPUT" >&5
52579    JVM_ARG_OK=false
52580  fi
52581
52582
52583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52584$as_echo "$boot_jdk_jvmargs_small" >&6; }
52585
52586  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52587
52588
52589  JAVA_TOOL_FLAGS_SMALL=""
52590  for f in $JAVA_FLAGS_SMALL; do
52591    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52592  done
52593
52594
52595
52596# Setup smart javac (after cores and memory have been setup)
52597
52598
52599# Check whether --with-sjavac-server-java was given.
52600if test "${with_sjavac_server_java+set}" = set; then :
52601  withval=$with_sjavac_server_java;
52602fi
52603
52604
52605  if test "x$with_sjavac_server_java" != x; then
52606    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52607    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52608    if test "x$FOUND_VERSION" = x; then
52609      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52610    fi
52611  else
52612    SJAVAC_SERVER_JAVA="$JAVA"
52613  fi
52614
52615
52616  if test "$MEMORY_SIZE" -gt "3000"; then
52617
52618  $ECHO "Check if jvm arg is ok: -d64" >&5
52619  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52620  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52621  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52622  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52623  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52624    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52625    JVM_ARG_OK=true
52626  else
52627    $ECHO "Arg failed:" >&5
52628    $ECHO "$OUTPUT" >&5
52629    JVM_ARG_OK=false
52630  fi
52631
52632    if test "$JVM_ARG_OK" = true; then
52633      JVM_64BIT=true
52634      JVM_ARG_OK=false
52635    fi
52636  fi
52637
52638  MX_VALUE=`expr $MEMORY_SIZE / 2`
52639  if test "$JVM_64BIT" = true; then
52640    # Set ms lower than mx since more than one instance of the server might
52641    # get launched at the same time before they figure out which instance won.
52642    MS_VALUE=512
52643    if test "$MX_VALUE" -gt "2048"; then
52644      MX_VALUE=2048
52645    fi
52646  else
52647    MS_VALUE=256
52648    if test "$MX_VALUE" -gt "1500"; then
52649      MX_VALUE=1500
52650    fi
52651  fi
52652  if test "$MX_VALUE" -lt "512"; then
52653    MX_VALUE=512
52654  fi
52655
52656  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52657  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52658  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52659  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52660  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52661  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52662    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52663    JVM_ARG_OK=true
52664  else
52665    $ECHO "Arg failed:" >&5
52666    $ECHO "$OUTPUT" >&5
52667    JVM_ARG_OK=false
52668  fi
52669
52670
52671
52672  # Check whether --enable-sjavac was given.
52673if test "${enable_sjavac+set}" = set; then :
52674  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52675else
52676  ENABLE_SJAVAC='no'
52677fi
52678
52679  if test "x$JVM_ARG_OK" = "xfalse"; then
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52681$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52682    ENABLE_SJAVAC=no;
52683  fi
52684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52685$as_echo_n "checking whether to use sjavac... " >&6; }
52686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52687$as_echo "$ENABLE_SJAVAC" >&6; }
52688
52689
52690
52691# Can the C/C++ compiler use precompiled headers?
52692
52693
52694  ###############################################################################
52695  #
52696  # Can the C/C++ compiler use precompiled headers?
52697  #
52698  # Check whether --enable-precompiled-headers was given.
52699if test "${enable_precompiled_headers+set}" = set; then :
52700  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52701else
52702  ENABLE_PRECOMPH=yes
52703fi
52704
52705
52706  USE_PRECOMPILED_HEADER=1
52707  if test "x$ENABLE_PRECOMPH" = xno; then
52708    USE_PRECOMPILED_HEADER=0
52709  fi
52710
52711  if test "x$ENABLE_PRECOMPH" = xyes; then
52712    # Check that the compiler actually supports precomp headers.
52713    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52715$as_echo_n "checking that precompiled headers work... " >&6; }
52716      echo "int alfa();" > conftest.h
52717      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52718      if test ! -f conftest.hpp.gch; then
52719        USE_PRECOMPILED_HEADER=0
52720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52721$as_echo "no" >&6; }
52722      else
52723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52724$as_echo "yes" >&6; }
52725      fi
52726      rm -f conftest.h conftest.hpp.gch
52727    fi
52728  fi
52729
52730
52731
52732
52733# Setup use of ccache, if available
52734
52735  # Check whether --enable-ccache was given.
52736if test "${enable_ccache+set}" = set; then :
52737  enableval=$enable_ccache;
52738fi
52739
52740
52741  CCACHE=
52742  CCACHE_STATUS=
52743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52744$as_echo_n "checking is ccache enabled... " >&6; }
52745  if test "x$enable_ccache" = xyes; then
52746    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52748$as_echo "yes" >&6; }
52749      OLD_PATH="$PATH"
52750      if test "x$TOOLCHAIN_PATH" != x; then
52751        PATH=$TOOLCHAIN_PATH:$PATH
52752      fi
52753
52754
52755
52756  # Publish this variable in the help.
52757
52758
52759  if test "x$CCACHE" = x; then
52760    # The variable is not set by user, try to locate tool using the code snippet
52761    for ac_prog in ccache
52762do
52763  # Extract the first word of "$ac_prog", so it can be a program name with args.
52764set dummy $ac_prog; ac_word=$2
52765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52766$as_echo_n "checking for $ac_word... " >&6; }
52767if ${ac_cv_path_CCACHE+:} false; then :
52768  $as_echo_n "(cached) " >&6
52769else
52770  case $CCACHE in
52771  [\\/]* | ?:[\\/]*)
52772  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52773  ;;
52774  *)
52775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52776for as_dir in $PATH
52777do
52778  IFS=$as_save_IFS
52779  test -z "$as_dir" && as_dir=.
52780    for ac_exec_ext in '' $ac_executable_extensions; do
52781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52782    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52784    break 2
52785  fi
52786done
52787  done
52788IFS=$as_save_IFS
52789
52790  ;;
52791esac
52792fi
52793CCACHE=$ac_cv_path_CCACHE
52794if test -n "$CCACHE"; then
52795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52796$as_echo "$CCACHE" >&6; }
52797else
52798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52799$as_echo "no" >&6; }
52800fi
52801
52802
52803  test -n "$CCACHE" && break
52804done
52805
52806  else
52807    # The variable is set, but is it from the command line or the environment?
52808
52809    # Try to remove the string !CCACHE! from our list.
52810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52812      # If it failed, the variable was not from the command line. Ignore it,
52813      # but warn the user (except for BASH, which is always set by the calling BASH).
52814      if test "xCCACHE" != xBASH; then
52815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52816$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52817      fi
52818      # Try to locate tool using the code snippet
52819      for ac_prog in ccache
52820do
52821  # Extract the first word of "$ac_prog", so it can be a program name with args.
52822set dummy $ac_prog; ac_word=$2
52823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52824$as_echo_n "checking for $ac_word... " >&6; }
52825if ${ac_cv_path_CCACHE+:} false; then :
52826  $as_echo_n "(cached) " >&6
52827else
52828  case $CCACHE in
52829  [\\/]* | ?:[\\/]*)
52830  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52831  ;;
52832  *)
52833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52834for as_dir in $PATH
52835do
52836  IFS=$as_save_IFS
52837  test -z "$as_dir" && as_dir=.
52838    for ac_exec_ext in '' $ac_executable_extensions; do
52839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52840    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52842    break 2
52843  fi
52844done
52845  done
52846IFS=$as_save_IFS
52847
52848  ;;
52849esac
52850fi
52851CCACHE=$ac_cv_path_CCACHE
52852if test -n "$CCACHE"; then
52853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52854$as_echo "$CCACHE" >&6; }
52855else
52856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52857$as_echo "no" >&6; }
52858fi
52859
52860
52861  test -n "$CCACHE" && break
52862done
52863
52864    else
52865      # If it succeeded, then it was overridden by the user. We will use it
52866      # for the tool.
52867
52868      # First remove it from the list of overridden variables, so we can test
52869      # for unknown variables in the end.
52870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52871
52872      # Check if the provided tool contains a complete path.
52873      tool_specified="$CCACHE"
52874      tool_basename="${tool_specified##*/}"
52875      if test "x$tool_basename" = "x$tool_specified"; then
52876        # A command without a complete path is provided, search $PATH.
52877        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52878$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52879        # Extract the first word of "$tool_basename", so it can be a program name with args.
52880set dummy $tool_basename; ac_word=$2
52881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52882$as_echo_n "checking for $ac_word... " >&6; }
52883if ${ac_cv_path_CCACHE+:} false; then :
52884  $as_echo_n "(cached) " >&6
52885else
52886  case $CCACHE in
52887  [\\/]* | ?:[\\/]*)
52888  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52889  ;;
52890  *)
52891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52892for as_dir in $PATH
52893do
52894  IFS=$as_save_IFS
52895  test -z "$as_dir" && as_dir=.
52896    for ac_exec_ext in '' $ac_executable_extensions; do
52897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52898    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52900    break 2
52901  fi
52902done
52903  done
52904IFS=$as_save_IFS
52905
52906  ;;
52907esac
52908fi
52909CCACHE=$ac_cv_path_CCACHE
52910if test -n "$CCACHE"; then
52911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52912$as_echo "$CCACHE" >&6; }
52913else
52914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52915$as_echo "no" >&6; }
52916fi
52917
52918
52919        if test "x$CCACHE" = x; then
52920          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52921        fi
52922      else
52923        # Otherwise we believe it is a complete path. Use it as it is.
52924        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52925$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52927$as_echo_n "checking for CCACHE... " >&6; }
52928        if test ! -x "$tool_specified"; then
52929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52930$as_echo "not found" >&6; }
52931          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52932        fi
52933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52934$as_echo "$tool_specified" >&6; }
52935      fi
52936    fi
52937  fi
52938
52939
52940
52941  if test "x$CCACHE" = x; then
52942    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52943  fi
52944
52945
52946      PATH="$OLD_PATH"
52947      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52948      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52949    else
52950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52951$as_echo "no" >&6; }
52952      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52953$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52954    fi
52955  elif test "x$enable_ccache" = xno; then
52956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52957$as_echo "no, explicitly disabled" >&6; }
52958    CCACHE_STATUS="Disabled"
52959  elif test "x$enable_ccache" = x; then
52960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52961$as_echo "no" >&6; }
52962  else
52963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52964$as_echo "unknown" >&6; }
52965    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52966  fi
52967
52968
52969
52970# Check whether --with-ccache-dir was given.
52971if test "${with_ccache_dir+set}" = set; then :
52972  withval=$with_ccache_dir;
52973fi
52974
52975
52976  if test "x$with_ccache_dir" != x; then
52977    # When using a non home ccache directory, assume the use is to share ccache files
52978    # with other users. Thus change the umask.
52979    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52980    if test "x$CCACHE" = x; then
52981      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52982$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52983    fi
52984  fi
52985
52986  if test "x$CCACHE" != x; then
52987
52988  if test "x$CCACHE" != x; then
52989    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52990      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52991          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
52992      if test "x$HAS_BAD_CCACHE" != "x"; then
52993        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52994      fi
52995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52996$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52997      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52998      PUSHED_FLAGS="$CXXFLAGS"
52999      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53000      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53001/* end confdefs.h.  */
53002
53003int
53004main ()
53005{
53006
53007  ;
53008  return 0;
53009}
53010_ACEOF
53011if ac_fn_cxx_try_compile "$LINENO"; then :
53012  CC_KNOWS_CCACHE_TRICK=yes
53013else
53014  CC_KNOWS_CCACHE_TRICK=no
53015fi
53016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53017      CXXFLAGS="$PUSHED_FLAGS"
53018      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53020$as_echo "yes" >&6; }
53021        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53022
53023        CCACHE_SLOPPINESS=pch_defines,time_macros
53024      else
53025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53026$as_echo "no" >&6; }
53027        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53028      fi
53029    fi
53030
53031    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53032        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53033
53034    if test "x$SET_CCACHE_DIR" != x; then
53035      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53036      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53037    fi
53038  fi
53039
53040  fi
53041
53042
53043###############################################################################
53044#
53045# And now the finish...
53046#
53047###############################################################################
53048
53049# Check for some common pitfalls
53050
53051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53052    file_to_test="$SRC_ROOT/LICENSE"
53053    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53054      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
53055    fi
53056  fi
53057
53058
53059  # Did user specify any unknown variables?
53060
53061  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53062    # Replace the separating ! with spaces before presenting for end user.
53063    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53064    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53065$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53066  fi
53067
53068
53069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53070$as_echo_n "checking if build directory is on local disk... " >&6; }
53071
53072  # df -l lists only local disks; if the given directory is not found then
53073  # a non-zero exit code is given
53074  if test "x$DF" = x; then
53075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53076      # msys does not have df; use Windows "net use" instead.
53077      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53078      if test "x$IS_NETWORK_DISK" = x; then
53079        OUTPUT_DIR_IS_LOCAL="yes"
53080      else
53081        OUTPUT_DIR_IS_LOCAL="no"
53082      fi
53083    else
53084      # No df here, say it's local
53085      OUTPUT_DIR_IS_LOCAL="yes"
53086    fi
53087  else
53088    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53089      OUTPUT_DIR_IS_LOCAL="yes"
53090    else
53091      OUTPUT_DIR_IS_LOCAL="no"
53092    fi
53093  fi
53094
53095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53096$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53097
53098
53099
53100  # Check if the user has any old-style ALT_ variables set.
53101  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53102
53103  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53104  # Since we can't properly handle the dependencies for this, warn the user about the situation
53105  if test -e $OUTPUT_ROOT/spec.gmk; then
53106    IS_RECONFIGURE=yes
53107  else
53108    IS_RECONFIGURE=no
53109  fi
53110
53111
53112# At the end, call the custom hook. (Dummy macro if no custom sources available)
53113
53114
53115# We're messing a bit with internal autoconf variables to put the config.status
53116# in the output directory instead of the current directory.
53117CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53118
53119# Create the actual output files. Now the main work of configure is done.
53120cat >confcache <<\_ACEOF
53121# This file is a shell script that caches the results of configure
53122# tests run on this system so they can be shared between configure
53123# scripts and configure runs, see configure's option --config-cache.
53124# It is not useful on other systems.  If it contains results you don't
53125# want to keep, you may remove or edit it.
53126#
53127# config.status only pays attention to the cache file if you give it
53128# the --recheck option to rerun configure.
53129#
53130# `ac_cv_env_foo' variables (set or unset) will be overridden when
53131# loading this file, other *unset* `ac_cv_foo' will be assigned the
53132# following values.
53133
53134_ACEOF
53135
53136# The following way of writing the cache mishandles newlines in values,
53137# but we know of no workaround that is simple, portable, and efficient.
53138# So, we kill variables containing newlines.
53139# Ultrix sh set writes to stderr and can't be redirected directly,
53140# and sets the high bit in the cache file unless we assign to the vars.
53141(
53142  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53143    eval ac_val=\$$ac_var
53144    case $ac_val in #(
53145    *${as_nl}*)
53146      case $ac_var in #(
53147      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53148$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53149      esac
53150      case $ac_var in #(
53151      _ | IFS | as_nl) ;; #(
53152      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53153      *) { eval $ac_var=; unset $ac_var;} ;;
53154      esac ;;
53155    esac
53156  done
53157
53158  (set) 2>&1 |
53159    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53160    *${as_nl}ac_space=\ *)
53161      # `set' does not quote correctly, so add quotes: double-quote
53162      # substitution turns \\\\ into \\, and sed turns \\ into \.
53163      sed -n \
53164	"s/'/'\\\\''/g;
53165	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53166      ;; #(
53167    *)
53168      # `set' quotes correctly as required by POSIX, so do not add quotes.
53169      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53170      ;;
53171    esac |
53172    sort
53173) |
53174  sed '
53175     /^ac_cv_env_/b end
53176     t clear
53177     :clear
53178     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53179     t end
53180     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53181     :end' >>confcache
53182if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53183  if test -w "$cache_file"; then
53184    if test "x$cache_file" != "x/dev/null"; then
53185      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53186$as_echo "$as_me: updating cache $cache_file" >&6;}
53187      if test ! -f "$cache_file" || test -h "$cache_file"; then
53188	cat confcache >"$cache_file"
53189      else
53190        case $cache_file in #(
53191        */* | ?:*)
53192	  mv -f confcache "$cache_file"$$ &&
53193	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53194        *)
53195	  mv -f confcache "$cache_file" ;;
53196	esac
53197      fi
53198    fi
53199  else
53200    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53201$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53202  fi
53203fi
53204rm -f confcache
53205
53206test "x$prefix" = xNONE && prefix=$ac_default_prefix
53207# Let make expand exec_prefix.
53208test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53209
53210# Transform confdefs.h into DEFS.
53211# Protect against shell expansion while executing Makefile rules.
53212# Protect against Makefile macro expansion.
53213#
53214# If the first sed substitution is executed (which looks for macros that
53215# take arguments), then branch to the quote section.  Otherwise,
53216# look for a macro that doesn't take arguments.
53217ac_script='
53218:mline
53219/\\$/{
53220 N
53221 s,\\\n,,
53222 b mline
53223}
53224t clear
53225:clear
53226s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53227t quote
53228s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53229t quote
53230b any
53231:quote
53232s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53233s/\[/\\&/g
53234s/\]/\\&/g
53235s/\$/$$/g
53236H
53237:any
53238${
53239	g
53240	s/^\n//
53241	s/\n/ /g
53242	p
53243}
53244'
53245DEFS=`sed -n "$ac_script" confdefs.h`
53246
53247
53248ac_libobjs=
53249ac_ltlibobjs=
53250U=
53251for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53252  # 1. Remove the extension, and $U if already installed.
53253  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53254  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53255  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53256  #    will be set to the directory where LIBOBJS objects are built.
53257  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53258  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53259done
53260LIBOBJS=$ac_libobjs
53261
53262LTLIBOBJS=$ac_ltlibobjs
53263
53264
53265
53266: "${CONFIG_STATUS=./config.status}"
53267ac_write_fail=0
53268ac_clean_files_save=$ac_clean_files
53269ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53270{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53271$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53272as_write_fail=0
53273cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53274#! $SHELL
53275# Generated by $as_me.
53276# Run this file to recreate the current configuration.
53277# Compiler output produced by configure, useful for debugging
53278# configure, is in config.log if it exists.
53279
53280debug=false
53281ac_cs_recheck=false
53282ac_cs_silent=false
53283
53284SHELL=\${CONFIG_SHELL-$SHELL}
53285export SHELL
53286_ASEOF
53287cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53288## -------------------- ##
53289## M4sh Initialization. ##
53290## -------------------- ##
53291
53292# Be more Bourne compatible
53293DUALCASE=1; export DUALCASE # for MKS sh
53294if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53295  emulate sh
53296  NULLCMD=:
53297  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53298  # is contrary to our usage.  Disable this feature.
53299  alias -g '${1+"$@"}'='"$@"'
53300  setopt NO_GLOB_SUBST
53301else
53302  case `(set -o) 2>/dev/null` in #(
53303  *posix*) :
53304    set -o posix ;; #(
53305  *) :
53306     ;;
53307esac
53308fi
53309
53310
53311as_nl='
53312'
53313export as_nl
53314# Printing a long string crashes Solaris 7 /usr/bin/printf.
53315as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53316as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53317as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53318# Prefer a ksh shell builtin over an external printf program on Solaris,
53319# but without wasting forks for bash or zsh.
53320if test -z "$BASH_VERSION$ZSH_VERSION" \
53321    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53322  as_echo='print -r --'
53323  as_echo_n='print -rn --'
53324elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53325  as_echo='printf %s\n'
53326  as_echo_n='printf %s'
53327else
53328  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53329    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53330    as_echo_n='/usr/ucb/echo -n'
53331  else
53332    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53333    as_echo_n_body='eval
53334      arg=$1;
53335      case $arg in #(
53336      *"$as_nl"*)
53337	expr "X$arg" : "X\\(.*\\)$as_nl";
53338	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53339      esac;
53340      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53341    '
53342    export as_echo_n_body
53343    as_echo_n='sh -c $as_echo_n_body as_echo'
53344  fi
53345  export as_echo_body
53346  as_echo='sh -c $as_echo_body as_echo'
53347fi
53348
53349# The user is always right.
53350if test "${PATH_SEPARATOR+set}" != set; then
53351  PATH_SEPARATOR=:
53352  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53353    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53354      PATH_SEPARATOR=';'
53355  }
53356fi
53357
53358
53359# IFS
53360# We need space, tab and new line, in precisely that order.  Quoting is
53361# there to prevent editors from complaining about space-tab.
53362# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53363# splitting by setting IFS to empty value.)
53364IFS=" ""	$as_nl"
53365
53366# Find who we are.  Look in the path if we contain no directory separator.
53367as_myself=
53368case $0 in #((
53369  *[\\/]* ) as_myself=$0 ;;
53370  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53371for as_dir in $PATH
53372do
53373  IFS=$as_save_IFS
53374  test -z "$as_dir" && as_dir=.
53375    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53376  done
53377IFS=$as_save_IFS
53378
53379     ;;
53380esac
53381# We did not find ourselves, most probably we were run as `sh COMMAND'
53382# in which case we are not to be found in the path.
53383if test "x$as_myself" = x; then
53384  as_myself=$0
53385fi
53386if test ! -f "$as_myself"; then
53387  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53388  exit 1
53389fi
53390
53391# Unset variables that we do not need and which cause bugs (e.g. in
53392# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53393# suppresses any "Segmentation fault" message there.  '((' could
53394# trigger a bug in pdksh 5.2.14.
53395for as_var in BASH_ENV ENV MAIL MAILPATH
53396do eval test x\${$as_var+set} = xset \
53397  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53398done
53399PS1='$ '
53400PS2='> '
53401PS4='+ '
53402
53403# NLS nuisances.
53404LC_ALL=C
53405export LC_ALL
53406LANGUAGE=C
53407export LANGUAGE
53408
53409# CDPATH.
53410(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53411
53412
53413# as_fn_error STATUS ERROR [LINENO LOG_FD]
53414# ----------------------------------------
53415# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53416# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53417# script with STATUS, using 1 if that was 0.
53418as_fn_error ()
53419{
53420  as_status=$1; test $as_status -eq 0 && as_status=1
53421  if test "$4"; then
53422    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53423    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53424  fi
53425  $as_echo "$as_me: error: $2" >&2
53426  as_fn_exit $as_status
53427} # as_fn_error
53428
53429
53430# as_fn_set_status STATUS
53431# -----------------------
53432# Set $? to STATUS, without forking.
53433as_fn_set_status ()
53434{
53435  return $1
53436} # as_fn_set_status
53437
53438# as_fn_exit STATUS
53439# -----------------
53440# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53441as_fn_exit ()
53442{
53443  set +e
53444  as_fn_set_status $1
53445  exit $1
53446} # as_fn_exit
53447
53448# as_fn_unset VAR
53449# ---------------
53450# Portably unset VAR.
53451as_fn_unset ()
53452{
53453  { eval $1=; unset $1;}
53454}
53455as_unset=as_fn_unset
53456# as_fn_append VAR VALUE
53457# ----------------------
53458# Append the text in VALUE to the end of the definition contained in VAR. Take
53459# advantage of any shell optimizations that allow amortized linear growth over
53460# repeated appends, instead of the typical quadratic growth present in naive
53461# implementations.
53462if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53463  eval 'as_fn_append ()
53464  {
53465    eval $1+=\$2
53466  }'
53467else
53468  as_fn_append ()
53469  {
53470    eval $1=\$$1\$2
53471  }
53472fi # as_fn_append
53473
53474# as_fn_arith ARG...
53475# ------------------
53476# Perform arithmetic evaluation on the ARGs, and store the result in the
53477# global $as_val. Take advantage of shells that can avoid forks. The arguments
53478# must be portable across $(()) and expr.
53479if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53480  eval 'as_fn_arith ()
53481  {
53482    as_val=$(( $* ))
53483  }'
53484else
53485  as_fn_arith ()
53486  {
53487    as_val=`expr "$@" || test $? -eq 1`
53488  }
53489fi # as_fn_arith
53490
53491
53492if expr a : '\(a\)' >/dev/null 2>&1 &&
53493   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53494  as_expr=expr
53495else
53496  as_expr=false
53497fi
53498
53499if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53500  as_basename=basename
53501else
53502  as_basename=false
53503fi
53504
53505if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53506  as_dirname=dirname
53507else
53508  as_dirname=false
53509fi
53510
53511as_me=`$as_basename -- "$0" ||
53512$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53513	 X"$0" : 'X\(//\)$' \| \
53514	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53515$as_echo X/"$0" |
53516    sed '/^.*\/\([^/][^/]*\)\/*$/{
53517	    s//\1/
53518	    q
53519	  }
53520	  /^X\/\(\/\/\)$/{
53521	    s//\1/
53522	    q
53523	  }
53524	  /^X\/\(\/\).*/{
53525	    s//\1/
53526	    q
53527	  }
53528	  s/.*/./; q'`
53529
53530# Avoid depending upon Character Ranges.
53531as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53532as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53533as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53534as_cr_digits='0123456789'
53535as_cr_alnum=$as_cr_Letters$as_cr_digits
53536
53537ECHO_C= ECHO_N= ECHO_T=
53538case `echo -n x` in #(((((
53539-n*)
53540  case `echo 'xy\c'` in
53541  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53542  xy)  ECHO_C='\c';;
53543  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53544       ECHO_T='	';;
53545  esac;;
53546*)
53547  ECHO_N='-n';;
53548esac
53549
53550rm -f conf$$ conf$$.exe conf$$.file
53551if test -d conf$$.dir; then
53552  rm -f conf$$.dir/conf$$.file
53553else
53554  rm -f conf$$.dir
53555  mkdir conf$$.dir 2>/dev/null
53556fi
53557if (echo >conf$$.file) 2>/dev/null; then
53558  if ln -s conf$$.file conf$$ 2>/dev/null; then
53559    as_ln_s='ln -s'
53560    # ... but there are two gotchas:
53561    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53562    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53563    # In both cases, we have to default to `cp -pR'.
53564    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53565      as_ln_s='cp -pR'
53566  elif ln conf$$.file conf$$ 2>/dev/null; then
53567    as_ln_s=ln
53568  else
53569    as_ln_s='cp -pR'
53570  fi
53571else
53572  as_ln_s='cp -pR'
53573fi
53574rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53575rmdir conf$$.dir 2>/dev/null
53576
53577
53578# as_fn_mkdir_p
53579# -------------
53580# Create "$as_dir" as a directory, including parents if necessary.
53581as_fn_mkdir_p ()
53582{
53583
53584  case $as_dir in #(
53585  -*) as_dir=./$as_dir;;
53586  esac
53587  test -d "$as_dir" || eval $as_mkdir_p || {
53588    as_dirs=
53589    while :; do
53590      case $as_dir in #(
53591      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53592      *) as_qdir=$as_dir;;
53593      esac
53594      as_dirs="'$as_qdir' $as_dirs"
53595      as_dir=`$as_dirname -- "$as_dir" ||
53596$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53597	 X"$as_dir" : 'X\(//\)[^/]' \| \
53598	 X"$as_dir" : 'X\(//\)$' \| \
53599	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53600$as_echo X"$as_dir" |
53601    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53602	    s//\1/
53603	    q
53604	  }
53605	  /^X\(\/\/\)[^/].*/{
53606	    s//\1/
53607	    q
53608	  }
53609	  /^X\(\/\/\)$/{
53610	    s//\1/
53611	    q
53612	  }
53613	  /^X\(\/\).*/{
53614	    s//\1/
53615	    q
53616	  }
53617	  s/.*/./; q'`
53618      test -d "$as_dir" && break
53619    done
53620    test -z "$as_dirs" || eval "mkdir $as_dirs"
53621  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53622
53623
53624} # as_fn_mkdir_p
53625if mkdir -p . 2>/dev/null; then
53626  as_mkdir_p='mkdir -p "$as_dir"'
53627else
53628  test -d ./-p && rmdir ./-p
53629  as_mkdir_p=false
53630fi
53631
53632
53633# as_fn_executable_p FILE
53634# -----------------------
53635# Test if FILE is an executable regular file.
53636as_fn_executable_p ()
53637{
53638  test -f "$1" && test -x "$1"
53639} # as_fn_executable_p
53640as_test_x='test -x'
53641as_executable_p=as_fn_executable_p
53642
53643# Sed expression to map a string onto a valid CPP name.
53644as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53645
53646# Sed expression to map a string onto a valid variable name.
53647as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53648
53649
53650exec 6>&1
53651## ----------------------------------- ##
53652## Main body of $CONFIG_STATUS script. ##
53653## ----------------------------------- ##
53654_ASEOF
53655test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53656
53657cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53658# Save the log message, to keep $0 and so on meaningful, and to
53659# report actual input values of CONFIG_FILES etc. instead of their
53660# values after options handling.
53661ac_log="
53662This file was extended by OpenJDK $as_me jdk9, which was
53663generated by GNU Autoconf 2.69.  Invocation command line was
53664
53665  CONFIG_FILES    = $CONFIG_FILES
53666  CONFIG_HEADERS  = $CONFIG_HEADERS
53667  CONFIG_LINKS    = $CONFIG_LINKS
53668  CONFIG_COMMANDS = $CONFIG_COMMANDS
53669  $ $0 $@
53670
53671on `(hostname || uname -n) 2>/dev/null | sed 1q`
53672"
53673
53674_ACEOF
53675
53676case $ac_config_files in *"
53677"*) set x $ac_config_files; shift; ac_config_files=$*;;
53678esac
53679
53680
53681
53682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53683# Files that config.status was made for.
53684config_files="$ac_config_files"
53685
53686_ACEOF
53687
53688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53689ac_cs_usage="\
53690\`$as_me' instantiates files and other configuration actions
53691from templates according to the current configuration.  Unless the files
53692and actions are specified as TAGs, all are instantiated by default.
53693
53694Usage: $0 [OPTION]... [TAG]...
53695
53696  -h, --help       print this help, then exit
53697  -V, --version    print version number and configuration settings, then exit
53698      --config     print configuration, then exit
53699  -q, --quiet, --silent
53700                   do not print progress messages
53701  -d, --debug      don't remove temporary files
53702      --recheck    update $as_me by reconfiguring in the same conditions
53703      --file=FILE[:TEMPLATE]
53704                   instantiate the configuration file FILE
53705
53706Configuration files:
53707$config_files
53708
53709Report bugs to <build-dev@openjdk.java.net>.
53710OpenJDK home page: <http://openjdk.java.net>."
53711
53712_ACEOF
53713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53714ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53715ac_cs_version="\\
53716OpenJDK config.status jdk9
53717configured by $0, generated by GNU Autoconf 2.69,
53718  with options \\"\$ac_cs_config\\"
53719
53720Copyright (C) 2012 Free Software Foundation, Inc.
53721This config.status script is free software; the Free Software Foundation
53722gives unlimited permission to copy, distribute and modify it."
53723
53724ac_pwd='$ac_pwd'
53725srcdir='$srcdir'
53726AWK='$AWK'
53727test -n "\$AWK" || AWK=awk
53728_ACEOF
53729
53730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53731# The default lists apply if the user does not specify any file.
53732ac_need_defaults=:
53733while test $# != 0
53734do
53735  case $1 in
53736  --*=?*)
53737    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53738    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53739    ac_shift=:
53740    ;;
53741  --*=)
53742    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53743    ac_optarg=
53744    ac_shift=:
53745    ;;
53746  *)
53747    ac_option=$1
53748    ac_optarg=$2
53749    ac_shift=shift
53750    ;;
53751  esac
53752
53753  case $ac_option in
53754  # Handling of the options.
53755  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53756    ac_cs_recheck=: ;;
53757  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53758    $as_echo "$ac_cs_version"; exit ;;
53759  --config | --confi | --conf | --con | --co | --c )
53760    $as_echo "$ac_cs_config"; exit ;;
53761  --debug | --debu | --deb | --de | --d | -d )
53762    debug=: ;;
53763  --file | --fil | --fi | --f )
53764    $ac_shift
53765    case $ac_optarg in
53766    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53767    '') as_fn_error $? "missing file argument" ;;
53768    esac
53769    as_fn_append CONFIG_FILES " '$ac_optarg'"
53770    ac_need_defaults=false;;
53771  --he | --h |  --help | --hel | -h )
53772    $as_echo "$ac_cs_usage"; exit ;;
53773  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53774  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53775    ac_cs_silent=: ;;
53776
53777  # This is an error.
53778  -*) as_fn_error $? "unrecognized option: \`$1'
53779Try \`$0 --help' for more information." ;;
53780
53781  *) as_fn_append ac_config_targets " $1"
53782     ac_need_defaults=false ;;
53783
53784  esac
53785  shift
53786done
53787
53788ac_configure_extra_args=
53789
53790if $ac_cs_silent; then
53791  exec 6>/dev/null
53792  ac_configure_extra_args="$ac_configure_extra_args --silent"
53793fi
53794
53795_ACEOF
53796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53797if \$ac_cs_recheck; then
53798  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53799  shift
53800  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53801  CONFIG_SHELL='$SHELL'
53802  export CONFIG_SHELL
53803  exec "\$@"
53804fi
53805
53806_ACEOF
53807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53808exec 5>>config.log
53809{
53810  echo
53811  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53812## Running $as_me. ##
53813_ASBOX
53814  $as_echo "$ac_log"
53815} >&5
53816
53817_ACEOF
53818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53819_ACEOF
53820
53821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53822
53823# Handling of arguments.
53824for ac_config_target in $ac_config_targets
53825do
53826  case $ac_config_target in
53827    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53828    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53829    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53830    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53831    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53832
53833  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53834  esac
53835done
53836
53837
53838# If the user did not use the arguments to specify the items to instantiate,
53839# then the envvar interface is used.  Set only those that are not.
53840# We use the long form for the default assignment because of an extremely
53841# bizarre bug on SunOS 4.1.3.
53842if $ac_need_defaults; then
53843  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53844fi
53845
53846# Have a temporary directory for convenience.  Make it in the build tree
53847# simply because there is no reason against having it here, and in addition,
53848# creating and moving files from /tmp can sometimes cause problems.
53849# Hook for its removal unless debugging.
53850# Note that there is a small window in which the directory will not be cleaned:
53851# after its creation but before its name has been assigned to `$tmp'.
53852$debug ||
53853{
53854  tmp= ac_tmp=
53855  trap 'exit_status=$?
53856  : "${ac_tmp:=$tmp}"
53857  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53858' 0
53859  trap 'as_fn_exit 1' 1 2 13 15
53860}
53861# Create a (secure) tmp directory for tmp files.
53862
53863{
53864  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53865  test -d "$tmp"
53866}  ||
53867{
53868  tmp=./conf$$-$RANDOM
53869  (umask 077 && mkdir "$tmp")
53870} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53871ac_tmp=$tmp
53872
53873# Set up the scripts for CONFIG_FILES section.
53874# No need to generate them if there are no CONFIG_FILES.
53875# This happens for instance with `./config.status config.h'.
53876if test -n "$CONFIG_FILES"; then
53877
53878
53879ac_cr=`echo X | tr X '\015'`
53880# On cygwin, bash can eat \r inside `` if the user requested igncr.
53881# But we know of no other shell where ac_cr would be empty at this
53882# point, so we can use a bashism as a fallback.
53883if test "x$ac_cr" = x; then
53884  eval ac_cr=\$\'\\r\'
53885fi
53886ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53887if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53888  ac_cs_awk_cr='\\r'
53889else
53890  ac_cs_awk_cr=$ac_cr
53891fi
53892
53893echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53894_ACEOF
53895
53896
53897{
53898  echo "cat >conf$$subs.awk <<_ACEOF" &&
53899  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53900  echo "_ACEOF"
53901} >conf$$subs.sh ||
53902  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53903ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53904ac_delim='%!_!# '
53905for ac_last_try in false false false false false :; do
53906  . ./conf$$subs.sh ||
53907    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53908
53909  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53910  if test $ac_delim_n = $ac_delim_num; then
53911    break
53912  elif $ac_last_try; then
53913    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53914  else
53915    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53916  fi
53917done
53918rm -f conf$$subs.sh
53919
53920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53921cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53922_ACEOF
53923sed -n '
53924h
53925s/^/S["/; s/!.*/"]=/
53926p
53927g
53928s/^[^!]*!//
53929:repl
53930t repl
53931s/'"$ac_delim"'$//
53932t delim
53933:nl
53934h
53935s/\(.\{148\}\)..*/\1/
53936t more1
53937s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53938p
53939n
53940b repl
53941:more1
53942s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53943p
53944g
53945s/.\{148\}//
53946t nl
53947:delim
53948h
53949s/\(.\{148\}\)..*/\1/
53950t more2
53951s/["\\]/\\&/g; s/^/"/; s/$/"/
53952p
53953b
53954:more2
53955s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53956p
53957g
53958s/.\{148\}//
53959t delim
53960' <conf$$subs.awk | sed '
53961/^[^""]/{
53962  N
53963  s/\n//
53964}
53965' >>$CONFIG_STATUS || ac_write_fail=1
53966rm -f conf$$subs.awk
53967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53968_ACAWK
53969cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53970  for (key in S) S_is_set[key] = 1
53971  FS = ""
53972
53973}
53974{
53975  line = $ 0
53976  nfields = split(line, field, "@")
53977  substed = 0
53978  len = length(field[1])
53979  for (i = 2; i < nfields; i++) {
53980    key = field[i]
53981    keylen = length(key)
53982    if (S_is_set[key]) {
53983      value = S[key]
53984      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53985      len += length(value) + length(field[++i])
53986      substed = 1
53987    } else
53988      len += 1 + keylen
53989  }
53990
53991  print line
53992}
53993
53994_ACAWK
53995_ACEOF
53996cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53997if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53998  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53999else
54000  cat
54001fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54002  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54003_ACEOF
54004
54005# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54006# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54007# trailing colons and then remove the whole line if VPATH becomes empty
54008# (actually we leave an empty line to preserve line numbers).
54009if test "x$srcdir" = x.; then
54010  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54011h
54012s///
54013s/^/:/
54014s/[	 ]*$/:/
54015s/:\$(srcdir):/:/g
54016s/:\${srcdir}:/:/g
54017s/:@srcdir@:/:/g
54018s/^:*//
54019s/:*$//
54020x
54021s/\(=[	 ]*\).*/\1/
54022G
54023s/\n//
54024s/^[^=]*=[	 ]*$//
54025}'
54026fi
54027
54028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54029fi # test -n "$CONFIG_FILES"
54030
54031
54032eval set X "  :F $CONFIG_FILES      "
54033shift
54034for ac_tag
54035do
54036  case $ac_tag in
54037  :[FHLC]) ac_mode=$ac_tag; continue;;
54038  esac
54039  case $ac_mode$ac_tag in
54040  :[FHL]*:*);;
54041  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54042  :[FH]-) ac_tag=-:-;;
54043  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54044  esac
54045  ac_save_IFS=$IFS
54046  IFS=:
54047  set x $ac_tag
54048  IFS=$ac_save_IFS
54049  shift
54050  ac_file=$1
54051  shift
54052
54053  case $ac_mode in
54054  :L) ac_source=$1;;
54055  :[FH])
54056    ac_file_inputs=
54057    for ac_f
54058    do
54059      case $ac_f in
54060      -) ac_f="$ac_tmp/stdin";;
54061      *) # Look for the file first in the build tree, then in the source tree
54062	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54063	 # because $ac_f cannot contain `:'.
54064	 test -f "$ac_f" ||
54065	   case $ac_f in
54066	   [\\/$]*) false;;
54067	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54068	   esac ||
54069	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54070      esac
54071      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54072      as_fn_append ac_file_inputs " '$ac_f'"
54073    done
54074
54075    # Let's still pretend it is `configure' which instantiates (i.e., don't
54076    # use $as_me), people would be surprised to read:
54077    #    /* config.h.  Generated by config.status.  */
54078    configure_input='Generated from '`
54079	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54080	`' by configure.'
54081    if test x"$ac_file" != x-; then
54082      configure_input="$ac_file.  $configure_input"
54083      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54084$as_echo "$as_me: creating $ac_file" >&6;}
54085    fi
54086    # Neutralize special characters interpreted by sed in replacement strings.
54087    case $configure_input in #(
54088    *\&* | *\|* | *\\* )
54089       ac_sed_conf_input=`$as_echo "$configure_input" |
54090       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54091    *) ac_sed_conf_input=$configure_input;;
54092    esac
54093
54094    case $ac_tag in
54095    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54096      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54097    esac
54098    ;;
54099  esac
54100
54101  ac_dir=`$as_dirname -- "$ac_file" ||
54102$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54103	 X"$ac_file" : 'X\(//\)[^/]' \| \
54104	 X"$ac_file" : 'X\(//\)$' \| \
54105	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54106$as_echo X"$ac_file" |
54107    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54108	    s//\1/
54109	    q
54110	  }
54111	  /^X\(\/\/\)[^/].*/{
54112	    s//\1/
54113	    q
54114	  }
54115	  /^X\(\/\/\)$/{
54116	    s//\1/
54117	    q
54118	  }
54119	  /^X\(\/\).*/{
54120	    s//\1/
54121	    q
54122	  }
54123	  s/.*/./; q'`
54124  as_dir="$ac_dir"; as_fn_mkdir_p
54125  ac_builddir=.
54126
54127case "$ac_dir" in
54128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54129*)
54130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54131  # A ".." for each directory in $ac_dir_suffix.
54132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54133  case $ac_top_builddir_sub in
54134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54136  esac ;;
54137esac
54138ac_abs_top_builddir=$ac_pwd
54139ac_abs_builddir=$ac_pwd$ac_dir_suffix
54140# for backward compatibility:
54141ac_top_builddir=$ac_top_build_prefix
54142
54143case $srcdir in
54144  .)  # We are building in place.
54145    ac_srcdir=.
54146    ac_top_srcdir=$ac_top_builddir_sub
54147    ac_abs_top_srcdir=$ac_pwd ;;
54148  [\\/]* | ?:[\\/]* )  # Absolute name.
54149    ac_srcdir=$srcdir$ac_dir_suffix;
54150    ac_top_srcdir=$srcdir
54151    ac_abs_top_srcdir=$srcdir ;;
54152  *) # Relative name.
54153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54154    ac_top_srcdir=$ac_top_build_prefix$srcdir
54155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54156esac
54157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54158
54159
54160  case $ac_mode in
54161  :F)
54162  #
54163  # CONFIG_FILE
54164  #
54165
54166_ACEOF
54167
54168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54169# If the template does not know about datarootdir, expand it.
54170# FIXME: This hack should be removed a few years after 2.60.
54171ac_datarootdir_hack=; ac_datarootdir_seen=
54172ac_sed_dataroot='
54173/datarootdir/ {
54174  p
54175  q
54176}
54177/@datadir@/p
54178/@docdir@/p
54179/@infodir@/p
54180/@localedir@/p
54181/@mandir@/p'
54182case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54183*datarootdir*) ac_datarootdir_seen=yes;;
54184*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54185  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54186$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54187_ACEOF
54188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54189  ac_datarootdir_hack='
54190  s&@datadir@&$datadir&g
54191  s&@docdir@&$docdir&g
54192  s&@infodir@&$infodir&g
54193  s&@localedir@&$localedir&g
54194  s&@mandir@&$mandir&g
54195  s&\\\${datarootdir}&$datarootdir&g' ;;
54196esac
54197_ACEOF
54198
54199# Neutralize VPATH when `$srcdir' = `.'.
54200# Shell code in configure.ac might set extrasub.
54201# FIXME: do we really want to maintain this feature?
54202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54203ac_sed_extra="$ac_vpsub
54204$extrasub
54205_ACEOF
54206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54207:t
54208/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54209s|@configure_input@|$ac_sed_conf_input|;t t
54210s&@top_builddir@&$ac_top_builddir_sub&;t t
54211s&@top_build_prefix@&$ac_top_build_prefix&;t t
54212s&@srcdir@&$ac_srcdir&;t t
54213s&@abs_srcdir@&$ac_abs_srcdir&;t t
54214s&@top_srcdir@&$ac_top_srcdir&;t t
54215s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54216s&@builddir@&$ac_builddir&;t t
54217s&@abs_builddir@&$ac_abs_builddir&;t t
54218s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54219$ac_datarootdir_hack
54220"
54221eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54222  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54223
54224test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54225  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54226  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54227      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54228  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54229which seems to be undefined.  Please make sure it is defined" >&5
54230$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54231which seems to be undefined.  Please make sure it is defined" >&2;}
54232
54233  rm -f "$ac_tmp/stdin"
54234  case $ac_file in
54235  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54236  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54237  esac \
54238  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54239 ;;
54240
54241
54242
54243  esac
54244
54245done # for ac_tag
54246
54247
54248as_fn_exit 0
54249_ACEOF
54250ac_clean_files=$ac_clean_files_save
54251
54252test $ac_write_fail = 0 ||
54253  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54254
54255
54256# configure is writing to config.log, and then calls config.status.
54257# config.status does its own redirection, appending to config.log.
54258# Unfortunately, on DOS this fails, as config.log is still kept open
54259# by configure, so config.status won't be able to write to it; its
54260# output is simply discarded.  So we exec the FD to /dev/null,
54261# effectively closing config.log, so it can be properly (re)opened and
54262# appended to by config.status.  When coming back to configure, we
54263# need to make the FD available again.
54264if test "$no_create" != yes; then
54265  ac_cs_success=:
54266  ac_config_status_args=
54267  test "$silent" = yes &&
54268    ac_config_status_args="$ac_config_status_args --quiet"
54269  exec 5>/dev/null
54270  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54271  exec 5>>config.log
54272  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54273  # would make configure fail if this is the last instruction.
54274  $ac_cs_success || as_fn_exit 1
54275fi
54276if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54277  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54278$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54279fi
54280
54281
54282# After AC_OUTPUT, we need to do final work
54283
54284
54285  # Try to move config.log (generated by autoconf) to the configure-support directory.
54286  if test -e ./config.log; then
54287    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54288  fi
54289
54290  # Rotate our log file (configure.log)
54291  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54292    $RM -f "$OUTPUT_ROOT/configure.log.old"
54293  fi
54294  if test -e "$OUTPUT_ROOT/configure.log"; then
54295    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54296  fi
54297
54298  # Move configure.log from current directory to the build output root
54299  if test -e ./configure.log; then
54300    echo found it
54301    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54302  fi
54303
54304  # Make the compare script executable
54305  $CHMOD +x $OUTPUT_ROOT/compare.sh
54306
54307
54308# Finally output some useful information to the user
54309
54310  # Finally output some useful information to the user
54311
54312  printf "\n"
54313  printf "====================================================\n"
54314  if test "x$no_create" != "xyes"; then
54315    if test "x$IS_RECONFIGURE" != "xyes"; then
54316      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54317    else
54318      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54319    fi
54320  else
54321    if test "x$IS_RECONFIGURE" != "xyes"; then
54322      printf "A configuration has been successfully checked but not created\n"
54323    else
54324      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54325    fi
54326  fi
54327  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54328    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54329  else
54330    printf "using default settings.\n"
54331  fi
54332
54333  printf "\n"
54334  printf "Configuration summary:\n"
54335  printf "* Debug level:    $DEBUG_LEVEL\n"
54336  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54337  printf "* JDK variant:    $JDK_VARIANT\n"
54338  printf "* JVM variants:   $with_jvm_variants\n"
54339  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54340
54341  printf "\n"
54342  printf "Tools summary:\n"
54343  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54344    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54345  fi
54346  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54347  if test "x$TOOLCHAIN_VERSION" != "x"; then
54348    print_version=" $TOOLCHAIN_VERSION"
54349  fi
54350  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54351  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54352  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54353
54354  printf "\n"
54355  printf "Build performance summary:\n"
54356  printf "* Cores to use:   $JOBS\n"
54357  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54358  if test "x$CCACHE_STATUS" != "x"; then
54359    printf "* ccache status:  $CCACHE_STATUS\n"
54360  fi
54361  printf "\n"
54362
54363  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54364    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54365    printf "will result in longer build times.\n"
54366    printf "\n"
54367  fi
54368
54369  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54370    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54371    printf "These are not respected, and will be ignored. It is recommended\n"
54372    printf "that you clean your environment. The following variables are set:\n"
54373    printf "$FOUND_ALT_VARIABLES\n"
54374    printf "\n"
54375  fi
54376
54377  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54378    printf "WARNING: Your build output directory is not on a local disk.\n"
54379    printf "This will severely degrade build performance!\n"
54380    printf "It is recommended that you create an output directory on a local disk,\n"
54381    printf "and run the configure script again from that directory.\n"
54382    printf "\n"
54383  fi
54384
54385  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54386    printf "WARNING: The result of this configuration has overridden an older\n"
54387    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54388    printf "proper build. Failure to do so might result in strange build problems.\n"
54389    printf "\n"
54390  fi
54391
54392  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54393    printf "WARNING: The result of this configuration was not saved.\n"
54394    printf "You should run without '--no-create | -n' to create the configuration.\n"
54395    printf "\n"
54396  fi
54397
54398
54399
54400  # Locate config.log.
54401  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54402    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54403  elif test -e "./config.log"; then
54404    CONFIG_LOG_PATH="."
54405  fi
54406
54407  if test -e "$CONFIG_LOG_PATH/config.log"; then
54408    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54409    if test $? -eq 0; then
54410      printf "The following warnings were produced. Repeated here for convenience:\n"
54411      # We must quote sed expression (using []) to stop m4 from eating the [].
54412      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54413      printf "\n"
54414    fi
54415  fi
54416
54417